Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dll calls work in vfp8, but not in vfp9
Message
De
15/11/2007 13:22:13
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Dll calls work in vfp8, but not in vfp9
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Database:
MS SQL Server
Divers
Thread ID:
01269221
Message ID:
01269221
Vues:
67
Hi All,

I have a program written back in vfp6, I think. It calls a Dll, to create a pdf file from a ps file. When I build the application in vfp8, then run it, the pdf is built with a size greater the 1KB, and Adobe Reader opens the file without a problem. But If I build the same application in vfp9, then run it, the pdf is built with a size of 1KB and Adobe Reader can not open the file.

The line I see going wrong, looks like this:
        Declare Integer CreateProcess In kernel32.Dll ;
                INTEGER lpApplicationName, ;
                STRING lpCommandLine, ;
                INTEGER lpProcessAttributes, ;
                INTEGER lpThreadAttributes, ;
                INTEGER bInheritHandles, ;
                INTEGER dwCreationFlags, ;
                INTEGER lpEnvironment, ;
                INTEGER lpCurrentDirectory, ;
                STRING @lpStartupInfo, ;
                STRING @lpProcessInformation

        Declare Integer WaitForSingleObject In kernel32.Dll ;
                INTEGER hHandle, Integer dwMilliseconds

        Declare Integer CloseHandle In kernel32.Dll ;
                INTEGER hObject

        Declare Integer GetLastError In kernel32.Dll

        Define WAIT_TIMEOUT 0x00000102
        Define WAIT_INTERVAL 200
  
         If WaitForSingleObject(hProcess, WAIT_INTERVAL) != WAIT_TIMEOUT  && this always evaluates to True for vfp9.
the last line should be false, unles the process has timed out. It says true, the first time thru for vfp 9, while in vfp8, it will hit true after the pdf is built.

Any thoughts?

Thanks,
Beth
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform