1 | /* |
---|
2 | * Estonian ID card plugin for web browsers |
---|
3 | * |
---|
4 | * Copyright (C) 2010-2011 Codeborne <info@codeborne.com> |
---|
5 | * |
---|
6 | * This is free software; you can redistribute it and/or |
---|
7 | * modify it under the terms of the GNU Lesser General Public |
---|
8 | * License as published by the Free Software Foundation; either |
---|
9 | * version 2.1 of the License, or (at your option) any later version. |
---|
10 | * |
---|
11 | * This software is distributed in the hope that it will be useful, |
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
14 | * Lesser General Public License for more details. |
---|
15 | * |
---|
16 | * You should have received a copy of the GNU Lesser General Public |
---|
17 | * License along with this library; if not, write to the Free Software |
---|
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
---|
19 | * |
---|
20 | */ |
---|
21 | |
---|
22 | #ifndef __CERT_DIAOLG_WIN_H__ |
---|
23 | #define __CERT_DIAOLG_WIN_H__ |
---|
24 | |
---|
25 | #include <windows.h> |
---|
26 | #include <cryptuiapi.h> |
---|
27 | #include <ncrypt.h> |
---|
28 | |
---|
29 | #ifdef __cplusplus |
---|
30 | extern "C" { |
---|
31 | #endif |
---|
32 | typedef BOOL (WINAPI * PFNCCERTDISPLAYPROC)( |
---|
33 | __in PCCERT_CONTEXT pCertContext, |
---|
34 | __in HWND hWndSelCertDlg, |
---|
35 | __in void *pvCallbackData |
---|
36 | ); |
---|
37 | |
---|
38 | typedef struct _CRYPTUI_SELECTCERTIFICATE_STRUCT { |
---|
39 | DWORD dwSize; |
---|
40 | HWND hwndParent; |
---|
41 | DWORD dwFlags; |
---|
42 | LPCWSTR szTitle; |
---|
43 | DWORD dwDontUseColumn; |
---|
44 | LPCWSTR szDisplayString; |
---|
45 | PFNCFILTERPROC pFilterCallback; |
---|
46 | PFNCCERTDISPLAYPROC pDisplayCallback; |
---|
47 | void * pvCallbackData; |
---|
48 | DWORD cDisplayStores; |
---|
49 | HCERTSTORE * rghDisplayStores; |
---|
50 | DWORD cStores; |
---|
51 | HCERTSTORE * rghStores; |
---|
52 | DWORD cPropSheetPages; |
---|
53 | LPCPROPSHEETPAGEW rgPropSheetPages; |
---|
54 | HCERTSTORE hSelectedCertStore; |
---|
55 | } CRYPTUI_SELECTCERTIFICATE_STRUCT, *PCRYPTUI_SELECTCERTIFICATE_STRUCT; |
---|
56 | |
---|
57 | typedef const CRYPTUI_SELECTCERTIFICATE_STRUCT *PCCRYPTUI_SELECTCERTIFICATE_STRUCT; |
---|
58 | PCCERT_CONTEXT WINAPI CryptUIDlgSelectCertificateW( |
---|
59 | _In_ PCCRYPTUI_SELECTCERTIFICATE_STRUCT pcsc |
---|
60 | ); |
---|
61 | |
---|
62 | #define CryptUIDlgSelectCertificate CryptUIDlgSelectCertificateW |
---|
63 | |
---|
64 | BOOL isCardInReader(PCCERT_CONTEXT certContext); |
---|
65 | |
---|
66 | BOOL WINAPI filter_proc(PCCERT_CONTEXT, BOOL *, void *); |
---|
67 | #ifdef __cplusplus |
---|
68 | } |
---|
69 | #endif |
---|
70 | #endif |
---|