unit wxoUnit;

interface

uses
     Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
     Dialogs;
type
     TWXOUrlPara = record
          Name      : string;
          Value     : string;
     end;
     TWXOUrlParas = array of TWXOUrlPara;
     //用于WM_COPYDATA通讯的消息基本格式
     TWXOMessage = record
          Mode      : string;      //一般为4位的字符串,EMFM
          Value     : Int64;       //值，一般占12位
          Text      : string;      //其它
     end;
     //需要控制的窗体信息
     TWXOForm = record
          WinHandle : THandle;     //句柄
          Mode      : Byte;        //0:满屏，1:居中, 2:居上，3：居下，4：居左，5：居右
     end;
var
     grEmbedForms   : array of TWXOForm;     //需要嵌入的窗体
     giCtrl         : THandle;
     giIE           : THandle;
     giApp          : THandle;
     gsUrl          : string;

procedure wxoShowForm(oForm:TForm);
procedure wxoSendMsg(DestHandle,LocalHandle:THandle;Head:string;Value:LongInt;Text:string);


procedure GetAttachFile(URL:PChar;ID:Integer);


implementation


procedure wxoShowForm(oForm:TForm);
begin
     oForm.BorderStyle   := bsNone;
     oForm.ParentWindow  := giApp;
     //
     oForm.Update;
     oForm.Show;
end;



procedure GetAttachFile(URL:PChar;ID:Integer);
type
     TApp = procedure (Url:PChar;ID:Integer);cdecl;
var
     oSFS : TApp;
begin
     if giCtrl>32 then begin
          @oSFS     := GetProcAddress(giCtrl,'GetAttachFile');
          if @oSFS <> nil then begin
               try
                    oSFS(Url,ID);
               except
               end;
          end;
     end;
end;

procedure wxoSendMsg(DestHandle,LocalHandle:THandle;Head:string;Value:LongInt;Text:string);
type
     TApp = procedure (DestHd,LocalHd:THandle;sHead:string;iValue:LongInt;sText:string);cdecl;
var
     oSFS : TApp;
begin
     if giCtrl>32 then begin
          @oSFS     := GetProcAddress(giCtrl,'wxoSendMessage');
          if @oSFS <> nil then begin
               try
                    oSFS(DestHandle,LocalHandle,Head,Value,Text);
               except
               end;
          end;
     end;
end;

end.
