 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
nhsoft.xy@gmail.com Guest
|
Posted: Thu Dec 08, 2005 2:45 pm Post subject: what's the differences between AParam: P[Type] and var APara |
|
|
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?
|
|
| Back to top |
|
 |
Riki Wiki Guest
|
Posted: Sun Dec 11, 2005 7:16 pm Post subject: Re: what's the differences between AParam: P[Type] and var A |
|
|
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>
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|