1. as there is only UNICODE version of this function don't use _T macro.
Use L"wewewe" instead.
2. lpDomain
[in] Pointer to a null-terminated string that specifies the name of the
domain or server whose account database contains the lpUsername account.
If this parameter is NULL, the user name must be specified in UPN format..
Windows XP: If this parameter is ".", the function validates the account
using only the local account database.
try this
do
{
WCHAR _domain [MAX_COMPUTERNAME_LENGTH + 1];
DWORD l = sizeof _domain;
if (!(_Result = GetComputerNameW (_domain, &l))) break;
LPWSTR
_login = argv[1],
_password = argv[2],
_cmdline = argv[3],
_path = argc > 4 ? argv[4] : NULL;
PROCESS_INFORMATION pi;
_STARTUPINFOW si = { sizeof (_STARTUPINFOW) };
_Result = CreateProcessWithLogonW (_login, _domain, _password,
LOGON_WITH_PROFILE, NULL, _cmdline, NULL, NULL, _path, &si, &pi);
if (!_Result) break;
CloseHandle (pi.hProcess);
CloseHandle (pi.hThread);
}
while (false);
--
Using Opera's revolutionary e-mail client:
http://www.opera.com/m2/