比如 要想向 \\192.168.111.11\c$\下载和上传 test.txt
 系统管理员帐户为 administrator / 123456

解决方案 »

  1.   

    BOOL LogonUser(    LPTSTR lpszUsername, // string that specifies the user name
        LPTSTR lpszDomain, // string that specifies the domain or server
        LPTSTR lpszPassword, // string that specifies the password
        DWORD dwLogonType, // specifies the type of logon operation
        DWORD dwLogonProvider, // specifies the logon provider
        PHANDLE phToken // pointer to variable to receive token handle
       );