目前在ARM版Windows上使用凭据提供者还存在一些问题,不过可以对凭据提供者的代码进行修改以使其在ARM版Windows上正常工作。
以CredUIPromptForWindowsCredentials API为例,可以使用下面的代码实现在ARM版Windows上的凭据提供者工作:
// Get the credential provider for Windows (assume x86/neon version).
PCREDENTIAL_PROVIDER pCredProv = new CWindowsCredentialProvider();
// Release and get the credential provider for ARM.
pCredProv->Release();
pCredProv = new CWindowsCredentialProviderARM();
// Show the prompt using the credential provider for ARM.
DWORD authResult = ERROR_CANCELLED;
PCREDENTIALS pCreds = NULL;
BOOL bSave = FALSE;
HRESULT hr = CredUIPromptForWindowsCredentials(
&uiInfo, // Pointer to credential prompt information.
0, // Auth package.
NULL, // Reserved.
0, // Flags.
pCredProv, // Pointer to credential provider.
NULL, // Pointer to out-of-band data.
0, // Size of out-of-band data.
&pCreds, // Receives the credentials entered by the user.
&bSave, // Whether to save the credentials.
&authResult); // Authentication result.
其中,ARM版的凭据提供者CWindowsCredentialProviderARM需要自己实现。
上一篇:arm版文件传到ubuntu
下一篇:armbiandebian