Hex Artifact Content

Not logged in

Artifact 6c13098b7fb6c6bbd1f31a9aae4e10fcfc27b3d6:


0000: 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  /***************
0010: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
0020: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
0030: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
0040: 2a 2a 2a 2a 2a 2a 2a 2a 5c 0a 2a 20 20 20 20 20  ********\.*     
0050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0060: 20 20 20 20 20 20 20 20 20 20 20 63 6f 72 65 2e             core.
0070: 64 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  d               
0080: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0090: 20 20 2a 0a 2a 20 20 20 20 20 20 20 20 20 20 20    *.*           
00a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
00b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
00c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
00d0: 20 20 20 20 20 20 20 20 20 20 20 20 2a 0a 2a 20              *.* 
00e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
00f0: 20 20 20 48 65 6c 70 65 72 20 6d 6f 64 75 6c 65     Helper module
0100: 20 66 6f 72 20 74 68 65 20 57 69 6e 64 6f 77 73   for the Windows
0110: 20 41 50 49 20 20 20 20 20 20 20 20 20 20 20 20   API            
0120: 20 20 20 20 20 20 2a 0a 2a 20 20 20 20 20 20 20        *.*       
0130: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0140: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0150: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0160: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0170: 2a 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20  *.*             
0180: 20 20 20 20 20 20 20 20 20 20 50 6c 61 63 65 64            Placed
0190: 20 69 6e 74 6f 20 70 75 62 6c 69 63 20 64 6f 6d   into public dom
01a0: 61 69 6e 20 20 20 20 20 20 20 20 20 20 20 20 20  ain             
01b0: 20 20 20 20 20 20 20 20 20 20 2a 0a 5c 2a 2a 2a            *.\***
01c0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
01d0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
01e0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
01f0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
0200: 2a 2a 2a 2a 2f 0a 6d 6f 64 75 6c 65 20 77 69 6e  ****/.module win
0210: 33 32 2e 63 6f 72 65 3b 0a 0a 2f 2a 2a 0a 20 54  32.core;../**. T
0220: 68 65 20 63 6f 72 65 20 57 69 6e 64 6f 77 73 20  he core Windows 
0230: 41 50 49 20 66 75 6e 63 74 69 6f 6e 73 2e 0a 0a  API functions...
0240: 20 49 6d 70 6f 72 74 69 6e 67 20 74 68 69 73 20   Importing this 
0250: 66 69 6c 65 20 69 73 20 65 71 75 69 76 61 6c 65  file is equivale
0260: 6e 74 20 74 6f 20 74 68 65 20 43 20 63 6f 64 65  nt to the C code
0270: 3a 0a 20 2d 2d 2d 0a 20 23 64 65 66 69 6e 65 20  :. ---. #define 
0280: 57 49 4e 33 32 5f 4c 45 41 4e 5f 41 4e 44 5f 4d  WIN32_LEAN_AND_M
0290: 45 41 4e 0a 20 23 69 6e 63 6c 75 64 65 20 22 77  EAN. #include "w
02a0: 69 6e 64 6f 77 73 2e 68 22 0a 20 2d 2d 2d 0a 0a  indows.h". ---..
02b0: 2a 2f 0a 0a 70 75 62 6c 69 63 20 69 6d 70 6f 72  */..public impor
02c0: 74 20 77 69 6e 33 32 2e 77 69 6e 64 65 66 3b 0a  t win32.windef;.
02d0: 70 75 62 6c 69 63 20 69 6d 70 6f 72 74 20 77 69  public import wi
02e0: 6e 33 32 2e 77 69 6e 6e 74 3b 0a 70 75 62 6c 69  n32.winnt;.publi
02f0: 63 20 69 6d 70 6f 72 74 20 77 69 6e 33 32 2e 77  c import win32.w
0300: 69 6e 63 6f 6e 3b 0a 70 75 62 6c 69 63 20 69 6d  incon;.public im
0310: 70 6f 72 74 20 77 69 6e 33 32 2e 77 69 6e 62 61  port win32.winba
0320: 73 65 3b 0a 70 75 62 6c 69 63 20 69 6d 70 6f 72  se;.public impor
0330: 74 20 77 69 6e 33 32 2e 77 69 6e 67 64 69 3b 0a  t win32.wingdi;.
0340: 70 75 62 6c 69 63 20 69 6d 70 6f 72 74 20 77 69  public import wi
0350: 6e 33 32 2e 77 69 6e 75 73 65 72 3b 0a 70 75 62  n32.winuser;.pub
0360: 6c 69 63 20 69 6d 70 6f 72 74 20 77 69 6e 33 32  lic import win32
0370: 2e 77 69 6e 6e 6c 73 3b 0a 70 75 62 6c 69 63 20  .winnls;.public 
0380: 69 6d 70 6f 72 74 20 77 69 6e 33 32 2e 77 69 6e  import win32.win
0390: 76 65 72 3b 0a 70 75 62 6c 69 63 20 69 6d 70 6f  ver;.public impo
03a0: 72 74 20 77 69 6e 33 32 2e 77 69 6e 6e 65 74 77  rt win32.winnetw
03b0: 6b 3b 0a 0a 2f 2f 20 57 65 20 63 61 6e 27 74 20  k;..// We can't 
03c0: 75 73 65 20 73 74 61 74 69 63 20 69 66 20 66 6f  use static if fo
03d0: 72 20 69 6d 70 6f 72 74 73 2c 20 62 75 69 6c 64  r imports, build
03e0: 20 67 65 74 73 20 63 6f 6e 66 75 73 65 64 2e 0a   gets confused..
03f0: 2f 2f 20 73 74 61 74 69 63 20 69 66 20 28 5f 57  // static if (_W
0400: 49 4e 33 32 5f 57 49 4e 4e 54 5f 4f 4e 4c 59 29  IN32_WINNT_ONLY)
0410: 20 69 6d 70 6f 72 74 20 77 69 6e 33 32 2e 77 69   import win32.wi
0420: 6e 73 76 63 3b 0a 76 65 72 73 69 6f 6e 20 28 57  nsvc;.version (W
0430: 69 6e 64 6f 77 73 56 69 73 74 61 29 20 7b 0a 09  indowsVista) {..
0440: 76 65 72 73 69 6f 6e 20 3d 20 57 49 4e 33 32 5f  version = WIN32_
0450: 57 49 4e 4e 54 5f 4f 4e 4c 59 3b 0a 7d 20 65 6c  WINNT_ONLY;.} el
0460: 73 65 20 76 65 72 73 69 6f 6e 20 28 57 69 6e 64  se version (Wind
0470: 6f 77 73 32 30 30 33 29 20 7b 0a 09 76 65 72 73  ows2003) {..vers
0480: 69 6f 6e 20 3d 20 57 49 4e 33 32 5f 57 49 4e 4e  ion = WIN32_WINN
0490: 54 5f 4f 4e 4c 59 3b 0a 7d 20 65 6c 73 65 20 76  T_ONLY;.} else v
04a0: 65 72 73 69 6f 6e 20 28 57 69 6e 64 6f 77 73 58  ersion (WindowsX
04b0: 50 29 20 7b 0a 09 76 65 72 73 69 6f 6e 20 3d 20  P) {..version = 
04c0: 57 49 4e 33 32 5f 57 49 4e 4e 54 5f 4f 4e 4c 59  WIN32_WINNT_ONLY
04d0: 3b 0a 7d 20 65 6c 73 65 20 76 65 72 73 69 6f 6e  ;.} else version
04e0: 20 28 57 69 6e 64 6f 77 73 4e 54 6f 6e 6c 79 29   (WindowsNTonly)
04f0: 20 7b 0a 09 76 65 72 73 69 6f 6e 20 3d 20 57 49   {..version = WI
0500: 4e 33 32 5f 57 49 4e 4e 54 5f 4f 4e 4c 59 3b 0a  N32_WINNT_ONLY;.
0510: 7d 0a 0a 76 65 72 73 69 6f 6e 20 28 57 49 4e 33  }..version (WIN3
0520: 32 5f 57 49 4e 4e 54 5f 4f 4e 4c 59 29 20 7b 0a  2_WINNT_ONLY) {.
0530: 09 70 75 62 6c 69 63 20 69 6d 70 6f 72 74 20 77  .public import w
0540: 69 6e 33 32 2e 77 69 6e 73 76 63 3b 0a 7d 0a     in32.winsvc;.}.