Article View: borland.public.delphi.language.objectpascal
Article #55what's the differences between AParam: P[Type] and var AParam: [Type] in dll import.
From: nhsoft.xy
Date: Thu, 08 Dec 2005 14:45
Date: Thu, 08 Dec 2005 14:45
29 lines
1996 bytes
1996 bytes
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?
Technical Details
Message-ID:
<1134053154.282001.170560@g47g2000cwa.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!g47g2000cwa.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 109d30,5ad444eb67032b78,start X-Google-Attributes: gid109d30,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!g47g2000cwa.googlegroups.com!not-for-mail From: nhsoft.xy@gmail.com Newsgroups: borland.public.delphi.language.objectpascal Subject: what's the differences between AParam: P[Type] and var AParam: [Type] in dll import. Date: 8 Dec 2005 06:45:54 -0800 Organization: http://groups.google.com Lines: 30 Message-ID: <1134053154.282001.170560@g47g2000cwa.googlegroups.com> NNTP-Posting-Host: 220.188.178.167 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1134053161 5461 127.0.0.1 (8 Dec 2005 14:46:01 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 8 Dec 2005 14:46:01 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Potu rss-reader(0.97)),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g47g2000cwa.googlegroups.com; posting-host=220.188.178.167; posting-account=bZ8wlQ0AAAA8NW-PQ48lsxELY30VoQ8A