UInt32 with "DLL32 Function"

UInt32 with "DLL32 Function"

Postby Callejas » Mon Oct 12, 2009 8:23 pm

Hi All,

Is it possible to use the type unsigned int 32 in the calls "DLL32 FUNCTION" ?

I need to declare the following call in the harbour:

in C#:
[DllImport("PCSHLL32.dll")]
public static extern UInt32 hllapi(out UInt32 Func, StringBuilder Data, out UInt32 Length, out UInt32 RetC);

I tried with several types (WORD, DWORD, LONG, _INT) but without success.

can anybody help me?

thanks

PS: Sorry my english :(
Callejas
 
Posts: 4
Joined: Tue Oct 06, 2009 4:22 pm

Re: UInt32 with "DLL32 Function"

Postby Enrico Maria Giordano » Mon Oct 12, 2009 9:05 pm

LONG should work. Probably the problem is elsewhere.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: UInt32 with "DLL32 Function"

Postby Callejas » Mon Oct 12, 2009 10:04 pm

Hi, EMG.

Thank you for the answer. I am making the declaration in the following way:

DLL32 FUNCTION _hllapi(@F AS LONG, @D AS STRING, @L AS LONG, @R AS LONG) AS LONG PASCAL FROM "hllapi" LIB "PCSHLL32.dll"
but it doesn't work.
I got to write a dll "wrapper" in C for access the dll "PCSHLL32.dll" without the type uint32, but even so the harbour doesn't get to access.

I will continue trying.

thank you.

Callejas.
Callejas
 
Posts: 4
Joined: Tue Oct 06, 2009 4:22 pm

Re: UInt32 with "DLL32 Function"

Postby Enrico Maria Giordano » Mon Oct 12, 2009 10:10 pm

Callejas wrote:DLL32 FUNCTION _hllapi(@F AS LONG, @D AS STRING, @L AS LONG, @R AS LONG) AS LONG PASCAL FROM "hllapi" LIB "PCSHLL32.dll"


Try

Code: Select all  Expand view
DLL32 FUNCTION HLLAPI(@F AS PTR, @D AS STRING, @L AS PTR, @R AS PTR) AS LONG PASCAL FROM "hllapi" LIB "PCSHLL32.dll"


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: UInt32 with "DLL32 Function"

Postby Callejas » Mon Oct 12, 2009 10:35 pm

Hi EMG,

thanks, but it didn't work.

Callejas
Callejas
 
Posts: 4
Joined: Tue Oct 06, 2009 4:22 pm

Re: UInt32 with "DLL32 Function"

Postby James Bott » Tue Oct 13, 2009 4:38 am

Antonio says this in a previous message:

Try it again removing PASCAL from the DLL32 declaration

(In FWH DLL32 is no longer needed. Just use DLL ... as we are in 32 bits)



Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: UInt32 with "DLL32 Function"

Postby Enrico Maria Giordano » Tue Oct 13, 2009 7:11 am

What error do you get exactly?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: UInt32 with "DLL32 Function"

Postby Callejas » Sun Oct 18, 2009 1:59 am

The problem was in the registration of the dll.
Now it is working correctly.

thank you very much to all

Callejas
Callejas
 
Posts: 4
Joined: Tue Oct 06, 2009 4:22 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 90 guests