/[openpgpmdrv]/trunk/OpenPGPminidriverTest/PublicDataOperations.cpp
ViewVC logotype

Diff of /trunk/OpenPGPminidriverTest/PublicDataOperations.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 8 by vletoux, Thu Mar 11 20:32:26 2010 UTC revision 11 by vletoux, Thu Mar 18 16:03:39 2010 UTC
# Line 106  DWORD ViewFile(HWND hWnd) Line 106  DWORD ViewFile(HWND hWnd)
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                  {                  {
# Line 123  DWORD ViewFile(HWND hWnd) Line 124  DWORD ViewFile(HWND hWnd)
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
# Line 140  DWORD ViewFile(HWND hWnd) Line 155  DWORD ViewFile(HWND hWnd)
155                  if (pbData)                  if (pbData)
156                          pCardData->pfnCspFree(pbData);                          pCardData->pfnCspFree(pbData);
157          }          }
158          return 0;          return dwReturn;
159  }  }

Legend:
Removed from v.8  
changed lines
  Added in v.11

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26