Mercurial > trustbridge
diff cinst/windowsstore.c @ 185:ee37c085b9f7
Try to handle crypt32 errors. Print the error code as fallback
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 25 Mar 2014 18:03:49 +0000 |
parents | 8cfcd38a9bb3 |
children | 292e2cb60ef0 |
line wrap: on
line diff
--- a/cinst/windowsstore.c Tue Mar 25 18:03:00 2014 +0000 +++ b/cinst/windowsstore.c Tue Mar 25 18:03:49 2014 +0000 @@ -17,7 +17,7 @@ NULL, err, 0, (LPWSTR) &bufPtr, 0, NULL); if (!bufPtr) { - HMODULE hWinhttp = GetModuleHandleW (L"winhttp"); + HMODULE hWinhttp = GetModuleHandleW (L"crypt32"); if (hWinhttp) { FormatMessageW (FORMAT_MESSAGE_ALLOCATE_BUFFER | @@ -28,7 +28,7 @@ } } if (!bufPtr) - printf ("Error getting last error\n"); + printf ("Error getting last error for code: %lx \n", err); return bufPtr; }