🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #12779

CreateProcessAsUser returns false with Err Code = 1314

#12779
From: Sergey Muschin
Date: Mon, 17 Nov 2003 18:12
36 lines
1937 bytes
Hi there,

very simple code :

#define KIOSK_APP "C:\\KIOSK\\Bin\\Kiosk.exe"
#define KIOSK_DIR "C:\\KIOSK\\Bin\\"

void __fastcall TForm1::btnStartProcessAsKioskClick(TObject *Sender) {

bool bRet = false;
HANDLE htok = 0;
STARTUPINFO si = { sizeof si, 0, "" };
PROCESS_INFORMATION pi;

  bRet = LogonUser( "Kiosk", ".", "Kiosk", LOGON32_LOGON_INTERACTIVE,
                 LOGON32_PROVIDER_DEFAULT,&htok );
  bRet = CreateProcessAsUser( htok, 0, KIOSK_APP,
     0, 0,  // security attributes
      false, // handle inheritance
      0,     // creation flags
      0,     // environment block
      KIOSK_DIR,     // current directory
      &si, &pi );
}

CreateProcessAsUser returns false with Err Code = 1314 (A required privilege
is not held by the client.)
MSDN suggests to add "Act as a part of the Operating System" privilege.
So i've added tihis privilege, still getting this error.

Any ideas?

Thank You

Regards,
Sergey Muschin
Technical Details
Message-ID: <3fb90fa7$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,bd433a7717918789,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-11-17 10:39:55 PST
Reply-To: "Sergey Muschin" <SMuschin@tonservices.com>
From: "Sergey Muschin" <SMuschin@tonservices.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: CreateProcessAsUser returns false with Err Code = 1314
Date: Mon, 17 Nov 2003 11:12:56 -0700
Lines: 38
Organization: FlyingJ
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 204.110.225.254
Message-ID: <3fb90fa7$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1069092775 204.110.225.254 (17 Nov 2003 10:12:55 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail