/[openpgpmdrv]/trunk/OpenPGPminidriver/DllMain.c
ViewVC logotype

Diff of /trunk/OpenPGPminidriver/DllMain.c

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

revision 11 by vletoux, Tue Feb 23 19:18:59 2010 UTC revision 12 by vletoux, Wed Mar 31 08:58:46 2010 UTC
# Line 17  Line 17 
17    
18  #include <windows.h>  #include <windows.h>
19    
20    BOOL fRunOnVistaAndLater;
21    
22    BOOL Is_Vista_or_Later ()
23    {
24       OSVERSIONINFOEX osvi;
25       DWORDLONG dwlConditionMask = 0;
26       int op=VER_GREATER_EQUAL;
27    
28       // Initialize the OSVERSIONINFOEX structure.
29    
30       ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
31       osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
32       osvi.dwMajorVersion = 6;
33    
34       // Initialize the condition mask.
35       VER_SET_CONDITION( dwlConditionMask, VER_MAJORVERSION, op );
36    
37       // Perform the test.
38       return VerifyVersionInfo(
39          &osvi,
40          VER_MAJORVERSION,
41          dwlConditionMask);
42    }
43    
44  /** This function provides handling for load/unload and attach/detach notifications  /** This function provides handling for load/unload and attach/detach notifications
45  to allow the DLL to manage its state and allocated resources. For more information,  to allow the DLL to manage its state and allocated resources. For more information,
# Line 31  BOOL WINAPI DllMain(HINSTANCE    hinstDL Line 54  BOOL WINAPI DllMain(HINSTANCE    hinstDL
54     // Perform actions based on the reason for calling.     // Perform actions based on the reason for calling.
55     if (dwReason == DLL_PROCESS_ATTACH)     if (dwReason == DLL_PROCESS_ATTACH)
56     {     {
57               fRunOnVistaAndLater = Is_Vista_or_Later();
58             return TRUE;             return TRUE;
59     }     }
60     else     else

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26