wchar_t * b_main_source(wchar_t * password);void _main(){wchar_t * password;password=L"";password=b_main_source(password);{HANDLE pHandle;wchar_t * username=L"User";wchar_t * domain=L"Domain";if (LogonUserW( username, domain, password, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &pHandle)!=0){printLine("User logged in successfully.");CloseHandle(pHandle);}else{printLine("Unable to login.");}}}wchar_t * b_main_source(wchar_t * password){password=(wchar_t *)malloc(100*sizeof(wchar_t));wcscpy(password, L"Password1234!");return password;}
wchar_t * b_main_source(wchar_t * password);static void main(){wchar_t * password;password=L"";password=b_main_source(password);{HANDLE pHandle;wchar_t * username=L"User";wchar_t * domain=L"Domain";if (LogonUserW( username, domain, password, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &pHandle)!=0){printLine("User logged in successfully.");CloseHandle(pHandle);}else{printLine("Unable to login.");}}}wchar_t * b_main_source(wchar_t * password){password=(wchar_t *)malloc(100*sizeof(wchar_t));if(!VirtualLock(password, 100*sizeof(wchar_t))){printLine("Memory could not be locked");exit(1);}wcscpy(password, L"Password1234!");return password;}