Article View: cis.winnt.admin-security
Article #60CoInitializeSecurity call is not working
From: Alexander Cheng
Date: Mon, 21 Jun 1999 00:00
Date: Mon, 21 Jun 1999 00:00
29 lines
1752 bytes
1752 bytes
I tried to get client's name by using CoInitializeSecurity() and
CoQueryClientBlanket() functions. But CoInitializeSecurity() function I
implemented as followed always return the result = -2147221008 switch to
default. Can anyone tell me what wrong in my parameters? Thanks.
SOLE_AUTHENTICATION_SERVICE serv;
serv.pPrincipalName = NULL;
serv.dwAuthnSvc = RPC_C_AUTHN_NONE;
serv.dwAuthzSvc = RPC_C_AUTHZ_DCE;
HRESULT retCode = CoInitializeSecurity(NULL, -1, &serv, NULL,\
RPC_C_AUTHN_LEVEL_NONE, NULL, NULL,\
EOAC_NONE, NULL);
switch(retCode)
{
case S_OK:
TRACE0("CoInitializeSecurity Success.\n");
break;
case RPC_E_TOO_LATE:
TRACE0("CoInitializeSecurity has already been called.\n");
break;
case RPC_E_NO_GOOD_SECURITY_PACKAGES:
TRACE0("asAuthSvc was not NULL and none of the authentication
services in the list could be registered.\n");
break;
default:
TRACE0("Fail call CoInitializeSecurity.\n");
break;
}
Technical Details
Message-ID:
<7kmbtq$j71$1@news.connect.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f977f,7f1407c5f874fe26,start X-Google-Attributes: gidf977f,public X-Google-Thread: 10be66,7f1407c5f874fe26,start X-Google-Attributes: gid10be66,public From: "Alexander Cheng" <acheng@symon.com> Subject: CoInitializeSecurity call is not working Date: 1999/06/21 Message-ID: <7kmbtq$j71$1@news.connect.net> X-Deja-AN: 492265837 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Complaints-To: abuse@connect.net X-Trace: news.connect.net 930001658 19681 208.6.148.221 (21 Jun 1999 21:47:38 GMT) Organization: ConnectNet, Inc. NNTP-Posting-Date: 21 Jun 1999 21:47:38 GMT Newsgroups: cis.winnt.admin-security,comp.os.ms-windows.nt.admin.security