I read a few of the posts on this after doing a search but didn't see my situation in them.

My situation is wanting to receive 2 strings.
1. a path with c:\Program Files\.....
2. a DLL to register using RegAsm.exe through the use of WaitForSingleObject and SHELLEXECUTEINFO STRUCT.

The problem I am running into is with the command CommandLineToArgvW()

see below (path is first)

Code:
	szArgList = CommandLineToArgvW(lpCmdLine, &argCount);
	Register the com dll in directory sent in in lpCmdLine
	CString sDllName = szArgList[1];
	sDllName += " /Silent";
	CString sExeDir = szArgList[0];
The sDllName is good but...
No matter what I have tried sExeDir ends up being "c:\Progam" and the space is cutting off full path name , ,,,because of wide char function?

I also noticed _UNICODE is defined and I dont remember doing that.

How would you do this? Differently?

Oh one other thing, I noticed that it works fine when commandline is supplied and run in Visual Studio but not when app is run separately and values are supplied through Start and Run in windows. Strange and frustrating. Don't understand.