106 |
__leave; |
__leave; |
107 |
} |
} |
108 |
SendMessageA( GetDlgItem(hWnd,IDC_FILES), LB_GETTEXT,iItem,(LPARAM)szFileName); |
SendMessageA( GetDlgItem(hWnd,IDC_FILES), LB_GETTEXT,iItem,(LPARAM)szFileName); |
109 |
|
|
110 |
szFile = strchr(szFileName,'\\'); |
szFile = strchr(szFileName,'\\'); |
111 |
if (szFile) |
if (szFile) |
112 |
{ |
{ |
124 |
{ |
{ |
125 |
__leave; |
__leave; |
126 |
} |
} |
127 |
for(DWORD dwI = 0; dwI < dwSize; dwI++) |
if (strcmp(szDirectory, "openpgp") == 0 && strcmp(szFile, "certific") == 0 ) |
128 |
|
{ |
129 |
|
PCCERT_CONTEXT pCertContext = CertCreateCertificateContext( X509_ASN_ENCODING , pbData, dwSize); |
130 |
|
if (!pCertContext) |
131 |
|
{ |
132 |
|
dwReturn = GetLastError(); |
133 |
|
__leave; |
134 |
|
} |
135 |
|
ViewCertificate(hWnd, pCertContext); |
136 |
|
CertFreeCertificateContext(pCertContext); |
137 |
|
} |
138 |
|
else |
139 |
{ |
{ |
140 |
_stprintf_s(szData,ARRAYSIZE(szData),TEXT("%02X "),pbData[dwI]); |
for(DWORD dwI = 0; dwI < dwSize; dwI++) |
141 |
SendMessage( // returns LRESULT in lResult |
{ |
142 |
GetDlgItem(hWnd, IDC_CONTENT), // (HWND) handle to destination control |
_stprintf_s(szData,ARRAYSIZE(szData),TEXT("%02X "),pbData[dwI]); |
143 |
EM_REPLACESEL, // (UINT) message ID |
SendMessage( // returns LRESULT in lResult |
144 |
FALSE, // = () wParam; |
GetDlgItem(hWnd, IDC_CONTENT), // (HWND) handle to destination control |
145 |
(LPARAM)szData // = (LPARAM)(LPCTSTR) lParam; |
EM_REPLACESEL, // (UINT) message ID |
146 |
); |
FALSE, // = () wParam; |
147 |
|
(LPARAM)szData // = (LPARAM)(LPCTSTR) lParam; |
148 |
|
); |
149 |
|
|
150 |
|
} |
151 |
} |
} |
152 |
} |
} |
153 |
__finally |
__finally |
155 |
if (pbData) |
if (pbData) |
156 |
pCardData->pfnCspFree(pbData); |
pCardData->pfnCspFree(pbData); |
157 |
} |
} |
158 |
return 0; |
return dwReturn; |
159 |
} |
} |