>>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
Ed,
I had a similar experience interfacing with a DLL that provided an API to Winsock. This along with Rick's point about the calling convention differences might make a good entry in the FAQ section. Something along the lines of "Common Problems with DLLs".
George
George
Ubi caritas et amor, deus ibi est