1 | Note: This module is based on the official Microsoft Credential Provider examples, downloaded from
|
---|
2 | http://www.microsoft.com/downloads/details.aspx?FamilyID=1287ec56-77b4-48c4-8b58-35b7295d6c2c&displaylang=en
|
---|
3 |
|
---|
4 | Brief Description:
|
---|
5 | 5384 (Beta 2)
|
---|
6 | Windows Vista Beta 2 Credential Provider Samples
|
---|
7 |
|
---|
8 | File Name: Beta 2 Credential Provider Samples.zip
|
---|
9 | Version: 1.0
|
---|
10 | Date Published: 6/25/2006
|
---|
11 | Language: English
|
---|
12 | Download Size: 874 KB
|
---|
13 |
|
---|
14 |
|
---|
15 | //
|
---|
16 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
---|
17 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
---|
18 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
---|
19 | // PARTICULAR PURPOSE.
|
---|
20 | //
|
---|
21 | // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
|
---|
22 | //
|
---|
23 | //
|
---|
24 | Overview
|
---|
25 | --------
|
---|
26 | This sample implements a simple credential provider. A credential provider allows a 3rd
|
---|
27 | party to provide an alternate way of logging on. For example, a fingerprint solution vendor
|
---|
28 | would write a credential provider to interact with the user and send the appropriate
|
---|
29 | credentials to the system for authentication. Questions should be sent to
|
---|
30 | [email protected].
|
---|
31 |
|
---|
32 | This sample implements a simplified credential provider that is based on the password
|
---|
33 | credential provider that ships with Windows Vista. When run, the credential provider
|
---|
34 | should enumerate two tiles, one for the administrator and one for the guest account. Note
|
---|
35 | that unless your machine is non-domain joined and you have enabled the guest account, it is
|
---|
36 | likely that the guest account is disabled and you will receive an error if you try to use that
|
---|
37 | tile to log on.
|
---|
38 |
|
---|
39 | Please also see Windows Vista Credential Provider Samples Overview.doc, included in this package
|
---|
40 |
|
---|
41 | How to run this sample
|
---|
42 | --------------------------------
|
---|
43 | Once you have built the project, copy samplecredentialprovider.dll to the System32 directory
|
---|
44 | on a Vista machine and run Register.reg from an elevated command prompt. The credential
|
---|
45 | should appear the next time a logon is invoked (such as when logging off or rebooting the machine).
|
---|
46 |
|
---|
47 | What this sample demonstrates
|
---|
48 | -----------------------------
|
---|
49 | This sample demonstrates simple password based log on and unlock behavior. It also shows how to construct
|
---|
50 | a simple user tile and handle the user interaction with that tile.
|
---|
51 |
|
---|
52 | What this sample does not demonstrate
|
---|
53 | -------------------------------------
|
---|
54 | - other credential provider scenarios, like participating in credui or handling change password.
|
---|
55 | - every possible field that you can put in your user tile
|
---|
56 | - any network access prior to local authentication (the Pre-Logon Access Provider (PLAP) behavior)
|
---|
57 | - an event based credential provider (like a smartcard or fingerprint based system)
|
---|
58 |
|
---|
59 | Parts of the sample
|
---|
60 | -------------------
|
---|
61 | common.h - sets up what a tile looks like
|
---|
62 | CSampleCredential.h/CSampleCredential.cpp - implements ICredentialProviderCredential, which describes one tile
|
---|
63 | CSampleProvider.h/CSampleProvider.cpp - implements ICredentialProvider, which is the main interface used by LogonUI
|
---|
64 | to talk to a credential provider.
|
---|
65 | Dll.h/Dll.cpp - standard dll setup for a dll that implements COM objects
|
---|
66 | helpers.h/helpers.cpp - useful functionality to deal with serializing credentials, UNICODE_STRING's, etc
|
---|