Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

what's the differences between AParam: P[Type] and var AParam: [Type] in dll import.

1 view
Skip to first unread message

nhso...@gmail.com

unread,
Dec 8, 2005, 9:45:54 AM12/8/05
to
what's the differences between AParam: P[Type] and var AParam: [Type]
in dll import.
eg.
//C declaration:
//WORD DC_Mif_AntiCollision (DWORD *_dwSnr, BYTE _bMode = 1);
function DC_Mif_AntiCollision(var _dwSnr: Dword):WORD;Stdcall;external
'FOX_DC.dll';
function DC_Mif_AntiCollision(_dwSnr:PDword):WORD;Stdcall;external
'FOX_DC.dll';


And which is better. (It's a mifare1 api to operate IC Card Reader)
eg.
var
dword_1: PDWORD;
dword_2: DWORD;
begin
//function DC_Mif_AntiCollision(var _dwSnr:
Dword):WORD;Stdcall;external 'FOX_DC.dll';
GetMem(dword_1, SizeOf(DWORD));
DC_Mif_AntiCollision(dword_1);
DC_Mif_AntiCollision(dword_2);

//function DC_Mif_AntiCollision(_dwSnr:PDword):WORD;Stdcall;external
'FOX_DC.dll';
DC_Mif_AntiCollision(@dword_2);
//TODO: which one is better???
end;
which one is better, and why?

Riki Wiki

unread,
Dec 11, 2005, 2:16:04 PM12/11/05
to
Hoi

You need to repost your question on the Borland news server to make
everybody see it and possibly answer your question. Further, this newsgroup
do not officially exist, use newsgroup b.p.d.language.delphi.general.

Take a look here:
<http://tinyurl.com/8m5nw>
which links to
<http://delphi.wikicities.com/wiki/Delphi_Newsgroups>

0 new messages