SysInit.pas中 HInstance: LongWord; { Handle of this instance }
是一个全局变量拉, 不信你在DELPHI的VCL状态下用,不用申明的拉,
The directives near, far, and export refer to calling conventions in 16-bit Windows programming. They have no effect in 32-bit applications and are maintained for backward compatibility only.先USES上ActiveX procedure TForm1.Button1Click(Sender: TObject); var G: TGUID; p: PWideChar; begin if (CoCreateGUID(G) = S_OK) and (StringFromCLSID(G, p) = S_OK) then ShowMessage(p); end;
export好像是为了使用其它Dll或包中的函数,或输出为其它Dll或包使用
HInstance: LongWord; { Handle of this instance }
不信你在DELPHI的VCL状态下用,不用申明的拉,
procedure TForm1.Button1Click(Sender: TObject);
var
G: TGUID;
p: PWideChar;
begin
if (CoCreateGUID(G) = S_OK) and (StringFromCLSID(G, p) = S_OK) then
ShowMessage(p);
end;