-
Notifications
You must be signed in to change notification settings - Fork 21
/
CSampleProvider.cpp
616 lines (559 loc) · 20.1 KB
/
CSampleProvider.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// CSampleProvider implements ICredentialProvider, which is the main
// interface that logonUI uses to decide which tiles to display.
// In this sample, we will display one tile that uses each of the nine
// available UI controls.
#include "IPtools.h"
#include <initguid.h>
#include "CSampleProvider.h"
#include "CSampleCredential.h"
#include "guid.h"
#include "registry.h"
CSampleProvider::CSampleProvider():
_cRef(1),
_pCredProviderUserArray(nullptr)
{
DllAddRef();
if (DEVELOPING) PrintLn("CSampleProvider created=======================");
}
CSampleProvider::~CSampleProvider()
{
/*if (_pCredential != nullptr)
{
_pCredential->Release();
_pCredential = nullptr;
}*/
_ReleaseEnumeratedCredentials();
if (_pCredProviderUserArray != nullptr)
{
_pCredProviderUserArray->Release();
_pCredProviderUserArray = nullptr;
}
if (DEVELOPING) PrintLn("=====================CSampleProvider destroyed");
DllRelease();
}
// SetUsageScenario is the provider's cue that it's going to be asked for tiles
// in a subsequent call.
HRESULT CSampleProvider::SetUsageScenario(
CREDENTIAL_PROVIDER_USAGE_SCENARIO cpus,
DWORD /*dwFlags*/)
{
HRESULT hr;
//logfile << "Scenario:";
if (DEVELOPING) PrintLn("Provider Scenario: %d", cpus);
//logfile << cpus;
//PrintLn(L"Scenario:");
//logfile << "\n";
// Decide which scenarios to support here. Returning E_NOTIMPL simply tells the caller
// that we're not designed for that scenario.
switch (cpus)
{
case CPUS_LOGON:
case CPUS_UNLOCK_WORKSTATION:
// The reason why we need _fRecreateEnumeratedCredentials is because ICredentialProviderSetUserArray::SetUserArray() is called after ICredentialProvider::SetUsageScenario(),
// while we need the ICredentialProviderUserArray during enumeration in ICredentialProvider::GetCredentialCount()
_cpus = cpus;
_fRecreateEnumeratedCredentials = true;
hr = S_OK;
break;
case CPUS_CREDUI:
case CPUS_CHANGE_PASSWORD:
//case CPUS_CREDUI:
hr = E_NOTIMPL;
break;
default:
hr = E_INVALIDARG;
break;
}
return hr;
}
// SetSerialization takes the kind of buffer that you would normally return to LogonUI for
// an authentication attempt. It's the opposite of ICredentialProviderCredential::GetSerialization.
// GetSerialization is implement by a credential and serializes that credential. Instead,
// SetSerialization takes the serialization and uses it to create a tile.
//
// SetSerialization is called for two main scenarios. The first scenario is in the credui case
// where it is prepopulating a tile with credentials that the user chose to store in the OS.
// The second situation is in a remote logon case where the remote client may wish to
// prepopulate a tile with a username, or in some cases, completely populate the tile and
// use it to logon without showing any UI.
//
// If you wish to see an example of SetSerialization, please see either the SampleCredentialProvider
// sample or the SampleCredUICredentialProvider sample. [The logonUI team says, "The original sample that
// this was built on top of didn't have SetSerialization. And when we decided SetSerialization was
// important enough to have in the sample, it ended up being a non-trivial amount of work to integrate
// it into the main sample. We felt it was more important to get these samples out to you quickly than to
// hold them in order to do the work to integrate the SetSerialization changes from SampleCredentialProvider
// into this sample.]
HRESULT CSampleProvider::SetSerialization(
_In_ CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION const * /*pcpcs*/)
{
if (DEVELOPING) PrintLn("Provider::SetSerialization");//that's the place to filter incoming SID from credentials supplied by NLA
HRESULT hr = E_INVALIDARG;/*
if ((CLSID_CSample == pcpcs->clsidCredentialProvider) || (CPUS_CREDUI == _cpus))
{
// Get the current AuthenticationPackageID that we are supporting
ULONG ulNegotiateAuthPackage;
hr = RetrieveNegotiateAuthPackage(&ulNegotiateAuthPackage);
if (SUCCEEDED(hr))
{
if (CPUS_CREDUI == _cpus)
{
if (CREDUIWIN_IN_CRED_ONLY & _dwCredUIFlags)
{
// If we are being told to enumerate only the incoming credential, we must not return
// success unless we can enumerate it. We'll set hr to failure here and let it be
// overridden if the enumeration logic below succeeds.
hr = E_INVALIDARG;
}
else if (_dwCredUIFlags & CREDUIWIN_AUTHPACKAGE_ONLY)
{
if (ulNegotiateAuthPackage == pcpcs->ulAuthenticationPackage)
{
// In the credui case, SetSerialization should only ever return S_OK if it is able to serialize the input cred.
// Unfortunately, SetSerialization had to be overloaded to indicate whether or not it will be able to GetSerialization
// for the specific Auth Package that is being requested for CREDUIWIN_AUTHPACKAGE_ONLY to work, so when that flag is
// set, it should return S_FALSE unless it is ALSO able to serialize the input cred, then it can return S_OK.
// So in this case, we can set it to be S_FALSE because we support the authpackage, and then if we
// can serialize the input cred, it will get overwritten with S_OK.
hr = S_FALSE;
}
else
{
//we don't support this auth package, so we want to let logonUI know that by failing
hr = E_INVALIDARG;
}
}
}
if ((ulNegotiateAuthPackage == pcpcs->ulAuthenticationPackage) &&
(0 < pcpcs->cbSerialization && pcpcs->rgbSerialization))
{
KERB_INTERACTIVE_UNLOCK_LOGON* pkil = (KERB_INTERACTIVE_UNLOCK_LOGON*)pcpcs->rgbSerialization;
if (KerbInteractiveLogon == pkil->Logon.MessageType)
{
// If there isn't a username, we can't serialize or create a tile for this credential.
if (0 < pkil->Logon.UserName.Length && pkil->Logon.UserName.Buffer)
{
if ((CPUS_CREDUI == _cpus) && (CREDUIWIN_PACK_32_WOW & _dwCredUIFlags))
{
BYTE* rgbNativeSerialization;
DWORD cbNativeSerialization;
if (SUCCEEDED(KerbInteractiveUnlockLogonRepackNative(pcpcs->rgbSerialization, pcpcs->cbSerialization, &rgbNativeSerialization, &cbNativeSerialization)))
{
KerbInteractiveUnlockLogonUnpackInPlace((PKERB_INTERACTIVE_UNLOCK_LOGON)rgbNativeSerialization, cbNativeSerialization);
_pkiulSetSerialization = (PKERB_INTERACTIVE_UNLOCK_LOGON)rgbNativeSerialization;
hr = S_OK;
}
}
else
{
BYTE* rgbSerialization;
rgbSerialization = (BYTE*)HeapAlloc(GetProcessHeap(), 0, pcpcs->cbSerialization);
HRESULT hrCreateCred = rgbSerialization ? S_OK : E_OUTOFMEMORY;
if (SUCCEEDED(hrCreateCred))
{
CopyMemory(rgbSerialization, pcpcs->rgbSerialization, pcpcs->cbSerialization);
KerbInteractiveUnlockLogonUnpackInPlace((KERB_INTERACTIVE_UNLOCK_LOGON*)rgbSerialization, pcpcs->cbSerialization);
if (_pkiulSetSerialization)
{
HeapFree(GetProcessHeap(), 0, _pkiulSetSerialization);
}
_pkiulSetSerialization = (KERB_INTERACTIVE_UNLOCK_LOGON*)rgbSerialization;
if (SUCCEEDED(hrCreateCred))
{
// we allow success to override the S_FALSE for the CREDUIWIN_AUTHPACKAGE_ONLY, but
// failure to create the cred shouldn't override that we can still handle
// the auth package
hr = hrCreateCred;
}
}
}
}
}
}
}
}*/
return hr;
}
// Called by LogonUI to give you a callback. Providers often use the callback if they
// some event would cause them to need to change the set of tiles that they enumerated.
HRESULT CSampleProvider::Advise(
_In_ ICredentialProviderEvents * /*pcpe*/,
_In_ UINT_PTR /*upAdviseContext*/)
{
if (DEVELOPING) PrintLn("Provider::Advise");
return E_NOTIMPL;
}
// Called by LogonUI when the ICredentialProviderEvents callback is no longer valid.
HRESULT CSampleProvider::UnAdvise()
{
if (DEVELOPING) PrintLn("Provider::UnAdvise");
return E_NOTIMPL;
}
// Called by LogonUI to determine the number of fields in your tiles. This
// does mean that all your tiles must have the same number of fields.
// This number must include both visible and invisible fields. If you want a tile
// to have different fields from the other tiles you enumerate for a given usage
// scenario you must include them all in this count and then hide/show them as desired
// using the field descriptors.
HRESULT CSampleProvider::GetFieldDescriptorCount(
_Out_ DWORD *pdwCount)
{
*pdwCount = SFI_NUM_FIELDS;
return S_OK;
}
// Gets the field descriptor for a particular field.
HRESULT CSampleProvider::GetFieldDescriptorAt(
DWORD dwIndex,
_Outptr_result_nullonfailure_ CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR **ppcpfd)
{
HRESULT hr;
*ppcpfd = nullptr;
// Verify dwIndex is a valid field.
if ((dwIndex < SFI_NUM_FIELDS) && ppcpfd)
{
hr = FieldDescriptorCoAllocCopy(s_rgCredProvFieldDescriptors[dwIndex], ppcpfd);
}
else
{
hr = E_INVALIDARG;
}
return hr;
}
// Sets pdwCount to the number of tiles that we wish to show at this time.
// Sets pdwDefault to the index of the tile which should be used as the default.
// The default tile is the tile which will be shown in the zoomed view by default. If
// more than one provider specifies a default the last used cred prov gets to pick
// the default. If *pbAutoLogonWithDefault is TRUE, LogonUI will immediately call
// GetSerialization on the credential you've specified as the default and will submit
// that credential for authentication without showing any further UI.
HRESULT CSampleProvider::GetCredentialCount(
_Out_ DWORD *pdwCount,
_Out_ DWORD *pdwDefault,
_Out_ BOOL *pbAutoLogonWithDefault)
{
if (DEVELOPING) PrintLn(L"GetCredentialCount");
*pdwDefault = CREDENTIAL_PROVIDER_NO_DEFAULT;
*pbAutoLogonWithDefault = FALSE;
if (_fRecreateEnumeratedCredentials)
{
_fRecreateEnumeratedCredentials = false;
_ReleaseEnumeratedCredentials();
_CreateEnumeratedCredentials();
}
DWORD dwUserCount;
HRESULT hr;
if (_pCredProviderUserArray != nullptr) {
hr = _pCredProviderUserArray->GetCount(&dwUserCount);
if (hr == 0) {
if (DEVELOPING) PrintLn(L"UserArrayCount:(%d)", dwUserCount);
}
else {
if (DEVELOPING) PrintLn(L"UserArray.GetCount Error");
dwUserCount = 1;
}
}
else {
if (DEVELOPING) PrintLn(L"Unassigned UserArray");
dwUserCount = 1;
}
if ((dwUserCount == 0) || (IsOS(OS_DOMAINMEMBER) == 1)) {
dwUserCount += 1;//display additional empty tile
if (DEVELOPING) PrintLn(L"Count +1 (empty tile)");
}
if (DEVELOPING) PrintLn(L"User count:(%d)", dwUserCount);
if (GetSystemMetrics(SM_REMOTESESSION)) {
//PrintLn("RDP connection");
*pdwCount = dwUserCount;//1
//get RDP port from registry
int RDPPort = 3389;//default RDPPort
PWSTR ipAddr;
// HRESULT hr;
RDPPort = readRegistryValueInteger(CONF_RDP_PORT, RDPPort);
PrintLn("RDP connection on port: %d", RDPPort);
hr = GetRDPClientAddress(RDPPort, &ipAddr);
if (hr == 0) {
PrintLn(L"Remote Addr: ", ipAddr);
//PrintLn(ipAddr);
CoTaskMemFree(ipAddr);
}
}
else {
if (DEVELOPING) PrintLn("Local connection");
//logfile << "Local connection\n";
if (readRegistryValueInteger(CONF_RDP_ONLY, 0)) {
if (DEVELOPING) PrintLn("Only RDP is PIN protected!!!");
*pdwCount = 0;//no filtering no OTP tile
}
else {
if (DEVELOPING) PrintLn("RDP and Local PIN protection");
*pdwCount = dwUserCount;//show OTP tile
}
if (DEVELOPING) {
PrintLn("OTP tile always visible");
*pdwCount = dwUserCount;//development - don't force but allow PIN in all scenarios
}
}
return S_OK;
}
// Returns the credential at the index specified by dwIndex. This function is called by logonUI to enumerate
// the tiles.
HRESULT CSampleProvider::GetCredentialAt(
DWORD dwIndex,
_Outptr_result_nullonfailure_ ICredentialProviderCredential **ppcpc)
{
if (DEVELOPING) PrintLn("GetCredentialAt: %d", (int)dwIndex);
HRESULT hr = E_INVALIDARG;
*ppcpc = nullptr;
if (DEVELOPING) PrintLn("Credential.size(%d)", _pCredential.size());
if ((dwIndex < _pCredential.size()) && ppcpc)
{
if (DEVELOPING) PrintLn("QueryInterface");
hr = _pCredential[dwIndex]->QueryInterface(IID_PPV_ARGS(ppcpc));
}
return hr;
}
// This function will be called by LogonUI after SetUsageScenario succeeds.
// Sets the User Array with the list of users to be enumerated on the logon screen.
HRESULT CSampleProvider::SetUserArray(_In_ ICredentialProviderUserArray *users)
{
//logfile << "SetUserArray\n";
if (DEVELOPING) PrintLn("SetUserArray");
if (_pCredProviderUserArray != nullptr)
{
_pCredProviderUserArray->Release();
}
_pCredProviderUserArray = users;
_pCredProviderUserArray->AddRef();
return S_OK;
}
void CSampleProvider::_CreateEnumeratedCredentials()
{
if (DEVELOPING) PrintLn("_CreateEnumeratedCredentials: %d", _cpus);
//logfile << "_CreateEnumeratedCredentials: ";
//logfile << _cpus;
//logfile << "\n";
switch (_cpus)
{
case CPUS_LOGON:
case CPUS_UNLOCK_WORKSTATION:
{
_EnumerateCredentials();
break;
}
default:
break;
}
}
void CSampleProvider::_ReleaseEnumeratedCredentials()
{
if (DEVELOPING) PrintLn("_ReleaseEnumeratedCredentials");
for (int i = 0; i < _pCredential.size(); i++) {
if (_pCredential[i] != nullptr)
{
_pCredential[i]->Release();
_pCredential[i] = nullptr;
}
}
_pCredential.clear();
}
HRESULT CSampleProvider::_EnumerateCredentials()
{
if (DEVELOPING) PrintLn("_EnumerateCredential");
HRESULT hr = E_UNEXPECTED;
DWORD dwUserCount = 0;
//logfile << "_EnumerateCredential\n";
if (_pCredProviderUserArray != nullptr)
{
//DWORD dwUserCount = 0;
_pCredProviderUserArray->GetCount(&dwUserCount);
if (dwUserCount > 0)
{
if (DEVELOPING) PrintLn(L"ProviderUserArrayGetCount: %d", dwUserCount);
//_pCredential = new CSampleCredential*[dwUserCount];
for (DWORD i = 0; i < dwUserCount; i++) {
ICredentialProviderUser *pCredUser;
hr = _pCredProviderUserArray->GetAt(i, &pCredUser);
if (SUCCEEDED(hr))
{
//_pCredential[i] = new(std::nothrow) CSampleCredential();
_pCredential.push_back(new(std::nothrow) CSampleCredential());
if (_pCredential[i] != nullptr)
{
//logfile << "new CSampleCredential()\n";
if (DEVELOPING) PrintLn("new Credential()");
hr = _pCredential[i]->Initialize(_cpus, s_rgCredProvFieldDescriptors, s_rgFieldStatePairs, pCredUser);
if (FAILED(hr))
{
_pCredential[i]->Release();
_pCredential[i] = nullptr;
if (DEVELOPING) PrintLn(L"User tile initialization failed");
}
else {
//PrintLn("initialized()");
//logfile << "initialized()\n";
//fwprintf(logfile, L"%s", _pCredential[i]->_pszUserSid);
//logfile << _pCredential[i]->_pszUserSid[15];
//PrintLn(_pCredential[i]->_pszUserSid);
if (DEVELOPING) PrintLn(L"UserSID: ", _pCredential[i]->_pszUserSid);
//logfile << " - User Added\n";
}
}
else
{
hr = E_OUTOFMEMORY;
}
pCredUser->Release();
}
}
}
else {
PrintLn("Empty User List");
//create empty user tile later
/*_pCredential.push_back(new(std::nothrow) CSampleCredential());
if (_pCredential[_pCredential.size()-1] != nullptr) {
hr = _pCredential[_pCredential.size()-1]->Initialize(_cpus, s_rgCredProvFieldDescriptors, s_rgFieldStatePairs, nullptr);
}*/
}
}
else {
PrintLn("Unassigned User List");
//it is probably Credential Provider V1 System...
//create empty user tile later
/*_pCredential.push_back(new(std::nothrow) CSampleCredential());
if (_pCredential[_pCredential.size() - 1] != nullptr) {
hr = _pCredential[_pCredential.size() - 1]->Initialize(_cpus, s_rgCredProvFieldDescriptors, s_rgFieldStatePairs, nullptr);
}*/
}
//if you are in a domain or have no users on the list you have to show "Other user tile"
if (DEVELOPING) PrintLn(L"IsOS(OS_DOMAINMEMBER): %d", IsOS(OS_DOMAINMEMBER));
if ((dwUserCount == 0) || (IsOS(OS_DOMAINMEMBER) == 1)) {
if (DEVELOPING) PrintLn(L"Adding empty user tile");
_pCredential.push_back(new(std::nothrow) CSampleCredential());
if (_pCredential[_pCredential.size() - 1] != nullptr) {
hr = _pCredential[_pCredential.size() - 1]->Initialize(_cpus, s_rgCredProvFieldDescriptors, s_rgFieldStatePairs, nullptr);
}
else {
if (DEVELOPING) PrintLn(L"Error adding user: %d", _pCredential.size());
}
}
return hr;
}
// Boilerplate code to create our provider.
HRESULT CSample_CreateInstance(_In_ REFIID riid, _Outptr_ void **ppv)
{
if (DEVELOPING) PrintLn("Provider_CreateInstance");
HRESULT hr;
CSampleProvider *pProvider = new(std::nothrow) CSampleProvider();
if (pProvider)
{
hr = pProvider->QueryInterface(riid, ppv);
pProvider->Release();
}
else
{
hr = E_OUTOFMEMORY;
}
return hr;
}
// Boilerplate code to create our provider. ADDED BY TBW FOR FILTER
HRESULT CLMSFilter_CreateInstance(__in REFIID riid, __deref_out void** ppv)
{
if (DEVELOPING) PrintLn("Filter_CreateInstance");
HRESULT hr;
CLMSFilter* pProvider = new CLMSFilter();
//CSampleProvider* pProvider = new CSampleProvider();
if (pProvider)
{
hr = pProvider->QueryInterface(riid, ppv);
pProvider->Release();
}
else
{
hr = E_OUTOFMEMORY;
}
return hr;
}
HRESULT CLMSFilter::Filter(CREDENTIAL_PROVIDER_USAGE_SCENARIO cpus, DWORD dwFlags, GUID* rgclsidProviders, BOOL* rgbAllow, DWORD cProviders)
{
LPOLESTR clsid;//PWSTR
int isRDP;
int onlyRDP = 0;//Local and RDP
//clsid = (PWSTR)CoTaskMemAlloc(sizeof(wchar_t) * (260 + 1));
/*PrintLn("================TEST======================");
PWSTR path;
if (readRegistryValueString(CONF_PATH, &path)) {
PrintLn(path);
CoTaskMemFree(path);
}
PrintLn("================END=======================");*/
//return S_OK;
if (DEVELOPING) PrintLn("=============Applying Filter==============");
isRDP = GetSystemMetrics(SM_REMOTESESSION);
if (!isRDP) {
if (readRegistryValueInteger(CONF_RDP_ONLY, onlyRDP)) {
if (DEVELOPING) PrintLn("Only RDP is PIN protected!!!");
//isRDP = FALSE;
return S_OK;
}
else {
if (DEVELOPING) PrintLn("RDP and Local PIN protection");
isRDP = TRUE;
}
}
switch (cpus)
{
case CPUS_LOGON:
case CPUS_UNLOCK_WORKSTATION:
if (DEVELOPING) PrintLn("<Filter>");
for (DWORD i = 0; i < cProviders; i++)
{
if (i < dwFlags) {}
if (IsEqualGUID(rgclsidProviders[i], CLSID_CSample)) {
rgbAllow[i] = isRDP;// TRUE;
} else {
rgbAllow[i] = !isRDP;// FALSE;
}
if (DEVELOPING) {
StringFromCLSID(rgclsidProviders[i], &clsid);
if (rgbAllow[i] == FALSE) {
PrintLn(L"\t-", clsid);
}
else {
PrintLn(L"\t+", clsid);
}
CoTaskMemFree(clsid);
}
}
if (DEVELOPING) PrintLn("</Filter>");
return S_OK;
case CPUS_CREDUI: //issue #1
case CPUS_CHANGE_PASSWORD:
return E_NOTIMPL;
default:
return E_INVALIDARG;
}
}
CLMSFilter::CLMSFilter() :
_cRef(1)
{
if (DEVELOPING) PrintLn(L"CLMSFilter.Create");
DllAddRef();
}
CLMSFilter::~CLMSFilter()
{
if (DEVELOPING) PrintLn(L"CLMSFilter.Destroy");
DllRelease();
}
HRESULT CLMSFilter::UpdateRemoteCredential(const CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION *pcpsIn, CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION *pcpcsOut)
{
if (DEVELOPING) PrintLn("UpdateRemoteCredential");
return E_NOTIMPL;
}