Click here to Skip to main content
16,007,932 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralTab Key Pin
Grahamfff27-May-04 12:26
Grahamfff27-May-04 12:26 
GeneralRe: Tab Key Pin
Anthony_Yio27-May-04 17:27
Anthony_Yio27-May-04 17:27 
GeneralRe: Tab Key Pin
Ryan Binns27-May-04 18:33
Ryan Binns27-May-04 18:33 
GeneralRe: Tab Key Pin
sweep12328-May-04 0:34
sweep12328-May-04 0:34 
GeneralRe: Tab Key Pin
Ryan Binns28-May-04 0:46
Ryan Binns28-May-04 0:46 
GeneralRe: Tab Key Pin
Anthony_Yio28-May-04 19:10
Anthony_Yio28-May-04 19:10 
GeneralRe: Tab Key Pin
Ryan Binns29-May-04 3:41
Ryan Binns29-May-04 3:41 
GeneralCreateProcessWithLogonW Pin
cobyjone27-May-04 10:25
cobyjone27-May-04 10:25 
I am trying to create a program using the CreateProcessWithLogonW. I am working on a Windows 2000 Professional. The program compiles fine but when it tries to link it, it gives the following errors:

Linking...
CreateProcess.obj : error LNK2001: unresolved external symbol __imp__CreateProcessWithLogonW@44
Debug/CreateProcess.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Creating browse info file...

CreateProcess.exe - 2 error(s), 0 warning(s)

The code that I am trying to compile is as follows:

#define UNICODE
#define _WIN32_WINNT 0x0500
#define WINVER 0x0500

#include <windows.h>

#pragma comment(lib, "Advapi32")

int main(int argc, char* argv[])
{
STARTUPINFO si;
si.cb = sizeof(STARTUPINFO);

PROCESS_INFORMATION pi;

if (CreateProcessWithLogonW(L"UserName", L"Domain", L"password", LOGON_WITH_PROFILE, NULL, L"\"full file path\"", CREATE_DEFAULT_ERROR_MODE, NULL, L"\"current directory\"", (LPSTARTUPINFO)&si, (LPPROCESS_INFORMATION)&pi)) {
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
}

return 0;
}
GeneralRe: CreateProcessWithLogonW Pin
Rob Manderson27-May-04 12:41
protectorRob Manderson27-May-04 12:41 
GeneralRe: CreateProcessWithLogonW Pin
cobyjone28-May-04 3:48
cobyjone28-May-04 3:48 
GeneralChanging Size Font and Vertical Scroll Bar Pin
Eversman27-May-04 10:16
Eversman27-May-04 10:16 
GeneralRe: Changing Size Font and Vertical Scroll Bar Pin
gUrM33T27-May-04 15:07
gUrM33T27-May-04 15:07 
GeneralUsing Excel data in VC++ 6.0 Pin
greg8927-May-04 9:31
greg8927-May-04 9:31 
GeneralRe: Using Excel data in VC++ 6.0 Pin
Anthony_Yio27-May-04 17:47
Anthony_Yio27-May-04 17:47 
GeneralRe: Using Excel data in VC++ 6.0 Pin
greg8928-May-04 2:33
greg8928-May-04 2:33 
GeneralRe: Using Excel data in VC++ 6.0 Pin
Anthony_Yio28-May-04 19:00
Anthony_Yio28-May-04 19:00 
GeneralEndModalDialog?? Any Ideas Pin
Cedar Sith27-May-04 7:15
Cedar Sith27-May-04 7:15 
GeneralRe: EndModalDialog?? Any Ideas Pin
Anthony_Yio27-May-04 16:54
Anthony_Yio27-May-04 16:54 
GeneralRe: EndModalDialog?? Any Ideas Pin
Cedar Sith28-May-04 3:01
Cedar Sith28-May-04 3:01 
GeneralRe: EndModalDialog?? Any Ideas Pin
Anthony_Yio28-May-04 19:06
Anthony_Yio28-May-04 19:06 
GeneralRe: EndModalDialog?? Any Ideas Pin
Gary R. Wheeler28-May-04 5:25
Gary R. Wheeler28-May-04 5:25 
GeneralALT+TAB functionality. Pin
baskarchinnu27-May-04 7:06
baskarchinnu27-May-04 7:06 
GeneralRe: ALT+TAB functionality. Pin
Alexander M.,27-May-04 8:34
Alexander M.,27-May-04 8:34 
GeneralRe: ALT+TAB functionality. Pin
baskarchinnu27-May-04 21:23
baskarchinnu27-May-04 21:23 
Questionhow to add a minimize button and maximize button on a dialog? Pin
vividtang27-May-04 6:39
vividtang27-May-04 6:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.