Information générale
Catégorie:
Fonctions Windows API
Titre:
Trying to call DLL function
I am trying trying to call a DLL function. The VB code that works properly is as Follows:
//////////////////////////
Declare Function FPInitialize% Lib "ETFAXD32.DLL" (lpdFaxHandle&)
Private Sub Command1_Click()
wstatus = FPInitialize(dFaxHandle)
End Sub
/////////////////////////
In this code, the value of dFaxHandle is properly assigned a Long Integer value, and wstatus is assigned 0, indicating success.
I'm trying to do the samething in VFP 5.0. Here is the code for VFP:
DECLARE INTEGER FPInitialize IN ETFAXD32 AS FpInitialize ;
Long @nFpHandle
nStatus = FpInitialize(@nFaxHandle)
As near as I can tell, this should return the samething, but a Long integer gets assigned to nFaxHandle(as I would expect) and a large integer gets assigned to wStatus, indicating failure.
This seems simple enough, what am I missing here?
Ed
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement