http://qs1969.pair.com?node_id=484305

talwyn has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I have used perl and the Test modules along with Win32::Gui and win32::guitest to automate testing of windows applications in the past. Sendkeys, windows manipulation, selection and mouse clicks, etc.

Now I would like to do the same for some foxpro applications. However, Foxpro makes extensive use of windowless controls that do not have standard windows handle attached to the widgets.

So... Anyone know how to do this? Anyone know how to use the FoxPro API? The MSDN wasn't very forthcoming with examples... it seems like this would be the solution that I need to wrap into a perl module.... but I can't seem to find any working code or configuration for vc++ .Net so I can get started.

Any pointers to relevant docs would be helpful. Any pointers to good example code would be much appreciated.

Note this is not about database operations... this is about Foxpro GUI manipulation.

UPDATE

Code snippet follows:

#include<stdio.h> #include"c:\program files\Microsoft Visual Foxpro 8\Samples\api\pro_ex +t.h" int main() { WHANDLE wh; TEXT * title; title = "Form1"; wh = _WFindTitle(title); printf( "Found with fox handle '%d'",(int) wh); return 0; }

When compiled this generates the following errors:

  • foxpro_auto error LNK2019: unresolved external symbol @__WFindTitle@8 referenced in function _main
  • foxpro_auto fatal error LNK1120: 1 unresolved externals