void b_main_sink(_struct_type my_struct);void _main(){char * password;_struct_type my_struct;char password_buf[100]="";password=password_buf;strcpy(password, PASSWORD);my_struct.a=password;b_main_sink(my_struct);}void b_main_sink(_struct_type my_struct){char * password=my_struct.a;{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.");}}}
void b_main_sink(_struct_type my_struct);static void main(){char * password;_struct_type my_struct;char password_buf[100]="";password=password_buf;{size_t password_len=0;fgets(password, 100, stdin);password_len=strlen(password);if (password_len > 0){password[password_len-1]='\0';}}my_struct.a=password;b_main_sink(my_struct);}void b_main_sink(_struct_type my_struct){char * password=my_struct.a;{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.");}}}