unit FMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, InvokeRegistry, Rio, SOAPHTTPClient;
type
TForm1 = class(TForm)
Button1: TButton;
HTTPRIO: THTTPRIO;
procedure Button1Click(Sender: TObject);
procedure HTTPRIOBeforeExecute(const MethodName: string;
SOAPRequest: TStream);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
uses
Services, Clipbrd;
procedure TForm1.Button1Click(Sender: TObject);
var
lESB : ExchangeServicePortType;
lServerVer: ServerVersionInfo;
lResNames: ResolveNames;
lReqVersion: RequestServerVersion;
lResResult: ResolveNamesResponse;
begin
lServerVer := ServerVersionInfo.Create;
lResNames := ResolveNames.Create;
lReqVersion := RequestServerVersion.Create;
lResResult := ResolveNamesResponse.Create;
lESB := (HTTPRIO as ExchangeServicePortType);
lESB.ResolveNames(lResNames,
nil, // Impersonation
nil,
'', // MailboxCulture
lReqVersion,
lResResult,
lServerVer);
end;
procedure TForm1.HTTPRIOBeforeExecute(const MethodName: string;
SOAPRequest: TStream);
var
SL: TStringList;
begin
SL := TStringList.Create;
try
SOAPRequest.Position := 0;
SL.LoadFromStream(SOAPRequest);
finally
FreeAndNil(SL);
end;
Clipboard.AsText := SL.Text;
end;
end.