BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

what's the differences between AParam: P[Type] and var APara

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Language ObjectPascal
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Thu Dec 08, 2005 7:45 pm    Post subject: what's the differences between AParam: P[Type] and var APara Reply with quote



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





PostPosted: Mon Dec 12, 2005 12:16 am    Post subject: Re: what's the differences between AParam: P[Type] and var A Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Language ObjectPascal All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.