Hello, I have this problem: I want to call some functions in a Windows DLL, the functions are C ones, then I know the list and type of C parameters to pass. Have anyone some suggestions? What are the correspondence from GPC Pascal types to C types?
Thank you
GiDeSa wrote:
I have this problem: I want to call some functions in a Windows DLL, the functions are C ones, then I know the list and type of C parameters to pass. Have anyone some suggestions? What are the correspondence from GPC Pascal types to C types?
Please see the online documentation `info -f gpc', Section "Reference - Integer Types" for GPC types that correspond to GCC's `int', `long', `unsigned short', etc.
See also `CString' and the section of the GPC FAQ list (http://home.pages.de/~GNU-Pascal/gpc-faq.html) that deals with interfacing with other languages.
Hope this helps,
Peter
On 23 Nov 99, at 13:32, Peter Gerwinski wrote:
GiDeSa wrote:
I have this problem: I want to call some functions in a Windows DLL, the functions are C ones, then I know the list and type of C parameters to pass. Have anyone some suggestions? What are the correspondence from GPC Pascal types to C types?
Please see the online documentation `info -f gpc', Section "Reference - Integer Types" for GPC types that correspond to GCC's `int', `long', `unsigned short', etc.
See also `CString' and the section of the GPC FAQ list (http://home.pages.de/~GNU-Pascal/gpc-faq.html) that deals with interfacing with other languages.
You might also need to declare the imported functions with "attribute(stdcall)".
Note: importing DLL functions with "attribute(stdcall)" works fine, but writing your own functions with the attribute flag is broken under recent GPC betas.
Best regards, The Chief -------- Dr. Abimbola A. Olowofoyeku (The African Chief) Email: laa12@keele.ac.uk Homepage: http://ourworld.compuserve.com/homepages/African_Chief/ Author of: Chief's Installer Pro v5.20a for Win32 ftp://ftp.demon.co.uk/pub/ibmpc/win95/apps/chief32/chief52a.zip