Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / October 2005

Tip: Looking for answers? Try searching our database.

identifier not found: CreateProcessWithLogonW

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chris - 28 Sep 2005 18:36 GMT
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
chris - 28 Sep 2005 19:21 GMT
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
Marcus Heege - 01 Oct 2005 16:13 GMT
Why do you include winbase at all? It is automatically included by
windows.h. I guess that's the problem.

> Hi!
>
[quoted text clipped - 10 lines]
> Regards,
> Chris
William DePalo [MVP VC++] - 03 Oct 2005 23:59 GMT
> Hi!
>
[quoted text clipped - 14 lines]
>
> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.