Home
Forum: "Main";
Current archive: 2002.01.08;

Down

How to pass a function parameter in a DLL. Find similar branches

Chak   (2001-12-19 10:07) [0]

I transfer one value and another comes to function. I use type PChar. If anyone knows explain to me, thanks in advance!

Алексей Петров   (2001-12-19 10:19) [1]

Check Identity Calling Agreements

Chak   (2001-12-19 10:24) [2]

How can I check it, I'm new to Delphi, what exactly to check?

DieHard   (2001-12-19 10:28) [3]

Look in the help Calling conventions
Most often, when a function is declared in a DLL, a directive is used. stdcall

Chak   (2001-12-19 10:39) [4]

So I use it, in the opposite direction, the transfer of the parameter goes without problems, which I transmit and receive, but on the contrary, nothing!
If I pass 8 to the XNUMX structure as an Integer, then in the DLL I get a seven-digit number, if as PChar, then I end up with something like "\$ us." From where - I can't understand!

Алексей Петров   (2001-12-19 10:44) [5]

Then it seems that in dll-ke do not use.
Look as described in the dll. if you can’t find the description - try stdcall to remove or replace with cdecl.

Chak   (2001-12-19 13:06) [6]

No DLL-ku himself wrote, there is for sure!

Алексей Петров   (2001-12-19 13:34) [7]

It is strange if the prototypes completely coincide ...
If only in the options of the project there is a problem - although the default calling convention for the delfi is not :(

Can you draw a prototype that will be clarified?

Chak   (2001-12-19 14:57) [8]

=> Alexey Petrov
Thanks you!!! I wanted to send a piece of code to show that everything is alright with me, but I copied and looked at no stdcall !!!
I finished and it worked! I don’t even know how it is, thanks vseravno, I suffered for two days :)))) Thank you!

Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;