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