]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - windows/wincapi.c
first pass
[PuTTY.git] / windows / wincapi.c
1 /*
2  * wincapi.c: implementation of wincapi.h.
3  */
4
5 #include "putty.h"
6
7 #if !defined NO_SECURITY
8
9 #define WINCAPI_GLOBAL
10 #include "wincapi.h"
11
12 int got_crypt(void)
13 {
14     static int attempted = FALSE;
15     static int successful;
16     static HMODULE crypt;
17
18     if (!attempted) {
19         attempted = TRUE;
20         crypt = load_system32_dll("crypt32.dll");
21         successful = crypt &&
22             GET_WINDOWS_FUNCTION(crypt, CryptProtectMemory);
23     }
24     return successful;
25 }
26
27 #endif /* !defined NO_SECURITY */