在你的conInitialize()
Form1 := TForm1.Create(Application);
  Form1.show;
UnInitialize;
来注册消息队列!~

解决方案 »

  1.   

    UnInitialize;
    在对象被释放的时候进行,还有就是你的客户程序的线程模式!
      

  2.   

    如此搞定!///*********************************************************
    library Project2;uses
      SysUtils,
      Classes,
      Unit1 in 'Unit1.pas' {Form1};{$R *.res}
      exports
        applyskin,
        removeskin;
        
    begin
    end.////****************************************
    unit Unit1;interfaceuses
      Windows,Forms,ActiveX, Classes, Controls, OleCtrls, ACTIVESKINLib_TLB,ComObj,
      StdCtrls;type
      TForm1 = class(TForm)
        Skin1: TSkin;
        procedure WndProc(var Message: TMessage);override;  private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;  function applyskin(hwnd:HWND;prjhandle:THandle):Integer; cdecl;
      function removeskin():Integer;cdecl;implementation{$R *.dfm}  function applyskin(hwnd:HWND;prjhandle:THandle):Integer;
      begin
          CoInitialize(nil);      //Application.Handle := prjhandle;
          Form1 := TForm1.Create(Application);
          Form1.Skin1.ApplySkinByName(hwnd,'FreeForm');      applyskin := 0;
      end;  function removeskin():Integer;
      begin
          Form1.Free;
          CoUnInitialize();
          removeskin := 0;
      end;  procedure TForm1.WndProc(var Message: TMessage);override;
      begin  end;
    end.