473,394 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

identifier not found: CreateProcessWithLogonW

Hi!

I'm trying to start a process with different credentials. But I cannot even
compile my code as the compiler (VC++.NET) says "error C3861:
'CreateProcessWithLogonW': identifier not found, even with
argument-dependent lookup".

I have included the following headers etc, which I belive should be
sufficient:
#include "stdafx.h"
#define UNICODE
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <stdio.h>
#include <userenv.h>
#include <winbase.h>

Any idea what might be wrong?

Regards,
chris
Nov 17 '05 #1
3 2597
Hi!
I have realized that winbase.h is not included corretly. Even though, I
don't know why.

As my code starts with #define _WIN32_WINNT 0x0500, the corresponding define
statements and CreateProcessWithLogonW should be processed. But in fact,
LOGON_WITH_PROFILE for example remains undefined after importing winbase.h.

Any ideas?

Regards,
Chris
Nov 17 '05 #2
Why do you include winbase at all? It is automatically included by
windows.h. I guess that's the problem.

"chris" <no@mail.com> wrote in message
news:Ov**************@TK2MSFTNGP12.phx.gbl...
Hi!
I have realized that winbase.h is not included corretly. Even though, I
don't know why.

As my code starts with #define _WIN32_WINNT 0x0500, the corresponding
define statements and CreateProcessWithLogonW should be processed. But in
fact, LOGON_WITH_PROFILE for example remains undefined after importing
winbase.h.

Any ideas?

Regards,
Chris

Nov 17 '05 #3
"chris" <no@mail.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
Hi!

I'm trying to start a process with different credentials. But I cannot
even compile my code as the compiler (VC++.NET) says "error C3861:
'CreateProcessWithLogonW': identifier not found, even with
argument-dependent lookup".

I have included the following headers etc, which I belive should be
sufficient:
#include "stdafx.h"
#define UNICODE
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <stdio.h>
#include <userenv.h>
#include <winbase.h>

Any idea what might be wrong?


What does stdafx.h look like? Does it include <windows.h> or an MFC header
that does? If so, and if you are using the precompiled header option, the
definition for _WIN32_WINNT comess too late to be seen.

Why not set the minimum version you target in stdafx.h?

Regards,
Will
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Arne | last post by:
Hi, I'm working on an asp.net application that reads a users username and password, and starts a process with the username read. The problem is that the program returns value...
2
by: jerry | last post by:
I'm trying to run an application under another user within a winform app writen in C#. I have tried a number of different things, but it seems that the CreateProcessWithLogonW function should work...
2
by: Bilal Dinc | last post by:
Hey, I have a question concerning the CreateProcessWithLogonW function imported from the advapi32 dll. For some reason I cant get the appName and cmdLine paramters to work together. For example,...
10
by: David Davidson | last post by:
I am attempting to use CreateProcessWithLogonW from the server-side code of a web page (yes, I want to create a process on the server) and not having much luck. I am attempting to run VPScan, an...
2
by: VicVic | last post by:
Hello, I have an old project, built with VC++. Now need to be compiled in Visual Studio .Net 2003. The project is going to build a DLL. When i try to compile the project, i got the following...
6
by: Matthew Wieder | last post by:
I have an ASPNET app that is running as the ASPNET machine user. It makes a call to the API CreateProcessWithLogonW. On Windows XP it executes without a problem, but on Windows 2000, I get an...
1
by: ashu.nitc | last post by:
Hi, I am trying to create a process with the API: CreateProcessWithLogonW. The process (say, CMD.EXE) which gets created doesnt have the environment variables which I have explicitly passed into...
1
by: ashu.nitc | last post by:
Hi , I am trying to create process using CreateProcessWithLogonW() API. This works fine on Win2000 and NT, but in Vista it gives a UAC popup before the process (say, notepad, calc, etc) kicks...
2
by: None | last post by:
What's the difference between StartInteractiveClientProcess in http://msdn.microsoft.com/en-us/library/aa379608(VS.85).aspx, and CreateProcessWithLogonW?...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.