 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Anant Guest
|
Posted: Tue Oct 03, 2006 6:04 pm Post subject: How do i convert a |
|
|
function defined in the Type library in C++
ClientInitialize([in] WCHAR *pwcUsercode,
[in] WCHAR *pwcPassword,
[in] WCHAR *pwcDomain,
[in] WCHAR *pwcServerIdent,
[in] UINT uiAuthType,
[out] byte **ppbInitialRequest,
[out] UINT *uiOutputLength);
After importing the type library to Delphi it looks like
procedure ClientInitialize(var pwcUsercode: WideString; var
pwcPassword: WideString; var pwcDomain: WideString; var pwcServerIdent:
WideString; uiAuthType: Longword;
out ppbInitialRequest: PByte1; out uiOutputLength: Longword);
i implemented the procedure as
function THostPipe.GetSecurityOption : Integer;
var
ClientAuth : TClientAuth;
ClientInt : IClientAuth;
ppbInitialRequest : PByte1;
uiOutputLength : LongWord;
pwcUsercode, pwcPassword, pwcDomain, pwcServerIdent : WideString;
begin
pwcServerIdent := '';
pwcUsercode := fUserCodeBuffer ;
pwcPassword := fPasswordAsIs;
pwcDomain := HostName;
ppbInitialRequest := Nil;
uiOutputLength := 0;
ClientInt := CoClientAuth.Create;
ClientInt.Debug := 0;
ClientAuth := TClientAuth.Create(Nil);
try
ClientAuth.ClientInitialize(pwcUsercode,
pwcPassword,
pwcDomain,
pwcServerIdent,
AUTHTYPE_NTLM,
ppbInitialRequest,
uiOutputLength);
except
On E : Exception do
ShowMessage(E.Message);
end;
Result := 0;
end;
I get access violation at run time. I believe there is some problem
while passing the output parameter ppbInitialRequest. Its a pointer -
pointer in C++ where as it is PBYTE1 in Delphi.
Please give me a solution to this problem. I badly need it.
Thanks
Anant |
|
| Back to top |
|
 |
Riki Wiki Guest
|
Posted: Thu Oct 05, 2006 4:46 am Post subject: Re: How do i convert a |
|
|
Hoi Anant
This newsgroup officially closed years ago. You need to repost your message
in the b.p.delphi.language.delphi.general newsgroup and do so using the
Borland news server, if you want people to see it.
How to post to Delphi newsgroups:
<http://delphi.wikia.com/wiki/Delphi_Newsgroups> |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|