hInstance好蟓是SysInit下的把ActiveX下
CoCreateGUID

解决方案 »

  1.   

    SDK下,hInstance是WinMain的一个参数
    export好像是为了使用其它Dll或包中的函数,或输出为其它Dll或包使用
      

  2.   

    SysInit.pas中
    HInstance: LongWord;          { Handle of this instance }
      

  3.   

    是一个全局变量拉,
    不信你在DELPHI的VCL状态下用,不用申明的拉,
      

  4.   

    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;