Hi i programing in VFP 9.0,
I not experence with API programatic, with DLL
Do you have any example for controller SR3 and UHopper,
usando Paylink.
I need understand how can i controller with VFP instruccion
How call the funtions of .dll
regards
Visual FOX PRO
Moderators: aardvark, davebush, Admin
Hi,
We don’t have any experience in Visual Foxpro. Having looked rount the web, you need to check out the DECLARE INTEGER command.
If you look in the AesImhei.h C header file in the SDK folder, you will see a list of the DLL calls.
The C line:
will translate into
(in 32 bit Windows all integers are equivalent to long)
There still remains a problem. In order to be callable from Visual Basic the C DLL functions use the _stdcall keyword. As well as controlling how the stack works, this also causes the Visual C compiler to “decorate” the function name - it alters the actual name generated and used.
We cope with that for Visual Basic by using the ALIAS keyword, which gives VB the exact string that appears in the DLL. The same function in AesImhei.bas is declared as:
You may be able to get away with:
but the chances are that the ‘@’ will cause problems.
Dave Bush
If you would like to find the section on DECLARE INTEGER in your documentation, and any references to stdcall or “decoration” and paste them into a reply, I will see if I can work out what we should do.
We don’t have any experience in Visual Foxpro. Having looked rount the web, you need to check out the DECLARE INTEGER command.
If you look in the AesImhei.h C header file in the SDK folder, you will see a list of the DLL calls.
The C line:
Code: Select all
long DLL SwitchOpens (long SwitchNumber) ;Code: Select all
DECLARE INTEGER SwitchOpens IN "AesImhei.dll" INTEGER SwitchNumberThere still remains a problem. In order to be callable from Visual Basic the C DLL functions use the _stdcall keyword. As well as controlling how the stack works, this also causes the Visual C compiler to “decorate” the function name - it alters the actual name generated and used.
We cope with that for Visual Basic by using the ALIAS keyword, which gives VB the exact string that appears in the DLL. The same function in AesImhei.bas is declared as:
Code: Select all
Declare Function SwitchOpens Lib "AesImhei.dll" Alias "_SwitchOpens@4" (ByVal SwitchNumber As Long) As LongCode: Select all
DECLARE INTEGER SwitchOpens@4 IN "AesImhei.dll" INTEGER SwitchNumberDave Bush
If you would like to find the section on DECLARE INTEGER in your documentation, and any references to stdcall or “decoration” and paste them into a reply, I will see if I can work out what we should do.
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.