uses ComObj;

procedure TDlgRegisterPC.OnlineRegist(const AUID, AFlag: string);
var
 WebBrowser1: Variant;
 WebAddr, VPostData, VFlags, VFrame, VHeaders: OleVariant;
 iLoop: Integer;
 PostData: string;
begin
 PostData := 'UID=' + AUID + '&Flag=' + AFlag;
 WebBrowser1 := CreateOleObject('InternetExplorer.Application');

 if Length(PostData)> 0 then
 begin
  VHeaders := 'Content-Type: application/x-www-form-urlencoded'+ #10#13#0;
  VPostData := VarArrayCreate([0, Length(PostData)], varByte);
  for iLoop := 0 to Length(PostData)- 1 do
  begin
    VPostData[iLoop] := Ord(PostData[iLoop+ 1]);
  end;
  VPostData[Length(PostData)] := 0;
  TVarData(VPostData).vType := varArray;
 end;

 VFlags := 0;
 WebAddr := Config.OnlineRegist;
 WebBrowser1.Navigate2(WebAddr, VFlags, VFrame, VPostData, VHeaders);
 WebBrowser1.Visible := True;
end;

