Hi Chris,
The utility Dependency Walker (
http://www.dependencywalker.com) you tell, what DLL or functions is missing.
MartinJ
>The following code used to dump a print screen image to the printer works fine when i run the VFP6 exe directly (not via a launcher), when i am current in the folder where the EXE was built. However, if i run the vfp exe from a launcher program (which copies the exe to a diff folder and then sets paths differently than if run as a "non-launcher" user), it errors with:
>
>
>Cannot load 32-bit DLL "C:\mycurrentlauncherpathlocation\DIBAPI32.DLL"
>
>What in the api calls below makes it a pathing issue of sorts? Or is it something else? Again it works fine on my machine calling the vfp exe from one location, but errors when called from the "workstation launcher" location (on the same machine). Here is the code.
>
>
>DECLARE INTEGER GetDesktopWindow IN Win32api
>
>DECLARE INTEGER PrintWindow IN DibApi32 ;
>INTEGER HWnd, ;
>INTEGER fPrintArea, ;
>INTEGER fPrintOpt, ;
>INTEGER wxScale, ;
>INTEGER wyScale, ;
>STRING @ szJobName
>
>LOCAL nRetVal,cJobName
>cJobName = 'Printing...'
>nRetVal = PrintWindow(GetDesktopWindow(),1,1,0,0,@cJobName)
>IF nRetVal != 0
> IF nRetVal != 6
> MESSAGEBOX("error..... blah blah")
> ENDIF
>ENDIF
>