>
>Hi everyone,
>
>I have been been trying to use the code above with some success, but mostly I get a general program failure in GDI.EXE. It does work to print one specific window once, but if I try to print it again, or try to print some other window, I get the error above.
>
>If anyone knows what might be wrong, I am all ears...
Klas,
I have tested this code with VFP 3 running on NT and had no problems doing multiple screen prints. What operating system are you using? If you are using Window 3.1 with Win32S it might be the problem. Win32S does not support the full Win32 API.
You might want to try the 16 bit version of the DLL. It is available from MS as part of the WinCap sample.
http://support.microsoft.com/support/kb/articles/q97/1/93.asp