calldll vs calldll32

calldll vs calldll32

Postby don lowenstein » Wed Sep 26, 2007 2:41 pm

I'm having varied results using dll and dll32 processing with FWH 7.09 and xharbour 99.71

- gpf's are occuring under various circumstances. Using xharour 99.5 - no problem.

question - what's the reason I would choose calldd or calldll32 for dynamically calling an external dll.

Aren't all dll's 32-bits these days?

My mystery is, if I use getprocaddress(), loadlibrary(), freelibrary(), calldll() I have successful results with xharbour 99.51 and fwh 2006

using xharbour 99.71 and fwh 7.09, gpf occurs with getproc32() and I never get to the calldll32.

If I use the "old" calldll conventions, most calls work in 99.71 but not all - this was not a problem with 99.51.

If I use the calldll32 conventions, I get gpf on getproc32()

Anybody else having varied results in calling dll's between these versions of fivewin and xharbour?
Don Lowenstein
www.laapc.com
User avatar
don lowenstein
 
Posts: 197
Joined: Mon Oct 17, 2005 9:09 pm

Postby Antonio Linares » Wed Sep 26, 2007 5:16 pm

...32 functions names are for 16 bits only. They exist from FW 16 compatibility. You should use the functions without the ...32 suffix.

The only difference regarding those functions is that previously the DLL was kept opened by mistake, and now it is properly closed. Some DLLs require to kept opened meanwhile you are using them, from one call to another.

The way to solve it is to previously load the DLL:

local hDLL := LoadLibrary( <cDLLName.dll> )

... make your DLL functions calls ...

FreeLibrary( hDLL )

Please try it this way and you should not get any GPF at all, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 63 guests