Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Jul : Service and file creation

www.cryer.info
Managed Newsgroup Archive

Service and file creation

Subject:Service and file creation
Posted by:"Jean-Jacques Caillée" (jjcaill..@infomane.com)
Date:Sat, 9 Jul 2005 09:22:39

Hi .

I am writing a tcp service application with D6.

Everything works well as regards socket exchanges between the service and
its clients.

But the service simply cannot create a file on the server.

I have tried the combination of

LogonUser(PChar(Aknownuser),nil,PChar(Aknownpassword),LOGON32_LOGON_SERVICE,LOGON32_PROVIDER_DEFAULT,token)
and
ImpersonateLoggedOnUser(token)

but that doesn't work because LogonUser always return false, although I know
that the user exists and the password is correct.  The user has
administrator privileges.

What can possibly be wrong???

Replies:

www.cryer.info
Managed Newsgroup Archive