Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to call DLL function
Message
De
19/08/1997 10:36:15
Edward Crawford
City Facilities Management
Glasgow, Royaume Uni
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00044984
Message ID:
00045525
Vues:
48
>Edward,
>
>>Declare Function FPInitialize% Lib "ETFAXD32.DLL" (lpdFaxHandle&)
>>DECLARE INTEGER FPInitialize IN ETFAXD32 AS FpInitialize ;
>> Long @nFpHandle
>>
>>nStatus = FpInitialize(@nFaxHandle)
>
>Not sure why the docs look like that. The & should mean Long value
>but that doesn't mean the parm is by reference (although that seems
>to make sense). Could it be that the result value is the handle???
>
>Some DLLs that are designed explicitly for use in VB don't work with VFP.
>VFP can only call DLLs that use Win32API calling convention (FAR PASCAL)
>while VB specific DLLs use a VB specific format of pushing values
>onto the stack (to minimize overhead).
>
>If the docs don't point out a C example, I would guess that's what might
>be the case.
>
>+++ Rick ---

Rick:

The parameter is by reference because that is VB's default, and it does not specify By Value. But also I found the problem. I located a C .h file, and the prototype shows the return type actually as Short, not integer. So that did it. Thanks for your comments though, I didn't know that about VB.

Ed
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform