When I rebuild by release mode, I got an error. "error C2664: 'InitializeSecurityContextA' : cannot convert parameter 3 from 'SEC_WCHAR *' to 'SEC_CHAR *'", but rebuild by debug mode, can build it succeed.
Paste code:
SECURITY_STATUS sResult = InitializeSecurityContext( phCredential,
NULL, const_cast<SEC_WCHAR*>(pwszServerPrincipalName),
reqContextAttributes,
0,
SECURITY_NATIVE_DREP,
NULL,
0,
this->contextHandle,
&outBuffDesc, pulContextAttributes,
&tsLifeSpan );
.NET Development21
|