BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do i convert a

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ObjectPascal
View previous topic :: View next topic  
Author Message
Anant
Guest





PostPosted: Tue Oct 03, 2006 6:04 pm    Post subject: How do i convert a Reply with quote



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





PostPosted: Thu Oct 05, 2006 4:46 am    Post subject: Re: How do i convert a Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ObjectPascal All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.