Hex Artifact Content

Not logged in

Artifact 8fb075b61afe872c19d9cbb1afb9823c50a81f8e:


0000: 6d 6f 64 75 6c 65 20 77 69 6e 33 32 2e 64 69 72  module win32.dir
0010: 65 63 74 78 2e 64 69 6e 70 75 74 38 3b 0d 0a 0d  ectx.dinput8;...
0020: 0a 2f 2f 69 6d 70 6f 72 74 20 74 61 6e 67 6f 2e  .//import tango.
0030: 73 79 73 2e 77 69 6e 33 32 2e 54 79 70 65 73 3b  sys.win32.Types;
0040: 0d 0a 2f 2f 61 6c 69 61 73 20 63 68 61 72 20 43  ..//alias char C
0050: 48 41 52 3b 0d 0a 0d 0a 69 6d 70 6f 72 74 20 77  HAR;....import w
0060: 69 6e 33 32 2e 77 69 6e 64 6f 77 73 3b 0d 0a 0d  in32.windows;...
0070: 0a 65 6e 75 6d 20 7b 0d 0a 09 43 4c 41 53 53 5f  .enum {...CLASS_
0080: 45 5f 4e 4f 41 47 47 52 45 47 41 54 49 4f 4e 20  E_NOAGGREGATION 
0090: 3d 20 63 61 73 74 28 69 6e 74 29 20 30 78 38 30  = cast(int) 0x80
00a0: 30 34 30 31 31 30 2c 0d 0a 7d 0d 0a 0d 0a 69 6e  040110,..}....in
00b0: 74 65 72 66 61 63 65 20 49 55 6e 6b 6e 6f 77 6e  terface IUnknown
00c0: 20 7b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20   {..    HRESULT 
00d0: 51 75 65 72 79 49 6e 74 65 72 66 61 63 65 28 49  QueryInterface(I
00e0: 49 44 2a 20 72 69 69 64 2c 20 76 6f 69 64 2a 2a  ID* riid, void**
00f0: 20 70 76 4f 62 6a 65 63 74 29 3b 0d 0a 20 20 20   pvObject);..   
0100: 20 55 4c 4f 4e 47 20 41 64 64 52 65 66 28 29 3b   ULONG AddRef();
0110: 0d 0a 20 20 20 20 55 4c 4f 4e 47 20 52 65 6c 65  ..    ULONG Rele
0120: 61 73 65 28 29 3b 0d 0a 7d 0d 0a 0d 0a 65 78 74  ase();..}....ext
0130: 65 72 6e 28 43 29 3a 0d 0a 0d 0a 73 74 72 75 63  ern(C):....struc
0140: 74 20 44 49 44 45 56 49 43 45 49 4e 53 54 41 4e  t DIDEVICEINSTAN
0150: 43 45 41 0d 0a 7b 0d 0a 20 20 20 20 44 57 4f 52  CEA..{..    DWOR
0160: 44 20 20 20 64 77 53 69 7a 65 3b 0d 0a 20 20 20  D   dwSize;..   
0170: 20 47 55 49 44 20 20 20 20 67 75 69 64 49 6e 73   GUID    guidIns
0180: 74 61 6e 63 65 3b 0d 0a 20 20 20 20 47 55 49 44  tance;..    GUID
0190: 20 20 20 20 67 75 69 64 50 72 6f 64 75 63 74 3b      guidProduct;
01a0: 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 64 77  ..    DWORD   dw
01b0: 44 65 76 54 79 70 65 3b 0d 0a 20 20 20 20 43 48  DevType;..    CH
01c0: 41 52 5b 4d 41 58 5f 50 41 54 48 5d 20 74 73 7a  AR[MAX_PATH] tsz
01d0: 49 6e 73 74 61 6e 63 65 4e 61 6d 65 3b 0d 0a 20  InstanceName;.. 
01e0: 20 20 20 43 48 41 52 5b 4d 41 58 5f 50 41 54 48     CHAR[MAX_PATH
01f0: 5d 20 74 73 7a 50 72 6f 64 75 63 74 4e 61 6d 65  ] tszProductName
0200: 3b 0d 0a 20 20 20 20 47 55 49 44 20 20 20 20 67  ;..    GUID    g
0210: 75 69 64 46 46 44 72 69 76 65 72 3b 0d 0a 20 20  uidFFDriver;..  
0220: 20 20 57 4f 52 44 20 20 20 20 77 55 73 61 67 65    WORD    wUsage
0230: 50 61 67 65 3b 0d 0a 20 20 20 20 57 4f 52 44 20  Page;..    WORD 
0240: 20 20 20 77 55 73 61 67 65 3b 0d 0a 7d 0d 0a 61     wUsage;..}..a
0250: 6c 69 61 73 20 44 49 44 45 56 49 43 45 49 4e 53  lias DIDEVICEINS
0260: 54 41 4e 43 45 41 20 44 49 44 45 56 49 43 45 49  TANCEA DIDEVICEI
0270: 4e 53 54 41 4e 43 45 3b 0d 0a 0d 0a 73 74 72 75  NSTANCE;....stru
0280: 63 74 20 44 49 44 45 56 49 43 45 4f 42 4a 45 43  ct DIDEVICEOBJEC
0290: 54 49 4e 53 54 41 4e 43 45 41 0d 0a 7b 0d 0a 20  TINSTANCEA..{.. 
02a0: 20 20 20 44 57 4f 52 44 20 20 20 64 77 53 69 7a     DWORD   dwSiz
02b0: 65 3b 0d 0a 20 20 20 20 47 55 49 44 20 20 20 20  e;..    GUID    
02c0: 67 75 69 64 54 79 70 65 3b 0d 0a 20 20 20 20 44  guidType;..    D
02d0: 57 4f 52 44 20 20 20 64 77 4f 66 73 3b 0d 0a 20  WORD   dwOfs;.. 
02e0: 20 20 20 44 57 4f 52 44 20 20 20 64 77 54 79 70     DWORD   dwTyp
02f0: 65 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20  e;..    DWORD   
0300: 64 77 46 6c 61 67 73 3b 0d 0a 20 20 20 20 43 48  dwFlags;..    CH
0310: 41 52 5b 4d 41 58 5f 50 41 54 48 5d 20 74 73 7a  AR[MAX_PATH] tsz
0320: 4e 61 6d 65 3b 0d 0a 20 20 20 20 44 57 4f 52 44  Name;..    DWORD
0330: 20 20 20 64 77 46 46 4d 61 78 46 6f 72 63 65 3b     dwFFMaxForce;
0340: 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 64 77  ..    DWORD   dw
0350: 46 46 46 6f 72 63 65 52 65 73 6f 6c 75 74 69 6f  FFForceResolutio
0360: 6e 3b 0d 0a 20 20 20 20 57 4f 52 44 20 20 20 20  n;..    WORD    
0370: 77 43 6f 6c 6c 65 63 74 69 6f 6e 4e 75 6d 62 65  wCollectionNumbe
0380: 72 3b 0d 0a 20 20 20 20 57 4f 52 44 20 20 20 20  r;..    WORD    
0390: 77 44 65 73 69 67 6e 61 74 6f 72 49 6e 64 65 78  wDesignatorIndex
03a0: 3b 0d 0a 20 20 20 20 57 4f 52 44 20 20 20 20 77  ;..    WORD    w
03b0: 55 73 61 67 65 50 61 67 65 3b 0d 0a 20 20 20 20  UsagePage;..    
03c0: 57 4f 52 44 20 20 20 20 77 55 73 61 67 65 3b 0d  WORD    wUsage;.
03d0: 0a 20 20 20 20 44 57 4f 52 44 20 20 20 64 77 44  .    DWORD   dwD
03e0: 69 6d 65 6e 73 69 6f 6e 3b 0d 0a 20 20 20 20 57  imension;..    W
03f0: 4f 52 44 20 20 20 20 77 45 78 70 6f 6e 65 6e 74  ORD    wExponent
0400: 3b 0d 0a 20 20 20 20 57 4f 52 44 20 20 20 20 77  ;..    WORD    w
0410: 52 65 70 6f 72 74 49 64 3b 0d 0a 7d 0d 0a 0d 0a  ReportId;..}....
0420: 73 74 72 75 63 74 20 44 49 4f 42 4a 45 43 54 44  struct DIOBJECTD
0430: 41 54 41 46 4f 52 4d 41 54 0d 0a 7b 0d 0a 09 63  ATAFORMAT..{...c
0440: 6f 6e 73 74 20 20 20 47 55 49 44 20 2a 70 67 75  onst   GUID *pgu
0450: 69 64 3b 0d 0a 09 44 57 4f 52 44 20 20 20 64 77  id;...DWORD   dw
0460: 4f 66 73 3b 0d 0a 09 44 57 4f 52 44 20 20 20 64  Ofs;...DWORD   d
0470: 77 54 79 70 65 3b 0d 0a 09 44 57 4f 52 44 20 20  wType;...DWORD  
0480: 20 64 77 46 6c 61 67 73 3b 0d 0a 7d 0d 0a 0d 0a   dwFlags;..}....
0490: 73 74 72 75 63 74 20 44 49 44 41 54 41 46 4f 52  struct DIDATAFOR
04a0: 4d 41 54 0d 0a 7b 0d 0a 09 44 57 4f 52 44 20 20  MAT..{...DWORD  
04b0: 20 64 77 53 69 7a 65 3b 0d 0a 09 44 57 4f 52 44   dwSize;...DWORD
04c0: 20 20 20 64 77 4f 62 6a 53 69 7a 65 3b 0d 0a 09     dwObjSize;...
04d0: 44 57 4f 52 44 20 20 20 64 77 46 6c 61 67 73 3b  DWORD   dwFlags;
04e0: 0d 0a 09 44 57 4f 52 44 20 20 20 64 77 44 61 74  ...DWORD   dwDat
04f0: 61 53 69 7a 65 3b 0d 0a 09 44 57 4f 52 44 20 20  aSize;...DWORD  
0500: 20 64 77 4e 75 6d 4f 62 6a 73 3b 0d 0a 09 44 49   dwNumObjs;...DI
0510: 4f 42 4a 45 43 54 44 41 54 41 46 4f 52 4d 41 54  OBJECTDATAFORMAT
0520: 2a 20 72 67 6f 64 66 3b 0d 0a 7d 0d 0a 0d 0a 65  * rgodf;..}....e
0530: 78 74 65 72 6e 20 44 49 44 41 54 41 46 4f 52 4d  xtern DIDATAFORM
0540: 41 54 20 63 5f 64 66 44 49 4b 65 79 62 6f 61 72  AT c_dfDIKeyboar
0550: 64 3b 0d 0a 65 78 74 65 72 6e 20 44 49 44 41 54  d;..extern DIDAT
0560: 41 46 4f 52 4d 41 54 20 63 5f 64 66 44 49 4d 6f  AFORMAT c_dfDIMo
0570: 75 73 65 32 3b 0d 0a 65 78 74 65 72 6e 20 44 49  use2;..extern DI
0580: 44 41 54 41 46 4f 52 4d 41 54 20 63 5f 64 66 44  DATAFORMAT c_dfD
0590: 49 4a 6f 79 73 74 69 63 6b 3b 0d 0a 0d 0a 73 74  IJoystick;....st
05a0: 72 75 63 74 20 44 49 41 43 54 49 4f 4e 41 0d 0a  ruct DIACTIONA..
05b0: 7b 0d 0a 09 55 49 4e 54 2a 20 20 20 20 75 41 70  {...UINT*    uAp
05c0: 70 44 61 74 61 3b 0d 0a 09 44 57 4f 52 44 20 20  pData;...DWORD  
05d0: 20 20 20 20 20 64 77 53 65 6d 61 6e 74 69 63 3b       dwSemantic;
05e0: 0d 0a 09 44 57 4f 52 44 20 20 20 20 20 20 20 64  ...DWORD       d
05f0: 77 46 6c 61 67 73 3b 0d 0a 09 75 6e 69 6f 6e 0d  wFlags;...union.
0600: 0a 09 7b 0d 0a 09 09 4c 50 43 53 54 52 20 20 20  ..{....LPCSTR   
0610: 20 20 20 6c 70 74 73 7a 41 63 74 69 6f 6e 4e 61     lptszActionNa
0620: 6d 65 3b 0d 0a 09 09 55 49 4e 54 20 20 20 20 20  me;....UINT     
0630: 20 20 20 75 52 65 73 49 64 53 74 72 69 6e 67 3b     uResIdString;
0640: 0d 0a 09 7d 0d 0a 09 47 55 49 44 20 20 20 20 20  ...}...GUID     
0650: 20 20 20 67 75 69 64 49 6e 73 74 61 6e 63 65 3b     guidInstance;
0660: 0d 0a 09 44 57 4f 52 44 20 20 20 20 20 20 20 64  ...DWORD       d
0670: 77 4f 62 6a 49 44 3b 0d 0a 09 44 57 4f 52 44 20  wObjID;...DWORD 
0680: 20 20 20 20 20 20 64 77 48 6f 77 3b 0d 0a 7d 0d        dwHow;..}.
0690: 0a 0d 0a 73 74 72 75 63 74 20 44 49 41 43 54 49  ...struct DIACTI
06a0: 4f 4e 46 4f 52 4d 41 54 41 0d 0a 7b 0d 0a 09 44  ONFORMATA..{...D
06b0: 57 4f 52 44 20 20 20 20 20 20 20 64 77 53 69 7a  WORD       dwSiz
06c0: 65 3b 0d 0a 09 44 57 4f 52 44 20 20 20 20 20 20  e;...DWORD      
06d0: 20 64 77 41 63 74 69 6f 6e 53 69 7a 65 3b 0d 0a   dwActionSize;..
06e0: 09 44 57 4f 52 44 20 20 20 20 20 20 20 64 77 44  .DWORD       dwD
06f0: 61 74 61 53 69 7a 65 3b 0d 0a 09 44 57 4f 52 44  ataSize;...DWORD
0700: 20 20 20 20 20 20 20 64 77 4e 75 6d 41 63 74 69         dwNumActi
0710: 6f 6e 73 3b 0d 0a 09 44 49 41 43 54 49 4f 4e 41  ons;...DIACTIONA
0720: 2a 20 20 72 67 6f 41 63 74 69 6f 6e 3b 0d 0a 09  *  rgoAction;...
0730: 47 55 49 44 20 20 20 20 20 20 20 20 67 75 69 64  GUID        guid
0740: 41 63 74 69 6f 6e 4d 61 70 3b 0d 0a 09 44 57 4f  ActionMap;...DWO
0750: 52 44 20 20 20 20 20 20 20 64 77 47 65 6e 72 65  RD       dwGenre
0760: 3b 0d 0a 09 44 57 4f 52 44 20 20 20 20 20 20 20  ;...DWORD       
0770: 64 77 42 75 66 66 65 72 53 69 7a 65 3b 0d 0a 09  dwBufferSize;...
0780: 4c 4f 4e 47 20 20 20 20 20 20 20 20 6c 41 78 69  LONG        lAxi
0790: 73 4d 69 6e 3b 0d 0a 09 4c 4f 4e 47 20 20 20 20  sMin;...LONG    
07a0: 20 20 20 20 6c 41 78 69 73 4d 61 78 3b 0d 0a 09      lAxisMax;...
07b0: 48 49 4e 53 54 41 4e 43 45 20 20 20 68 49 6e 73  HINSTANCE   hIns
07c0: 74 53 74 72 69 6e 67 3b 0d 0a 09 46 49 4c 45 54  tString;...FILET
07d0: 49 4d 45 20 20 20 20 66 74 54 69 6d 65 53 74 61  IME    ftTimeSta
07e0: 6d 70 3b 0d 0a 09 44 57 4f 52 44 20 20 20 20 20  mp;...DWORD     
07f0: 20 20 64 77 43 52 43 3b 0d 0a 09 43 48 41 52 5b    dwCRC;...CHAR[
0800: 4d 41 58 5f 50 41 54 48 5d 20 74 73 7a 41 63 74  MAX_PATH] tszAct
0810: 69 6f 6e 4d 61 70 3b 0d 0a 7d 0d 0a 0d 0a 73 74  ionMap;..}....st
0820: 72 75 63 74 20 44 49 44 45 56 43 41 50 53 0d 0a  ruct DIDEVCAPS..
0830: 7b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 64  {..    DWORD   d
0840: 77 53 69 7a 65 3b 0d 0a 20 20 20 20 44 57 4f 52  wSize;..    DWOR
0850: 44 20 20 20 64 77 46 6c 61 67 73 3b 0d 0a 20 20  D   dwFlags;..  
0860: 20 20 44 57 4f 52 44 20 20 20 64 77 44 65 76 54    DWORD   dwDevT
0870: 79 70 65 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20  ype;..    DWORD 
0880: 20 20 64 77 41 78 65 73 3b 0d 0a 20 20 20 20 44    dwAxes;..    D
0890: 57 4f 52 44 20 20 20 64 77 42 75 74 74 6f 6e 73  WORD   dwButtons
08a0: 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 64  ;..    DWORD   d
08b0: 77 50 4f 56 73 3b 0d 0a 20 20 20 20 44 57 4f 52  wPOVs;..    DWOR
08c0: 44 20 20 20 64 77 46 46 53 61 6d 70 6c 65 50 65  D   dwFFSamplePe
08d0: 72 69 6f 64 3b 0d 0a 20 20 20 20 44 57 4f 52 44  riod;..    DWORD
08e0: 20 20 20 64 77 46 46 4d 69 6e 54 69 6d 65 52 65     dwFFMinTimeRe
08f0: 73 6f 6c 75 74 69 6f 6e 3b 0d 0a 20 20 20 20 44  solution;..    D
0900: 57 4f 52 44 20 20 20 64 77 46 69 72 6d 77 61 72  WORD   dwFirmwar
0910: 65 52 65 76 69 73 69 6f 6e 3b 0d 0a 20 20 20 20  eRevision;..    
0920: 44 57 4f 52 44 20 20 20 64 77 48 61 72 64 77 61  DWORD   dwHardwa
0930: 72 65 52 65 76 69 73 69 6f 6e 3b 0d 0a 20 20 20  reRevision;..   
0940: 20 44 57 4f 52 44 20 20 20 64 77 46 46 44 72 69   DWORD   dwFFDri
0950: 76 65 72 56 65 72 73 69 6f 6e 3b 0d 0a 7d 0d 0a  verVersion;..}..
0960: 0d 0a 73 74 72 75 63 74 20 44 49 50 52 4f 50 48  ..struct DIPROPH
0970: 45 41 44 45 52 0d 0a 7b 0d 0a 20 20 20 20 44 57  EADER..{..    DW
0980: 4f 52 44 20 20 20 64 77 53 69 7a 65 3b 0d 0a 20  ORD   dwSize;.. 
0990: 20 20 20 44 57 4f 52 44 20 20 20 64 77 48 65 61     DWORD   dwHea
09a0: 64 65 72 53 69 7a 65 3b 0d 0a 20 20 20 20 44 57  derSize;..    DW
09b0: 4f 52 44 20 20 20 64 77 4f 62 6a 3b 0d 0a 20 20  ORD   dwObj;..  
09c0: 20 20 44 57 4f 52 44 20 20 20 64 77 48 6f 77 3b    DWORD   dwHow;
09d0: 0d 0a 7d 0d 0a 0d 0a 73 74 72 75 63 74 20 44 49  ..}....struct DI
09e0: 44 45 56 49 43 45 4f 42 4a 45 43 54 44 41 54 41  DEVICEOBJECTDATA
09f0: 0d 0a 7b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20  ..{..    DWORD  
0a00: 20 20 20 20 20 64 77 4f 66 73 3b 0d 0a 20 20 20       dwOfs;..   
0a10: 20 44 57 4f 52 44 20 20 20 20 20 20 20 64 77 44   DWORD       dwD
0a20: 61 74 61 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20  ata;..    DWORD 
0a30: 20 20 20 20 20 20 64 77 54 69 6d 65 53 74 61 6d        dwTimeStam
0a40: 70 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20  p;..    DWORD   
0a50: 20 20 20 20 64 77 53 65 71 75 65 6e 63 65 3b 0d      dwSequence;.
0a60: 0a 20 20 20 20 55 49 4e 54 2a 20 20 20 20 75 41  .    UINT*    uA
0a70: 70 70 44 61 74 61 3b 0d 0a 7d 0d 0a 0d 0a 73 74  ppData;..}....st
0a80: 72 75 63 74 20 44 49 45 4e 56 45 4c 4f 50 45 0d  ruct DIENVELOPE.
0a90: 0a 7b 0d 0a 20 20 20 20 44 57 4f 52 44 20 64 77  .{..    DWORD dw
0aa0: 53 69 7a 65 20 3d 20 44 49 45 4e 56 45 4c 4f 50  Size = DIENVELOP
0ab0: 45 2e 73 69 7a 65 6f 66 3b 0d 0a 20 20 20 20 44  E.sizeof;..    D
0ac0: 57 4f 52 44 20 64 77 41 74 74 61 63 6b 4c 65 76  WORD dwAttackLev
0ad0: 65 6c 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 64  el;..    DWORD d
0ae0: 77 41 74 74 61 63 6b 54 69 6d 65 3b 20 20 20 20  wAttackTime;    
0af0: 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 69 63 72           // Micr
0b00: 6f 73 65 63 6f 6e 64 73 0d 0a 20 20 20 20 44 57  oseconds..    DW
0b10: 4f 52 44 20 64 77 46 61 64 65 4c 65 76 65 6c 3b  ORD dwFadeLevel;
0b20: 0d 0a 20 20 20 20 44 57 4f 52 44 20 64 77 46 61  ..    DWORD dwFa
0b30: 64 65 54 69 6d 65 3b 20 20 20 20 20 20 20 20 20  deTime;         
0b40: 20 20 20 20 20 20 2f 2f 20 4d 69 63 72 6f 73 65        // Microse
0b50: 63 6f 6e 64 73 0d 0a 7d 0d 0a 0d 0a 73 74 72 75  conds..}....stru
0b60: 63 74 20 44 49 45 46 46 45 43 54 0d 0a 7b 0d 0a  ct DIEFFECT..{..
0b70: 20 20 20 20 44 57 4f 52 44 20 64 77 53 69 7a 65      DWORD dwSize
0b80: 20 3d 20 44 49 45 46 46 45 43 54 2e 73 69 7a 65   = DIEFFECT.size
0b90: 6f 66 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 64  of;..    DWORD d
0ba0: 77 46 6c 61 67 73 3b 20 20 20 20 20 20 20 20 20  wFlags;         
0bb0: 20 20 20 20 20 20 20 20 20 2f 2f 20 44 49 45 46           // DIEF
0bc0: 46 5f 2a 0d 0a 20 20 20 20 44 57 4f 52 44 20 64  F_*..    DWORD d
0bd0: 77 44 75 72 61 74 69 6f 6e 3b 20 20 20 20 20 20  wDuration;      
0be0: 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 69 63 72           // Micr
0bf0: 6f 73 65 63 6f 6e 64 73 0d 0a 20 20 20 20 44 57  oseconds..    DW
0c00: 4f 52 44 20 64 77 53 61 6d 70 6c 65 50 65 72 69  ORD dwSamplePeri
0c10: 6f 64 3b 20 20 20 20 20 20 20 20 20 20 20 2f 2f  od;           //
0c20: 20 4d 69 63 72 6f 73 65 63 6f 6e 64 73 0d 0a 20   Microseconds.. 
0c30: 20 20 20 44 57 4f 52 44 20 64 77 47 61 69 6e 3b     DWORD dwGain;
0c40: 0d 0a 20 20 20 20 44 57 4f 52 44 20 64 77 54 72  ..    DWORD dwTr
0c50: 69 67 67 65 72 42 75 74 74 6f 6e 3b 20 20 20 20  iggerButton;    
0c60: 20 20 20 20 20 20 2f 2f 20 6f 72 20 44 49 45 42        // or DIEB
0c70: 5f 4e 4f 54 52 49 47 47 45 52 0d 0a 20 20 20 20  _NOTRIGGER..    
0c80: 44 57 4f 52 44 20 64 77 54 72 69 67 67 65 72 52  DWORD dwTriggerR
0c90: 65 70 65 61 74 49 6e 74 65 72 76 61 6c 3b 20 20  epeatInterval;  
0ca0: 2f 2f 20 4d 69 63 72 6f 73 65 63 6f 6e 64 73 0d  // Microseconds.
0cb0: 0a 20 20 20 20 44 57 4f 52 44 20 63 41 78 65 73  .    DWORD cAxes
0cc0: 3b 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  ;               
0cd0: 20 20 20 20 20 2f 2f 20 4e 75 6d 62 65 72 20 6f       // Number o
0ce0: 66 20 61 78 65 73 0d 0a 20 20 20 20 4c 50 44 57  f axes..    LPDW
0cf0: 4f 52 44 20 72 67 64 77 41 78 65 73 3b 20 20 20  ORD rgdwAxes;   
0d00: 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41              // A
0d10: 72 72 61 79 20 6f 66 20 61 78 65 73 0d 0a 20 20  rray of axes..  
0d20: 20 20 4c 50 4c 4f 4e 47 20 72 67 6c 44 69 72 65    LPLONG rglDire
0d30: 63 74 69 6f 6e 3b 20 20 20 20 20 20 20 20 20 20  ction;          
0d40: 20 20 2f 2f 20 41 72 72 61 79 20 6f 66 20 64 69    // Array of di
0d50: 72 65 63 74 69 6f 6e 73 0d 0a 20 20 20 20 44 49  rections..    DI
0d60: 45 4e 56 45 4c 4f 50 45 2a 20 6c 70 45 6e 76 65  ENVELOPE* lpEnve
0d70: 6c 6f 70 65 3b 20 20 20 20 20 20 20 20 20 2f 2f  lope;         //
0d80: 20 4f 70 74 69 6f 6e 61 6c 0d 0a 20 20 20 20 44   Optional..    D
0d90: 57 4f 52 44 20 63 62 54 79 70 65 53 70 65 63 69  WORD cbTypeSpeci
0da0: 66 69 63 50 61 72 61 6d 73 3b 20 20 20 20 20 2f  ficParams;     /
0db0: 2f 20 53 69 7a 65 20 6f 66 20 70 61 72 61 6d 73  / Size of params
0dc0: 0d 0a 20 20 20 20 4c 50 56 4f 49 44 20 6c 70 76  ..    LPVOID lpv
0dd0: 54 79 70 65 53 70 65 63 69 66 69 63 50 61 72 61  TypeSpecificPara
0de0: 6d 73 3b 20 20 20 2f 2f 20 50 6f 69 6e 74 65 72  ms;   // Pointer
0df0: 20 74 6f 20 70 61 72 61 6d 73 0d 0a 20 20 20 20   to params..    
0e00: 44 57 4f 52 44 20 20 64 77 53 74 61 72 74 44 65  DWORD  dwStartDe
0e10: 6c 61 79 3b 20 20 20 20 20 20 20 20 20 20 20 20  lay;            
0e20: 2f 2f 20 4d 69 63 72 6f 73 65 63 6f 6e 64 73 0d  // Microseconds.
0e30: 0a 7d 0d 0a 0d 0a 73 74 72 75 63 74 20 44 49 45  .}....struct DIE
0e40: 46 46 45 53 43 41 50 45 0d 0a 7b 0d 0a 20 20 20  FFESCAPE..{..   
0e50: 20 44 57 4f 52 44 20 20 20 64 77 53 69 7a 65 3b   DWORD   dwSize;
0e60: 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 64 77  ..    DWORD   dw
0e70: 43 6f 6d 6d 61 6e 64 3b 0d 0a 20 20 20 20 4c 50  Command;..    LP
0e80: 56 4f 49 44 20 20 6c 70 76 49 6e 42 75 66 66 65  VOID  lpvInBuffe
0e90: 72 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20  r;..    DWORD   
0ea0: 63 62 49 6e 42 75 66 66 65 72 3b 0d 0a 20 20 20  cbInBuffer;..   
0eb0: 20 4c 50 56 4f 49 44 20 20 6c 70 76 4f 75 74 42   LPVOID  lpvOutB
0ec0: 75 66 66 65 72 3b 0d 0a 20 20 20 20 44 57 4f 52  uffer;..    DWOR
0ed0: 44 20 20 20 63 62 4f 75 74 42 75 66 66 65 72 3b  D   cbOutBuffer;
0ee0: 0d 0a 7d 0d 0a 0d 0a 73 74 72 75 63 74 20 44 49  ..}....struct DI
0ef0: 45 46 46 45 43 54 49 4e 46 4f 41 0d 0a 7b 0d 0a  EFFECTINFOA..{..
0f00: 20 20 20 20 44 57 4f 52 44 20 20 20 64 77 53 69      DWORD   dwSi
0f10: 7a 65 3b 0d 0a 20 20 20 20 47 55 49 44 20 20 20  ze;..    GUID   
0f20: 20 67 75 69 64 3b 0d 0a 20 20 20 20 44 57 4f 52   guid;..    DWOR
0f30: 44 20 20 20 64 77 45 66 66 54 79 70 65 3b 0d 0a  D   dwEffType;..
0f40: 20 20 20 20 44 57 4f 52 44 20 20 20 64 77 53 74      DWORD   dwSt
0f50: 61 74 69 63 50 61 72 61 6d 73 3b 0d 0a 20 20 20  aticParams;..   
0f60: 20 44 57 4f 52 44 20 20 20 64 77 44 79 6e 61 6d   DWORD   dwDynam
0f70: 69 63 50 61 72 61 6d 73 3b 0d 0a 20 20 20 20 43  icParams;..    C
0f80: 48 41 52 5b 4d 41 58 5f 50 41 54 48 5d 20 74 73  HAR[MAX_PATH] ts
0f90: 7a 4e 61 6d 65 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72  zName;..}....str
0fa0: 75 63 74 20 44 49 46 49 4c 45 45 46 46 45 43 54  uct DIFILEEFFECT
0fb0: 0d 0a 7b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20  ..{..    DWORD  
0fc0: 20 20 20 20 20 64 77 53 69 7a 65 3b 0d 0a 20 20       dwSize;..  
0fd0: 20 20 47 55 49 44 20 20 20 20 20 20 20 20 47 75    GUID        Gu
0fe0: 69 64 45 66 66 65 63 74 3b 0d 0a 20 20 20 20 44  idEffect;..    D
0ff0: 49 45 46 46 45 43 54 2a 20 6c 70 44 69 45 66 66  IEFFECT* lpDiEff
1000: 65 63 74 3b 0d 0a 20 20 20 20 43 48 41 52 5b 4d  ect;..    CHAR[M
1010: 41 58 5f 50 41 54 48 5d 20 73 7a 46 72 69 65 6e  AX_PATH] szFrien
1020: 64 6c 79 4e 61 6d 65 3b 0d 0a 7d 0d 0a 0d 0a 73  dlyName;..}....s
1030: 74 72 75 63 74 20 44 49 44 45 56 49 43 45 49 4d  truct DIDEVICEIM
1040: 41 47 45 49 4e 46 4f 41 0d 0a 7b 0d 0a 20 20 20  AGEINFOA..{..   
1050: 20 43 48 41 52 5b 4d 41 58 5f 50 41 54 48 5d 20   CHAR[MAX_PATH] 
1060: 74 73 7a 49 6d 61 67 65 50 61 74 68 3b 0d 0a 20  tszImagePath;.. 
1070: 20 20 20 44 57 4f 52 44 20 20 20 20 20 20 20 64     DWORD       d
1080: 77 46 6c 61 67 73 3b 0d 0a 20 20 20 20 2f 2f 20  wFlags;..    // 
1090: 54 68 65 73 65 20 61 72 65 20 76 61 6c 69 64 20  These are valid 
10a0: 69 66 20 44 49 44 49 46 54 5f 4f 56 45 52 4c 41  if DIDIFT_OVERLA
10b0: 59 20 69 73 20 70 72 65 73 65 6e 74 20 69 6e 20  Y is present in 
10c0: 64 77 46 6c 61 67 73 2e 0d 0a 20 20 20 20 44 57  dwFlags...    DW
10d0: 4f 52 44 20 20 20 20 20 20 20 64 77 56 69 65 77  ORD       dwView
10e0: 49 44 3b 0d 0a 20 20 20 20 52 45 43 54 20 20 20  ID;..    RECT   
10f0: 20 20 20 20 20 72 63 4f 76 65 72 6c 61 79 3b 0d       rcOverlay;.
1100: 0a 20 20 20 20 44 57 4f 52 44 20 20 20 20 20 20  .    DWORD      
1110: 20 64 77 4f 62 6a 49 44 3b 0d 0a 20 20 20 20 44   dwObjID;..    D
1120: 57 4f 52 44 20 20 20 20 20 20 20 64 77 63 56 61  WORD       dwcVa
1130: 6c 69 64 50 74 73 3b 0d 0a 20 20 20 20 50 4f 49  lidPts;..    POI
1140: 4e 54 5b 35 5d 20 20 20 20 72 67 70 74 43 61 6c  NT[5]    rgptCal
1150: 6c 6f 75 74 4c 69 6e 65 3b 0d 0a 20 20 20 20 52  loutLine;..    R
1160: 45 43 54 20 20 20 20 20 20 20 20 72 63 43 61 6c  ECT        rcCal
1170: 6c 6f 75 74 52 65 63 74 3b 0d 0a 20 20 20 20 44  loutRect;..    D
1180: 57 4f 52 44 20 20 20 20 20 20 20 64 77 54 65 78  WORD       dwTex
1190: 74 41 6c 69 67 6e 3b 0d 0a 7d 0d 0a 0d 0a 73 74  tAlign;..}....st
11a0: 72 75 63 74 20 44 49 44 45 56 49 43 45 49 4d 41  ruct DIDEVICEIMA
11b0: 47 45 49 4e 46 4f 48 45 41 44 45 52 41 0d 0a 7b  GEINFOHEADERA..{
11c0: 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 20 20  ..    DWORD     
11d0: 20 20 64 77 53 69 7a 65 3b 0d 0a 20 20 20 20 44    dwSize;..    D
11e0: 57 4f 52 44 20 20 20 20 20 20 20 64 77 53 69 7a  WORD       dwSiz
11f0: 65 49 6d 61 67 65 49 6e 66 6f 3b 0d 0a 20 20 20  eImageInfo;..   
1200: 20 44 57 4f 52 44 20 20 20 20 20 20 20 64 77 63   DWORD       dwc
1210: 56 69 65 77 73 3b 0d 0a 20 20 20 20 44 57 4f 52  Views;..    DWOR
1220: 44 20 20 20 20 20 20 20 64 77 63 42 75 74 74 6f  D       dwcButto
1230: 6e 73 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20  ns;..    DWORD  
1240: 20 20 20 20 20 64 77 63 41 78 65 73 3b 0d 0a 20       dwcAxes;.. 
1250: 20 20 20 44 57 4f 52 44 20 20 20 20 20 20 20 64     DWORD       d
1260: 77 63 50 4f 56 73 3b 0d 0a 20 20 20 20 44 57 4f  wcPOVs;..    DWO
1270: 52 44 20 20 20 20 20 20 20 64 77 42 75 66 66 65  RD       dwBuffe
1280: 72 53 69 7a 65 3b 0d 0a 20 20 20 20 44 57 4f 52  rSize;..    DWOR
1290: 44 20 20 20 20 20 20 20 64 77 42 75 66 66 65 72  D       dwBuffer
12a0: 55 73 65 64 3b 0d 0a 20 20 20 20 44 49 44 45 56  Used;..    DIDEV
12b0: 49 43 45 49 4d 41 47 45 49 4e 46 4f 41 2a 20 6c  ICEIMAGEINFOA* l
12c0: 70 72 67 49 6d 61 67 65 49 6e 66 6f 41 72 72 61  prgImageInfoArra
12d0: 79 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 75 63 74 20  y;..}....struct 
12e0: 44 49 43 4f 4e 46 49 47 55 52 45 44 45 56 49 43  DICONFIGUREDEVIC
12f0: 45 53 50 41 52 41 4d 53 41 0d 0a 7b 0d 0a 09 20  ESPARAMSA..{... 
1300: 44 57 4f 52 44 20 20 20 20 20 20 20 20 20 20 20  DWORD           
1310: 20 64 77 53 69 7a 65 3b 0d 0a 09 20 44 57 4f 52   dwSize;... DWOR
1320: 44 20 20 20 20 20 20 20 20 20 20 20 20 64 77 63  D            dwc
1330: 55 73 65 72 73 3b 0d 0a 09 20 4c 50 53 54 52 20  Users;... LPSTR 
1340: 20 20 20 20 20 20 20 20 20 20 20 6c 70 74 73 7a             lptsz
1350: 55 73 65 72 4e 61 6d 65 73 3b 0d 0a 09 20 44 57  UserNames;... DW
1360: 4f 52 44 20 20 20 20 20 20 20 20 20 20 20 20 64  ORD            d
1370: 77 63 46 6f 72 6d 61 74 73 3b 0d 0a 09 20 44 49  wcFormats;... DI
1380: 41 43 54 49 4f 4e 46 4f 52 4d 41 54 41 2a 20 6c  ACTIONFORMATA* l
1390: 70 72 67 46 6f 72 6d 61 74 73 3b 0d 0a 09 20 48  prgFormats;... H
13a0: 57 4e 44 20 20 20 20 20 20 20 20 20 20 20 20 20  WND             
13b0: 68 77 6e 64 3b 0d 0a 09 20 44 49 43 4f 4c 4f 52  hwnd;... DICOLOR
13c0: 53 45 54 20 20 20 20 20 20 20 64 69 63 73 3b 0d  SET       dics;.
13d0: 0a 09 20 49 55 6e 6b 6e 6f 77 6e 20 20 20 20 20  .. IUnknown     
13e0: 20 20 20 20 6c 70 55 6e 6b 44 44 53 54 61 72 67      lpUnkDDSTarg
13f0: 65 74 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 75 63 74  et;..}....struct
1400: 20 44 49 43 4f 4c 4f 52 53 45 54 0d 0a 7b 0d 0a   DICOLORSET..{..
1410: 20 20 20 20 44 57 4f 52 44 20 64 77 53 69 7a 65      DWORD dwSize
1420: 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 63 54 65  ;..    DWORD cTe
1430: 78 74 46 6f 72 65 3b 0d 0a 20 20 20 20 44 57 4f  xtFore;..    DWO
1440: 52 44 20 63 54 65 78 74 48 69 67 68 6c 69 67 68  RD cTextHighligh
1450: 74 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 63 43  t;..    DWORD cC
1460: 61 6c 6c 6f 75 74 4c 69 6e 65 3b 0d 0a 20 20 20  alloutLine;..   
1470: 20 44 57 4f 52 44 20 63 43 61 6c 6c 6f 75 74 48   DWORD cCalloutH
1480: 69 67 68 6c 69 67 68 74 3b 0d 0a 20 20 20 20 44  ighlight;..    D
1490: 57 4f 52 44 20 63 42 6f 72 64 65 72 3b 0d 0a 20  WORD cBorder;.. 
14a0: 20 20 20 44 57 4f 52 44 20 63 43 6f 6e 74 72 6f     DWORD cContro
14b0: 6c 46 69 6c 6c 3b 0d 0a 20 20 20 20 44 57 4f 52  lFill;..    DWOR
14c0: 44 20 63 48 69 67 68 6c 69 67 68 74 46 69 6c 6c  D cHighlightFill
14d0: 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 63 41 72  ;..    DWORD cAr
14e0: 65 61 46 69 6c 6c 3b 0d 0a 7d 0d 0a 0d 0a 73 74  eaFill;..}....st
14f0: 72 75 63 74 20 44 49 4d 4f 55 53 45 53 54 41 54  ruct DIMOUSESTAT
1500: 45 32 0d 0a 7b 0d 0a 20 20 20 20 4c 4f 4e 47 20  E2..{..    LONG 
1510: 20 20 20 6c 58 3b 0d 0a 20 20 20 20 4c 4f 4e 47     lX;..    LONG
1520: 20 20 20 20 6c 59 3b 0d 0a 20 20 20 20 4c 4f 4e      lY;..    LON
1530: 47 20 20 20 20 6c 5a 3b 0d 0a 20 20 20 20 42 59  G    lZ;..    BY
1540: 54 45 5b 38 5d 20 72 67 62 42 75 74 74 6f 6e 73  TE[8] rgbButtons
1550: 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 75 63 74 20 44  ;..}....struct D
1560: 49 4a 4f 59 53 54 41 54 45 0d 0a 7b 0d 0a 20 20  IJOYSTATE..{..  
1570: 20 20 4c 4f 4e 47 20 20 20 20 6c 58 3b 20 20 20    LONG    lX;   
1580: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
1590: 20 20 2f 2a 20 78 2d 61 78 69 73 20 70 6f 73 69    /* x-axis posi
15a0: 74 69 6f 6e 20 20 20 20 20 20 20 20 20 20 20 20  tion            
15b0: 20 20 2a 2f 0d 0a 20 20 20 20 4c 4f 4e 47 20 20    */..    LONG  
15c0: 20 20 6c 59 3b 20 20 20 20 20 20 20 20 20 20 20    lY;           
15d0: 20 20 20 20 20 20 20 20 20 20 2f 2a 20 79 2d 61            /* y-a
15e0: 78 69 73 20 70 6f 73 69 74 69 6f 6e 20 20 20 20  xis position    
15f0: 20 20 20 20 20 20 20 20 20 20 2a 2f 0d 0a 20 20            */..  
1600: 20 20 4c 4f 4e 47 20 20 20 20 6c 5a 3b 20 20 20    LONG    lZ;   
1610: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
1620: 20 20 2f 2a 20 7a 2d 61 78 69 73 20 70 6f 73 69    /* z-axis posi
1630: 74 69 6f 6e 20 20 20 20 20 20 20 20 20 20 20 20  tion            
1640: 20 20 2a 2f 0d 0a 20 20 20 20 4c 4f 4e 47 20 20    */..    LONG  
1650: 20 20 6c 52 78 3b 20 20 20 20 20 20 20 20 20 20    lRx;          
1660: 20 20 20 20 20 20 20 20 20 20 2f 2a 20 78 2d 61            /* x-a
1670: 78 69 73 20 72 6f 74 61 74 69 6f 6e 20 20 20 20  xis rotation    
1680: 20 20 20 20 20 20 20 20 20 20 2a 2f 0d 0a 20 20            */..  
1690: 20 20 4c 4f 4e 47 20 20 20 20 6c 52 79 3b 20 20    LONG    lRy;  
16a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
16b0: 20 20 2f 2a 20 79 2d 61 78 69 73 20 72 6f 74 61    /* y-axis rota
16c0: 74 69 6f 6e 20 20 20 20 20 20 20 20 20 20 20 20  tion            
16d0: 20 20 2a 2f 0d 0a 20 20 20 20 4c 4f 4e 47 20 20    */..    LONG  
16e0: 20 20 6c 52 7a 3b 20 20 20 20 20 20 20 20 20 20    lRz;          
16f0: 20 20 20 20 20 20 20 20 20 20 2f 2a 20 7a 2d 61            /* z-a
1700: 78 69 73 20 72 6f 74 61 74 69 6f 6e 20 20 20 20  xis rotation    
1710: 20 20 20 20 20 20 20 20 20 20 2a 2f 0d 0a 20 20            */..  
1720: 20 20 4c 4f 4e 47 5b 32 5d 20 72 67 6c 53 6c 69    LONG[2] rglSli
1730: 64 65 72 3b 20 20 20 20 20 20 20 20 20 20 20 2f  der;           /
1740: 2a 20 65 78 74 72 61 20 61 78 65 73 20 70 6f 73  * extra axes pos
1750: 69 74 69 6f 6e 73 20 20 20 20 20 20 20 20 20 2a  itions         *
1760: 2f 0d 0a 20 20 20 20 44 57 4f 52 44 5b 34 5d 72  /..    DWORD[4]r
1770: 67 64 77 50 4f 56 3b 20 20 20 20 20 20 20 20 20  gdwPOV;         
1780: 20 20 20 20 2f 2a 20 50 4f 56 20 64 69 72 65 63      /* POV direc
1790: 74 69 6f 6e 73 20 20 20 20 20 20 20 20 20 20 20  tions           
17a0: 20 20 20 20 2a 2f 0d 0a 20 20 20 20 42 59 54 45      */..    BYTE
17b0: 5b 33 32 5d 72 67 62 42 75 74 74 6f 6e 73 3b 20  [32]rgbButtons; 
17c0: 20 20 20 20 20 20 20 20 2f 2a 20 33 32 20 62 75          /* 32 bu
17d0: 74 74 6f 6e 73 20 20 20 20 20 20 20 20 20 20 20  ttons           
17e0: 20 20 20 20 20 20 20 20 2a 2f 0d 0a 7d 0d 0a 0d          */..}...
17f0: 0a 73 74 72 75 63 74 20 44 49 50 52 4f 50 52 41  .struct DIPROPRA
1800: 4e 47 45 0d 0a 7b 0d 0a 20 20 20 20 44 49 50 52  NGE..{..    DIPR
1810: 4f 50 48 45 41 44 45 52 20 64 69 70 68 3b 0d 0a  OPHEADER diph;..
1820: 20 20 20 20 4c 4f 4e 47 20 20 20 20 6c 4d 69 6e      LONG    lMin
1830: 3b 0d 0a 20 20 20 20 4c 4f 4e 47 20 20 20 20 6c  ;..    LONG    l
1840: 4d 61 78 3b 0d 0a 7d 0d 0a 0d 0a 69 6e 74 65 72  Max;..}....inter
1850: 66 61 63 65 20 49 44 69 72 65 63 74 49 6e 70 75  face IDirectInpu
1860: 74 45 66 66 65 63 74 20 3a 20 49 55 6e 6b 6e 6f  tEffect : IUnkno
1870: 77 6e 0d 0a 7b 0d 0a 20 20 20 20 48 52 45 53 55  wn..{..    HRESU
1880: 4c 54 20 49 6e 69 74 69 61 6c 69 7a 65 28 48 49  LT Initialize(HI
1890: 4e 53 54 41 4e 43 45 2c 20 44 57 4f 52 44 2c 20  NSTANCE, DWORD, 
18a0: 47 55 49 44 2a 29 3b 0d 0a 20 20 20 20 48 52 45  GUID*);..    HRE
18b0: 53 55 4c 54 20 47 65 74 45 66 66 65 63 74 47 75  SULT GetEffectGu
18c0: 69 64 28 47 55 49 44 2a 29 3b 0d 0a 20 20 20 20  id(GUID*);..    
18d0: 48 52 45 53 55 4c 54 20 47 65 74 50 61 72 61 6d  HRESULT GetParam
18e0: 65 74 65 72 73 28 44 49 45 46 46 45 43 54 2a 2c  eters(DIEFFECT*,
18f0: 20 44 57 4f 52 44 29 3b 0d 0a 20 20 20 20 48 52   DWORD);..    HR
1900: 45 53 55 4c 54 20 53 65 74 50 61 72 61 6d 65 74  ESULT SetParamet
1910: 65 72 73 28 44 49 45 46 46 45 43 54 2a 2c 20 44  ers(DIEFFECT*, D
1920: 57 4f 52 44 29 3b 0d 0a 20 20 20 20 48 52 45 53  WORD);..    HRES
1930: 55 4c 54 20 53 74 61 72 74 28 44 57 4f 52 44 2c  ULT Start(DWORD,
1940: 20 44 57 4f 52 44 29 3b 0d 0a 20 20 20 20 48 52   DWORD);..    HR
1950: 45 53 55 4c 54 20 53 74 6f 70 28 29 3b 0d 0a 20  ESULT Stop();.. 
1960: 20 20 20 48 52 45 53 55 4c 54 20 47 65 74 45 66     HRESULT GetEf
1970: 66 65 63 74 53 74 61 74 75 73 28 4c 50 44 57 4f  fectStatus(LPDWO
1980: 52 44 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c  RD);..    HRESUL
1990: 54 20 44 6f 77 6e 6c 6f 61 64 28 29 3b 0d 0a 20  T Download();.. 
19a0: 20 20 20 48 52 45 53 55 4c 54 20 55 6e 6c 6f 61     HRESULT Unloa
19b0: 64 28 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c  d();..    HRESUL
19c0: 54 20 45 73 63 61 70 65 28 44 49 45 46 46 45 53  T Escape(DIEFFES
19d0: 43 41 50 45 2a 29 3b 0d 0a 7d 0d 0a 0d 0a 65 78  CAPE*);..}....ex
19e0: 74 65 72 6e 28 57 69 6e 64 6f 77 73 29 20 61 6c  tern(Windows) al
19f0: 69 61 73 20 62 6f 6f 6c 20 66 75 6e 63 74 69 6f  ias bool functio
1a00: 6e 28 44 49 44 45 56 49 43 45 49 4e 53 54 41 4e  n(DIDEVICEINSTAN
1a10: 43 45 41 2a 2c 20 4c 50 56 4f 49 44 29 20 4c 50  CEA*, LPVOID) LP
1a20: 44 49 45 4e 55 4d 44 45 56 49 43 45 53 43 41 4c  DIENUMDEVICESCAL
1a30: 4c 42 41 43 4b 41 3b 0d 0a 65 78 74 65 72 6e 28  LBACKA;..extern(
1a40: 57 69 6e 64 6f 77 73 29 20 61 6c 69 61 73 20 62  Windows) alias b
1a50: 6f 6f 6c 20 66 75 6e 63 74 69 6f 6e 28 44 49 44  ool function(DID
1a60: 45 56 49 43 45 49 4e 53 54 41 4e 43 45 41 2a 2c  EVICEINSTANCEA*,
1a70: 20 49 44 69 72 65 63 74 49 6e 70 75 74 44 65 76   IDirectInputDev
1a80: 69 63 65 38 41 2a 2c 20 44 57 4f 52 44 2c 20 44  ice8A*, DWORD, D
1a90: 57 4f 52 44 2c 20 4c 50 56 4f 49 44 29 20 4c 50  WORD, LPVOID) LP
1aa0: 44 49 45 4e 55 4d 44 45 56 49 43 45 53 42 59 53  DIENUMDEVICESBYS
1ab0: 45 4d 41 4e 54 49 43 53 43 42 41 3b 0d 0a 0d 0a  EMANTICSCBA;....
1ac0: 65 78 74 65 72 6e 28 57 69 6e 64 6f 77 73 29 20  extern(Windows) 
1ad0: 61 6c 69 61 73 20 62 6f 6f 6c 20 66 75 6e 63 74  alias bool funct
1ae0: 69 6f 6e 28 44 49 44 45 56 49 43 45 4f 42 4a 45  ion(DIDEVICEOBJE
1af0: 43 54 49 4e 53 54 41 4e 43 45 41 20 2a 64 69 64  CTINSTANCEA *did
1b00: 6f 69 2c 20 76 6f 69 64 2a 20 70 43 6f 6e 74 65  oi, void* pConte
1b10: 78 74 29 20 4c 50 44 49 45 4e 55 4d 44 45 56 49  xt) LPDIENUMDEVI
1b20: 43 45 4f 42 4a 45 43 54 53 43 41 4c 4c 42 41 43  CEOBJECTSCALLBAC
1b30: 4b 41 3b 0d 0a 0d 0a 65 78 74 65 72 6e 28 57 69  KA;....extern(Wi
1b40: 6e 64 6f 77 73 29 20 61 6c 69 61 73 20 62 6f 6f  ndows) alias boo
1b50: 6c 20 66 75 6e 63 74 69 6f 6e 28 44 49 45 46 46  l function(DIEFF
1b60: 45 43 54 49 4e 46 4f 41 2a 2c 20 4c 50 56 4f 49  ECTINFOA*, LPVOI
1b70: 44 29 20 4c 50 44 49 45 4e 55 4d 45 46 46 45 43  D) LPDIENUMEFFEC
1b80: 54 53 43 41 4c 4c 42 41 43 4b 41 3b 0d 0a 65 78  TSCALLBACKA;..ex
1b90: 74 65 72 6e 28 57 69 6e 64 6f 77 73 29 20 61 6c  tern(Windows) al
1ba0: 69 61 73 20 62 6f 6f 6c 20 66 75 6e 63 74 69 6f  ias bool functio
1bb0: 6e 28 49 44 69 72 65 63 74 49 6e 70 75 74 45 66  n(IDirectInputEf
1bc0: 66 65 63 74 2c 20 4c 50 56 4f 49 44 29 20 4c 50  fect, LPVOID) LP
1bd0: 44 49 45 4e 55 4d 43 52 45 41 54 45 44 45 46 46  DIENUMCREATEDEFF
1be0: 45 43 54 4f 42 4a 45 43 54 53 43 41 4c 4c 42 41  ECTOBJECTSCALLBA
1bf0: 43 4b 3b 0d 0a 65 78 74 65 72 6e 28 57 69 6e 64  CK;..extern(Wind
1c00: 6f 77 73 29 20 61 6c 69 61 73 20 62 6f 6f 6c 20  ows) alias bool 
1c10: 66 75 6e 63 74 69 6f 6e 28 44 49 46 49 4c 45 45  function(DIFILEE
1c20: 46 46 45 43 54 2a 20 2c 20 4c 50 56 4f 49 44 29  FFECT* , LPVOID)
1c30: 20 4c 50 44 49 45 4e 55 4d 45 46 46 45 43 54 53   LPDIENUMEFFECTS
1c40: 49 4e 46 49 4c 45 43 41 4c 4c 42 41 43 4b 3b 0d  INFILECALLBACK;.
1c50: 0a 65 78 74 65 72 6e 28 57 69 6e 64 6f 77 73 29  .extern(Windows)
1c60: 20 61 6c 69 61 73 20 62 6f 6f 6c 20 66 75 6e 63   alias bool func
1c70: 74 69 6f 6e 28 49 55 6e 6b 6e 6f 77 6e 2c 20 4c  tion(IUnknown, L
1c80: 50 56 4f 49 44 29 20 4c 50 44 49 43 4f 4e 46 49  PVOID) LPDICONFI
1c90: 47 55 52 45 44 45 56 49 43 45 53 43 41 4c 4c 42  GUREDEVICESCALLB
1ca0: 41 43 4b 3b 0d 0a 0d 0a 69 6e 74 65 72 66 61 63  ACK;....interfac
1cb0: 65 20 49 44 69 72 65 63 74 49 6e 70 75 74 44 65  e IDirectInputDe
1cc0: 76 69 63 65 38 41 20 3a 20 49 55 6e 6b 6e 6f 77  vice8A : IUnknow
1cd0: 6e 0d 0a 7b 0d 0a 20 20 20 20 48 52 45 53 55 4c  n..{..    HRESUL
1ce0: 54 20 47 65 74 43 61 70 61 62 69 6c 69 74 69 65  T GetCapabilitie
1cf0: 73 28 44 49 44 45 56 43 41 50 53 2a 29 3b 0d 0a  s(DIDEVCAPS*);..
1d00: 20 20 20 20 48 52 45 53 55 4c 54 20 45 6e 75 6d      HRESULT Enum
1d10: 4f 62 6a 65 63 74 73 28 4c 50 44 49 45 4e 55 4d  Objects(LPDIENUM
1d20: 44 45 56 49 43 45 4f 42 4a 45 43 54 53 43 41 4c  DEVICEOBJECTSCAL
1d30: 4c 42 41 43 4b 41 2c 20 56 4f 49 44 2a 2c 20 44  LBACKA, VOID*, D
1d40: 57 4f 52 44 29 3b 0d 0a 20 20 20 20 48 52 45 53  WORD);..    HRES
1d50: 55 4c 54 20 47 65 74 50 72 6f 70 65 72 74 79 28  ULT GetProperty(
1d60: 47 55 49 44 2a 2c 20 44 49 50 52 4f 50 48 45 41  GUID*, DIPROPHEA
1d70: 44 45 52 2a 29 3b 0d 0a 20 20 20 20 48 52 45 53  DER*);..    HRES
1d80: 55 4c 54 20 53 65 74 50 72 6f 70 65 72 74 79 28  ULT SetProperty(
1d90: 47 55 49 44 2a 2c 20 44 49 50 52 4f 50 48 45 41  GUID*, DIPROPHEA
1da0: 44 45 52 2a 29 3b 0d 0a 20 20 20 20 48 52 45 53  DER*);..    HRES
1db0: 55 4c 54 20 41 63 71 75 69 72 65 28 29 3b 0d 0a  ULT Acquire();..
1dc0: 20 20 20 20 48 52 45 53 55 4c 54 20 55 6e 61 63      HRESULT Unac
1dd0: 71 75 69 72 65 28 29 3b 0d 0a 20 20 20 20 48 52  quire();..    HR
1de0: 45 53 55 4c 54 20 47 65 74 44 65 76 69 63 65 53  ESULT GetDeviceS
1df0: 74 61 74 65 28 44 57 4f 52 44 2c 20 4c 50 56 4f  tate(DWORD, LPVO
1e00: 49 44 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c  ID);..    HRESUL
1e10: 54 20 47 65 74 44 65 76 69 63 65 44 61 74 61 28  T GetDeviceData(
1e20: 44 57 4f 52 44 2c 20 44 49 44 45 56 49 43 45 4f  DWORD, DIDEVICEO
1e30: 42 4a 45 43 54 44 41 54 41 2a 2c 20 4c 50 44 57  BJECTDATA*, LPDW
1e40: 4f 52 44 2c 20 44 57 4f 52 44 29 3b 0d 0a 20 20  ORD, DWORD);..  
1e50: 20 20 48 52 45 53 55 4c 54 20 53 65 74 44 61 74    HRESULT SetDat
1e60: 61 46 6f 72 6d 61 74 28 44 49 44 41 54 41 46 4f  aFormat(DIDATAFO
1e70: 52 4d 41 54 2a 29 3b 0d 0a 20 20 20 20 48 52 45  RMAT*);..    HRE
1e80: 53 55 4c 54 20 53 65 74 45 76 65 6e 74 4e 6f 74  SULT SetEventNot
1e90: 69 66 69 63 61 74 69 6f 6e 28 48 41 4e 44 4c 45  ification(HANDLE
1ea0: 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20  );..    HRESULT 
1eb0: 53 65 74 43 6f 6f 70 65 72 61 74 69 76 65 4c 65  SetCooperativeLe
1ec0: 76 65 6c 28 48 57 4e 44 2c 20 44 57 4f 52 44 29  vel(HWND, DWORD)
1ed0: 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 47  ;..    HRESULT G
1ee0: 65 74 4f 62 6a 65 63 74 49 6e 66 6f 28 44 49 44  etObjectInfo(DID
1ef0: 45 56 49 43 45 4f 42 4a 45 43 54 49 4e 53 54 41  EVICEOBJECTINSTA
1f00: 4e 43 45 41 2a 2c 20 44 57 4f 52 44 2c 20 44 57  NCEA*, DWORD, DW
1f10: 4f 52 44 29 3b 0d 0a 20 20 20 20 48 52 45 53 55  ORD);..    HRESU
1f20: 4c 54 20 47 65 74 44 65 76 69 63 65 49 6e 66 6f  LT GetDeviceInfo
1f30: 28 44 49 44 45 56 49 43 45 49 4e 53 54 41 4e 43  (DIDEVICEINSTANC
1f40: 45 41 2a 29 3b 0d 0a 20 20 20 20 48 52 45 53 55  EA*);..    HRESU
1f50: 4c 54 20 52 75 6e 43 6f 6e 74 72 6f 6c 50 61 6e  LT RunControlPan
1f60: 65 6c 28 48 57 4e 44 2c 20 44 57 4f 52 44 29 3b  el(HWND, DWORD);
1f70: 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 49 6e  ..    HRESULT In
1f80: 69 74 69 61 6c 69 7a 65 28 48 49 4e 53 54 41 4e  itialize(HINSTAN
1f90: 43 45 2c 20 44 57 4f 52 44 2c 20 47 55 49 44 2a  CE, DWORD, GUID*
1fa0: 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20  );..    HRESULT 
1fb0: 43 72 65 61 74 65 45 66 66 65 63 74 28 47 55 49  CreateEffect(GUI
1fc0: 44 2a 2c 20 44 49 45 46 46 45 43 54 2a 2c 20 49  D*, DIEFFECT*, I
1fd0: 44 69 72 65 63 74 49 6e 70 75 74 45 66 66 65 63  DirectInputEffec
1fe0: 74 2a 2c 20 49 55 6e 6b 6e 6f 77 6e 29 3b 0d 0a  t*, IUnknown);..
1ff0: 20 20 20 20 48 52 45 53 55 4c 54 20 45 6e 75 6d      HRESULT Enum
2000: 45 66 66 65 63 74 73 28 4c 50 44 49 45 4e 55 4d  Effects(LPDIENUM
2010: 45 46 46 45 43 54 53 43 41 4c 4c 42 41 43 4b 41  EFFECTSCALLBACKA
2020: 2c 20 4c 50 56 4f 49 44 2c 20 44 57 4f 52 44 29  , LPVOID, DWORD)
2030: 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 47  ;..    HRESULT G
2040: 65 74 45 66 66 65 63 74 49 6e 66 6f 28 44 49 45  etEffectInfo(DIE
2050: 46 46 45 43 54 49 4e 46 4f 41 2a 2c 20 47 55 49  FFECTINFOA*, GUI
2060: 44 2a 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c  D*);..    HRESUL
2070: 54 20 47 65 74 46 6f 72 63 65 46 65 65 64 62 61  T GetForceFeedba
2080: 63 6b 53 74 61 74 65 28 4c 50 44 57 4f 52 44 29  ckState(LPDWORD)
2090: 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 53  ;..    HRESULT S
20a0: 65 6e 64 46 6f 72 63 65 46 65 65 64 62 61 63 6b  endForceFeedback
20b0: 43 6f 6d 6d 61 6e 64 28 44 57 4f 52 44 29 3b 0d  Command(DWORD);.
20c0: 0a 20 20 20 20 48 52 45 53 55 4c 54 20 45 6e 75  .    HRESULT Enu
20d0: 6d 43 72 65 61 74 65 64 45 66 66 65 63 74 4f 62  mCreatedEffectOb
20e0: 6a 65 63 74 73 28 4c 50 44 49 45 4e 55 4d 43 52  jects(LPDIENUMCR
20f0: 45 41 54 45 44 45 46 46 45 43 54 4f 42 4a 45 43  EATEDEFFECTOBJEC
2100: 54 53 43 41 4c 4c 42 41 43 4b 2c 20 4c 50 56 4f  TSCALLBACK, LPVO
2110: 49 44 2c 20 44 57 4f 52 44 29 3b 0d 0a 20 20 20  ID, DWORD);..   
2120: 20 48 52 45 53 55 4c 54 20 45 73 63 61 70 65 28   HRESULT Escape(
2130: 44 49 45 46 46 45 53 43 41 50 45 2a 29 3b 0d 0a  DIEFFESCAPE*);..
2140: 20 20 20 20 48 52 45 53 55 4c 54 20 50 6f 6c 6c      HRESULT Poll
2150: 28 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54  ();..    HRESULT
2160: 20 53 65 6e 64 44 65 76 69 63 65 44 61 74 61 28   SendDeviceData(
2170: 44 57 4f 52 44 2c 20 44 49 44 45 56 49 43 45 4f  DWORD, DIDEVICEO
2180: 42 4a 45 43 54 44 41 54 41 2a 2c 20 4c 50 44 57  BJECTDATA*, LPDW
2190: 4f 52 44 2c 20 44 57 4f 52 44 29 3b 0d 0a 20 20  ORD, DWORD);..  
21a0: 20 20 48 52 45 53 55 4c 54 20 45 6e 75 6d 45 66    HRESULT EnumEf
21b0: 66 65 63 74 73 49 6e 46 69 6c 65 28 4c 50 43 53  fectsInFile(LPCS
21c0: 54 52 2c 20 4c 50 44 49 45 4e 55 4d 45 46 46 45  TR, LPDIENUMEFFE
21d0: 43 54 53 49 4e 46 49 4c 45 43 41 4c 4c 42 41 43  CTSINFILECALLBAC
21e0: 4b 2c 20 4c 50 56 4f 49 44 2c 20 44 57 4f 52 44  K, LPVOID, DWORD
21f0: 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20  );..    HRESULT 
2200: 57 72 69 74 65 45 66 66 65 63 74 54 6f 46 69 6c  WriteEffectToFil
2210: 65 28 4c 50 43 53 54 52 2c 20 44 57 4f 52 44 2c  e(LPCSTR, DWORD,
2220: 20 44 49 46 49 4c 45 45 46 46 45 43 54 2a 2c 20   DIFILEEFFECT*, 
2230: 44 57 4f 52 44 29 3b 0d 0a 20 20 20 20 48 52 45  DWORD);..    HRE
2240: 53 55 4c 54 20 42 75 69 6c 64 41 63 74 69 6f 6e  SULT BuildAction
2250: 4d 61 70 28 44 49 41 43 54 49 4f 4e 46 4f 52 4d  Map(DIACTIONFORM
2260: 41 54 41 2a 2c 20 4c 50 43 53 54 52 2c 20 44 57  ATA*, LPCSTR, DW
2270: 4f 52 44 29 3b 0d 0a 20 20 20 20 48 52 45 53 55  ORD);..    HRESU
2280: 4c 54 20 53 65 74 41 63 74 69 6f 6e 4d 61 70 28  LT SetActionMap(
2290: 44 49 41 43 54 49 4f 4e 46 4f 52 4d 41 54 41 2a  DIACTIONFORMATA*
22a0: 2c 20 4c 50 43 53 54 52 2c 20 44 57 4f 52 44 29  , LPCSTR, DWORD)
22b0: 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 47  ;..    HRESULT G
22c0: 65 74 49 6d 61 67 65 49 6e 66 6f 28 44 49 44 45  etImageInfo(DIDE
22d0: 56 49 43 45 49 4d 41 47 45 49 4e 46 4f 48 45 41  VICEIMAGEINFOHEA
22e0: 44 45 52 41 2a 29 3b 0d 0a 7d 0d 0a 61 6c 69 61  DERA*);..}..alia
22f0: 73 20 49 44 69 72 65 63 74 49 6e 70 75 74 44 65  s IDirectInputDe
2300: 76 69 63 65 38 41 20 49 44 69 72 65 63 74 49 6e  vice8A IDirectIn
2310: 70 75 74 44 65 76 69 63 65 38 3b 0d 0a 0d 0a 69  putDevice8;....i
2320: 6e 74 65 72 66 61 63 65 20 49 44 69 72 65 63 74  nterface IDirect
2330: 49 6e 70 75 74 38 41 20 3a 20 49 55 6e 6b 6e 6f  Input8A : IUnkno
2340: 77 6e 0d 0a 7b 0d 0a 65 78 74 65 72 6e 28 57 69  wn..{..extern(Wi
2350: 6e 64 6f 77 73 29 3a 0d 0a 20 20 20 20 48 52 45  ndows):..    HRE
2360: 53 55 4c 54 20 43 72 65 61 74 65 44 65 76 69 63  SULT CreateDevic
2370: 65 28 47 55 49 44 2a 2c 20 49 44 69 72 65 63 74  e(GUID*, IDirect
2380: 49 6e 70 75 74 44 65 76 69 63 65 38 41 2a 2c 20  InputDevice8A*, 
2390: 49 55 6e 6b 6e 6f 77 6e 29 3b 0d 0a 20 20 20 20  IUnknown);..    
23a0: 48 52 45 53 55 4c 54 20 45 6e 75 6d 44 65 76 69  HRESULT EnumDevi
23b0: 63 65 73 28 44 57 4f 52 44 2c 20 4c 50 44 49 45  ces(DWORD, LPDIE
23c0: 4e 55 4d 44 45 56 49 43 45 53 43 41 4c 4c 42 41  NUMDEVICESCALLBA
23d0: 43 4b 41 2c 20 4c 50 56 4f 49 44 2c 20 44 57 4f  CKA, LPVOID, DWO
23e0: 52 44 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c  RD);..    HRESUL
23f0: 54 20 47 65 74 44 65 76 69 63 65 53 74 61 74 75  T GetDeviceStatu
2400: 73 28 47 55 49 44 2a 29 3b 0d 0a 20 20 20 20 48  s(GUID*);..    H
2410: 52 45 53 55 4c 54 20 52 75 6e 43 6f 6e 74 72 6f  RESULT RunContro
2420: 6c 50 61 6e 65 6c 28 48 57 4e 44 2c 20 44 57 4f  lPanel(HWND, DWO
2430: 52 44 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c  RD);..    HRESUL
2440: 54 20 49 6e 69 74 69 61 6c 69 7a 65 28 48 49 4e  T Initialize(HIN
2450: 53 54 41 4e 43 45 2c 20 44 57 4f 52 44 29 3b 0d  STANCE, DWORD);.
2460: 0a 20 20 20 20 48 52 45 53 55 4c 54 20 46 69 6e  .    HRESULT Fin
2470: 64 44 65 76 69 63 65 28 47 55 49 44 2a 2c 20 4c  dDevice(GUID*, L
2480: 50 43 53 54 52 2c 20 47 55 49 44 2a 29 3b 0d 0a  PCSTR, GUID*);..
2490: 20 20 20 20 48 52 45 53 55 4c 54 20 45 6e 75 6d      HRESULT Enum
24a0: 44 65 76 69 63 65 73 42 79 53 65 6d 61 6e 74 69  DevicesBySemanti
24b0: 63 73 28 4c 50 43 53 54 52 2c 20 44 49 41 43 54  cs(LPCSTR, DIACT
24c0: 49 4f 4e 46 4f 52 4d 41 54 41 2a 2c 20 4c 50 44  IONFORMATA*, LPD
24d0: 49 45 4e 55 4d 44 45 56 49 43 45 53 42 59 53 45  IENUMDEVICESBYSE
24e0: 4d 41 4e 54 49 43 53 43 42 41 2c 20 4c 50 56 4f  MANTICSCBA, LPVO
24f0: 49 44 2c 20 44 57 4f 52 44 29 3b 0d 0a 20 20 20  ID, DWORD);..   
2500: 20 48 52 45 53 55 4c 54 20 43 6f 6e 66 69 67 75   HRESULT Configu
2510: 72 65 44 65 76 69 63 65 73 28 4c 50 44 49 43 4f  reDevices(LPDICO
2520: 4e 46 49 47 55 52 45 44 45 56 49 43 45 53 43 41  NFIGUREDEVICESCA
2530: 4c 4c 42 41 43 4b 2c 20 44 49 43 4f 4e 46 49 47  LLBACK, DICONFIG
2540: 55 52 45 44 45 56 49 43 45 53 50 41 52 41 4d 53  UREDEVICESPARAMS
2550: 41 2a 2c 20 44 57 4f 52 44 2c 20 4c 50 56 4f 49  A*, DWORD, LPVOI
2560: 44 29 3b 0d 0a 7d 0d 0a 61 6c 69 61 73 20 49 44  D);..}..alias ID
2570: 69 72 65 63 74 49 6e 70 75 74 38 41 20 49 44 69  irectInput8A IDi
2580: 72 65 63 74 49 6e 70 75 74 38 3b 0d 0a 0d 0a 65  rectInput8;....e
2590: 78 74 65 72 6e 28 57 69 6e 64 6f 77 73 29 20 48  xtern(Windows) H
25a0: 52 45 53 55 4c 54 20 44 69 72 65 63 74 49 6e 70  RESULT DirectInp
25b0: 75 74 38 43 72 65 61 74 65 28 48 49 4e 53 54 41  ut8Create(HINSTA
25c0: 4e 43 45 20 68 69 6e 73 74 2c 20 44 57 4f 52 44  NCE hinst, DWORD
25d0: 20 64 77 56 65 72 73 69 6f 6e 2c 20 47 55 49 44   dwVersion, GUID
25e0: 2a 20 72 69 69 64 6c 74 66 2c 20 76 6f 69 64 2a  * riidltf, void*
25f0: 2a 20 70 70 76 4f 75 74 2c 20 49 55 6e 6b 6e 6f  * ppvOut, IUnkno
2600: 77 6e 20 70 75 6e 6b 4f 75 74 65 72 29 3b 0d 0a  wn punkOuter);..
2610: 0d 0a 63 6f 6e 73 74 20 47 55 49 44 20 49 49 44  ..const GUID IID
2620: 5f 49 44 69 72 65 63 74 49 6e 70 75 74 38 41 3d  _IDirectInput8A=
2630: 7b 30 78 42 46 37 39 38 30 33 30 2c 20 30 78 34  {0xBF798030, 0x4
2640: 38 33 41 2c 20 30 78 34 44 41 32 2c 20 5b 30 78  83A, 0x4DA2, [0x
2650: 41 41 2c 20 30 78 39 39 2c 20 30 78 35 44 2c 20  AA, 0x99, 0x5D, 
2660: 30 78 36 34 2c 20 30 78 45 44 2c 20 30 78 33 36  0x64, 0xED, 0x36
2670: 2c 20 30 78 39 37 2c 20 30 78 30 30 5d 7d 3b 0d  , 0x97, 0x00]};.
2680: 0a 61 6c 69 61 73 20 49 49 44 5f 49 44 69 72 65  .alias IID_IDire
2690: 63 74 49 6e 70 75 74 38 41 20 49 49 44 5f 49 44  ctInput8A IID_ID
26a0: 69 72 65 63 74 49 6e 70 75 74 38 3b 0d 0a 63 6f  irectInput8;..co
26b0: 6e 73 74 20 47 55 49 44 20 47 55 49 44 5f 53 79  nst GUID GUID_Sy
26c0: 73 4b 65 79 62 6f 61 72 64 20 3d 20 7b 30 78 36  sKeyboard = {0x6
26d0: 46 31 44 32 42 36 31 2c 20 30 78 44 35 41 30 2c  F1D2B61, 0xD5A0,
26e0: 20 30 78 31 31 43 46 2c 20 5b 30 78 42 46 2c 20   0x11CF, [0xBF, 
26f0: 30 78 43 37 2c 20 30 78 34 34 2c 20 30 78 34 35  0xC7, 0x44, 0x45
2700: 2c 20 30 78 35 33 2c 20 30 78 35 34 2c 20 30 78  , 0x53, 0x54, 0x
2710: 30 30 2c 20 30 78 30 30 5d 7d 3b 0d 0a 63 6f 6e  00, 0x00]};..con
2720: 73 74 20 47 55 49 44 20 47 55 49 44 5f 53 79 73  st GUID GUID_Sys
2730: 4d 6f 75 73 65 20 3d 20 20 20 20 7b 30 78 36 46  Mouse =    {0x6F
2740: 31 44 32 42 36 30 2c 20 30 78 44 35 41 30 2c 20  1D2B60, 0xD5A0, 
2750: 30 78 31 31 43 46 2c 20 5b 30 78 42 46 2c 20 30  0x11CF, [0xBF, 0
2760: 78 43 37 2c 20 30 78 34 34 2c 20 30 78 34 35 2c  xC7, 0x44, 0x45,
2770: 20 30 78 35 33 2c 20 30 78 35 34 2c 20 30 78 30   0x53, 0x54, 0x0
2780: 30 2c 20 30 78 30 30 5d 7d 3b 0d 0a 63 6f 6e 73  0, 0x00]};..cons
2790: 74 20 47 55 49 44 20 47 55 49 44 5f 58 41 78 69  t GUID GUID_XAxi
27a0: 73 20 3d 20 20 20 20 20 20 20 7b 30 78 41 33 36  s =       {0xA36
27b0: 44 30 32 45 30 2c 20 30 78 43 39 46 33 2c 20 30  D02E0, 0xC9F3, 0
27c0: 78 31 31 43 46 2c 20 5b 30 78 42 46 2c 20 30 78  x11CF, [0xBF, 0x
27d0: 43 37 2c 20 30 78 34 34 2c 20 30 78 34 35 2c 20  C7, 0x44, 0x45, 
27e0: 30 78 35 33 2c 20 30 78 35 34 2c 20 30 78 30 30  0x53, 0x54, 0x00
27f0: 2c 20 30 78 30 30 5d 7d 3b 0d 0a 63 6f 6e 73 74  , 0x00]};..const
2800: 20 47 55 49 44 20 47 55 49 44 5f 59 41 78 69 73   GUID GUID_YAxis
2810: 20 3d 20 20 20 20 20 20 20 7b 30 78 41 33 36 44   =       {0xA36D
2820: 30 32 45 31 2c 20 30 78 43 39 46 33 2c 20 30 78  02E1, 0xC9F3, 0x
2830: 31 31 43 46 2c 20 5b 30 78 42 46 2c 20 30 78 43  11CF, [0xBF, 0xC
2840: 37 2c 20 30 78 34 34 2c 20 30 78 34 35 2c 20 30  7, 0x44, 0x45, 0
2850: 78 35 33 2c 20 30 78 35 34 2c 20 30 78 30 30 2c  x53, 0x54, 0x00,
2860: 20 30 78 30 30 5d 7d 3b 0d 0a 63 6f 6e 73 74 20   0x00]};..const 
2870: 47 55 49 44 20 47 55 49 44 5f 5a 41 78 69 73 20  GUID GUID_ZAxis 
2880: 3d 20 20 20 20 20 20 20 7b 30 78 41 33 36 44 30  =       {0xA36D0
2890: 32 45 32 2c 20 30 78 43 39 46 33 2c 20 30 78 31  2E2, 0xC9F3, 0x1
28a0: 31 43 46 2c 20 5b 30 78 42 46 2c 20 30 78 43 37  1CF, [0xBF, 0xC7
28b0: 2c 20 30 78 34 34 2c 20 30 78 34 35 2c 20 30 78  , 0x44, 0x45, 0x
28c0: 35 33 2c 20 30 78 35 34 2c 20 30 78 30 30 2c 20  53, 0x54, 0x00, 
28d0: 30 78 30 30 5d 7d 3b 0d 0a 63 6f 6e 73 74 20 47  0x00]};..const G
28e0: 55 49 44 20 47 55 49 44 5f 52 78 41 78 69 73 20  UID GUID_RxAxis 
28f0: 3d 20 20 20 20 20 20 7b 30 78 41 33 36 44 30 32  =      {0xA36D02
2900: 46 34 2c 20 30 78 43 39 46 33 2c 20 30 78 31 31  F4, 0xC9F3, 0x11
2910: 43 46 2c 20 5b 30 78 42 46 2c 20 30 78 43 37 2c  CF, [0xBF, 0xC7,
2920: 20 30 78 34 34 2c 20 30 78 34 35 2c 20 30 78 35   0x44, 0x45, 0x5
2930: 33 2c 20 30 78 35 34 2c 20 30 78 30 30 2c 20 30  3, 0x54, 0x00, 0
2940: 78 30 30 5d 7d 3b 0d 0a 63 6f 6e 73 74 20 47 55  x00]};..const GU
2950: 49 44 20 47 55 49 44 5f 52 79 41 78 69 73 20 3d  ID GUID_RyAxis =
2960: 20 20 20 20 20 20 7b 30 78 41 33 36 44 30 32 46        {0xA36D02F
2970: 35 2c 20 30 78 43 39 46 33 2c 20 30 78 31 31 43  5, 0xC9F3, 0x11C
2980: 46 2c 20 5b 30 78 42 46 2c 20 30 78 43 37 2c 20  F, [0xBF, 0xC7, 
2990: 30 78 34 34 2c 20 30 78 34 35 2c 20 30 78 35 33  0x44, 0x45, 0x53
29a0: 2c 20 30 78 35 34 2c 20 30 78 30 30 2c 20 30 78  , 0x54, 0x00, 0x
29b0: 30 30 5d 7d 3b 0d 0a 63 6f 6e 73 74 20 47 55 49  00]};..const GUI
29c0: 44 20 47 55 49 44 5f 52 7a 41 78 69 73 20 3d 20  D GUID_RzAxis = 
29d0: 20 20 20 20 20 7b 30 78 41 33 36 44 30 32 45 33       {0xA36D02E3
29e0: 2c 20 30 78 43 39 46 33 2c 20 30 78 31 31 43 46  , 0xC9F3, 0x11CF
29f0: 2c 20 5b 30 78 42 46 2c 20 30 78 43 37 2c 20 30  , [0xBF, 0xC7, 0
2a00: 78 34 34 2c 20 30 78 34 35 2c 20 30 78 35 33 2c  x44, 0x45, 0x53,
2a10: 20 30 78 35 34 2c 20 30 78 30 30 2c 20 30 78 30   0x54, 0x00, 0x0
2a20: 30 5d 7d 3b 0d 0a 63 6f 6e 73 74 20 47 55 49 44  0]};..const GUID
2a30: 20 47 55 49 44 5f 53 6c 69 64 65 72 20 3d 20 20   GUID_Slider =  
2a40: 20 20 20 20 7b 30 78 41 33 36 44 30 32 45 34 2c      {0xA36D02E4,
2a50: 20 30 78 43 39 46 33 2c 20 30 78 31 31 43 46 2c   0xC9F3, 0x11CF,
2a60: 20 5b 30 78 42 46 2c 20 30 78 43 37 2c 20 30 78   [0xBF, 0xC7, 0x
2a70: 34 34 2c 20 30 78 34 35 2c 20 30 78 35 33 2c 20  44, 0x45, 0x53, 
2a80: 30 78 35 34 2c 20 30 78 30 30 2c 20 30 78 30 30  0x54, 0x00, 0x00
2a90: 5d 7d 3b 0d 0a 63 6f 6e 73 74 20 47 55 49 44 20  ]};..const GUID 
2aa0: 47 55 49 44 5f 4b 65 79 20 3d 20 20 20 20 20 20  GUID_Key =      
2ab0: 20 20 20 7b 30 78 35 35 37 32 38 32 32 30 2c 20     {0x55728220, 
2ac0: 30 78 44 33 33 43 2c 20 30 78 31 31 43 46 2c 20  0xD33C, 0x11CF, 
2ad0: 5b 30 78 42 46 2c 20 30 78 43 37 2c 20 30 78 34  [0xBF, 0xC7, 0x4
2ae0: 34 2c 20 30 78 34 35 2c 20 30 78 35 33 2c 20 30  4, 0x45, 0x53, 0
2af0: 78 35 34 2c 20 30 78 30 30 2c 20 30 78 30 30 5d  x54, 0x00, 0x00]
2b00: 7d 3b 0d 0a 63 6f 6e 73 74 20 47 55 49 44 20 47  };..const GUID G
2b10: 55 49 44 5f 50 4f 56 20 3d 20 20 20 20 20 20 20  UID_POV =       
2b20: 20 20 7b 30 78 41 33 36 44 30 32 46 32 2c 20 30    {0xA36D02F2, 0
2b30: 78 43 39 46 33 2c 20 30 78 31 31 43 46 2c 20 5b  xC9F3, 0x11CF, [
2b40: 30 78 42 46 2c 20 30 78 43 37 2c 20 30 78 34 34  0xBF, 0xC7, 0x44
2b50: 2c 20 30 78 34 35 2c 20 30 78 35 33 2c 20 30 78  , 0x45, 0x53, 0x
2b60: 35 34 2c 20 30 78 30 30 2c 20 30 78 30 30 5d 7d  54, 0x00, 0x00]}
2b70: 3b 0d 0a 0d 0a 65 6e 75 6d 20 3a 20 75 69 6e 74  ;....enum : uint
2b80: 0d 0a 7b 0d 0a 09 44 49 53 43 4c 5f 45 58 43 4c  ..{...DISCL_EXCL
2b90: 55 53 49 56 45 3d 20 20 20 20 20 30 78 30 30 30  USIVE=     0x000
2ba0: 30 30 30 30 31 2c 0d 0a 09 44 49 53 43 4c 5f 4e  00001,...DISCL_N
2bb0: 4f 4e 45 58 43 4c 55 53 49 56 45 3d 20 20 30 78  ONEXCLUSIVE=  0x
2bc0: 30 30 30 30 30 30 30 32 2c 0d 0a 09 44 49 53 43  00000002,...DISC
2bd0: 4c 5f 46 4f 52 45 47 52 4f 55 4e 44 3d 20 20 20  L_FOREGROUND=   
2be0: 20 30 78 30 30 30 30 30 30 30 34 2c 0d 0a 09 44   0x00000004,...D
2bf0: 49 53 43 4c 5f 42 41 43 4b 47 52 4f 55 4e 44 3d  ISCL_BACKGROUND=
2c00: 09 20 30 78 30 30 30 30 30 30 30 38 2c 0d 0a 09  . 0x00000008,...
2c10: 44 49 53 43 4c 5f 4e 4f 57 49 4e 4b 45 59 3d 20  DISCL_NOWINKEY= 
2c20: 20 20 20 20 20 30 78 30 30 30 30 30 30 31 30 2c       0x00000010,
2c30: 0d 0a 0d 0a 09 44 49 50 48 5f 44 45 56 49 43 45  .....DIPH_DEVICE
2c40: 3d 30 2c 0d 0a 09 44 49 50 48 5f 42 59 4f 46 46  =0,...DIPH_BYOFF
2c50: 53 45 54 3d 31 2c 0d 0a 0d 0a 09 44 49 38 44 45  SET=1,.....DI8DE
2c60: 56 43 4c 41 53 53 5f 47 41 4d 45 43 54 52 4c 3d  VCLASS_GAMECTRL=
2c70: 34 2c 0d 0a 09 44 49 45 44 46 4c 5f 41 54 54 41  4,...DIEDFL_ATTA
2c80: 43 48 45 44 4f 4e 4c 59 3d 20 20 20 20 20 30 78  CHEDONLY=     0x
2c90: 30 30 30 30 30 30 30 31 2c 0d 0a 09 44 49 44 46  00000001,...DIDF
2ca0: 54 5f 41 58 49 53 3d 20 20 20 20 20 20 20 20 20  T_AXIS=         
2cb0: 20 30 78 30 30 30 30 30 30 30 33 0d 0a 7d 0d 0a   0x00000003..}..
2cc0: 0d 0a 65 6e 75 6d 0d 0a 7b 0d 0a 09 53 45 56 45  ..enum..{...SEVE
2cd0: 52 49 54 59 5f 53 55 43 43 45 53 53 3d 20 20 20  RITY_SUCCESS=   
2ce0: 20 30 2c 0d 0a 09 53 45 56 45 52 49 54 59 5f 45   0,...SEVERITY_E
2cf0: 52 52 4f 52 3d 20 20 20 20 20 20 31 2c 0d 0a 09  RROR=      1,...
2d00: 46 41 43 49 4c 49 54 59 5f 57 49 4e 33 32 3d 20  FACILITY_WIN32= 
2d10: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
2d20: 20 20 37 2c 0d 0a 09 45 52 52 4f 52 5f 52 45 41    7,...ERROR_REA
2d30: 44 5f 46 41 55 4c 54 3d 20 20 20 20 20 20 20 20  D_FAULT=        
2d40: 20 20 20 20 20 20 20 20 20 33 30 4c 2c 0d 0a 09           30L,...
2d50: 44 49 45 4e 55 4d 5f 43 4f 4e 54 49 4e 55 45 3d  DIENUM_CONTINUE=
2d60: 20 20 20 20 20 20 20 20 20 31 2c 0d 0a 09 44 49           1,...DI
2d70: 50 48 5f 42 59 49 44 3d 20 20 20 20 20 20 20 20  PH_BYID=        
2d80: 20 20 20 20 20 20 20 32 0d 0a 7d 0d 0a 0d 0a 73         2..}....s
2d90: 74 72 75 63 74 20 44 49 50 52 4f 50 44 57 4f 52  truct DIPROPDWOR
2da0: 44 0d 0a 7b 0d 0a 20 20 20 20 44 49 50 52 4f 50  D..{..    DIPROP
2db0: 48 45 41 44 45 52 20 64 69 70 68 3b 0d 0a 20 20  HEADER diph;..  
2dc0: 20 20 44 57 4f 52 44 20 20 20 64 77 44 61 74 61    DWORD   dwData
2dd0: 3b 0d 0a 7d 0d 0a 0d 0a 74 65 6d 70 6c 61 74 65  ;..}....template
2de0: 20 4d 41 4b 45 5f 48 52 45 53 55 4c 54 28 75 69   MAKE_HRESULT(ui
2df0: 6e 74 20 73 65 76 2c 20 75 69 6e 74 20 66 61 63  nt sev, uint fac
2e00: 2c 20 75 69 6e 74 20 63 6f 64 65 29 0d 0a 7b 0d  , uint code)..{.
2e10: 0a 09 63 6f 6e 73 74 20 48 52 45 53 55 4c 54 20  ..const HRESULT 
2e20: 4d 41 4b 45 5f 48 52 45 53 55 4c 54 20 3d 20 63  MAKE_HRESULT = c
2e30: 61 73 74 28 48 52 45 53 55 4c 54 29 28 28 73 65  ast(HRESULT)((se
2e40: 76 20 3c 3c 20 33 31 29 20 7c 20 28 66 61 63 20  v << 31) | (fac 
2e50: 3c 3c 20 31 36 29 20 7c 20 63 6f 64 65 29 3b 0d  << 16) | code);.
2e60: 0a 7d 0d 0a 0d 0a 63 6f 6e 73 74 20 48 52 45 53  .}....const HRES
2e70: 55 4c 54 20 44 49 45 52 52 5f 4f 4c 44 44 49 52  ULT DIERR_OLDDIR
2e80: 45 43 54 49 4e 50 55 54 56 45 52 53 49 4f 4e 20  ECTINPUTVERSION 
2e90: 20 20 20 20 20 20 20 20 20 20 20 20 3d 20 4d 41              = MA
2ea0: 4b 45 5f 48 52 45 53 55 4c 54 21 28 53 45 56 45  KE_HRESULT!(SEVE
2eb0: 52 49 54 59 5f 45 52 52 4f 52 2c 20 46 41 43 49  RITY_ERROR, FACI
2ec0: 4c 49 54 59 5f 57 49 4e 33 32 2c 20 31 31 35 30  LITY_WIN32, 1150
2ed0: 29 3b 0d 0a 63 6f 6e 73 74 20 48 52 45 53 55 4c  );..const HRESUL
2ee0: 54 20 44 49 45 52 52 5f 42 45 54 41 44 49 52 45  T DIERR_BETADIRE
2ef0: 43 54 49 4e 50 55 54 56 45 52 53 49 4f 4e 20 20  CTINPUTVERSION  
2f00: 20 20 20 20 20 20 20 20 20 20 3d 20 4d 41 4b 45            = MAKE
2f10: 5f 48 52 45 53 55 4c 54 21 28 53 45 56 45 52 49  _HRESULT!(SEVERI
2f20: 54 59 5f 45 52 52 4f 52 2c 20 46 41 43 49 4c 49  TY_ERROR, FACILI
2f30: 54 59 5f 57 49 4e 33 32 2c 20 31 31 35 33 29 3b  TY_WIN32, 1153);
2f40: 0d 0a 63 6f 6e 73 74 20 48 52 45 53 55 4c 54 20  ..const HRESULT 
2f50: 44 49 45 52 52 5f 42 41 44 44 52 49 56 45 52 56  DIERR_BADDRIVERV
2f60: 45 52 20 20 20 20 20 20 20 20 20 20 20 20 20 20  ER              
2f70: 20 20 20 20 20 20 20 20 3d 20 4d 41 4b 45 5f 48          = MAKE_H
2f80: 52 45 53 55 4c 54 21 28 53 45 56 45 52 49 54 59  RESULT!(SEVERITY
2f90: 5f 45 52 52 4f 52 2c 20 46 41 43 49 4c 49 54 59  _ERROR, FACILITY
2fa0: 5f 57 49 4e 33 32 2c 20 31 31 39 29 3b 0d 0a 63  _WIN32, 119);..c
2fb0: 6f 6e 73 74 20 48 52 45 53 55 4c 54 20 44 49 45  onst HRESULT DIE
2fc0: 52 52 5f 44 45 56 49 43 45 4e 4f 54 52 45 47 20  RR_DEVICENOTREG 
2fd0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
2fe0: 20 20 20 20 20 3d 20 30 78 38 30 30 34 30 31 35       = 0x8004015
2ff0: 34 3b 0d 0a 63 6f 6e 73 74 20 48 52 45 53 55 4c  4;..const HRESUL
3000: 54 20 44 49 45 52 52 5f 4e 4f 54 46 4f 55 4e 44  T DIERR_NOTFOUND
3010: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
3020: 20 20 20 20 20 20 20 20 20 20 3d 20 4d 41 4b 45            = MAKE
3030: 5f 48 52 45 53 55 4c 54 21 28 53 45 56 45 52 49  _HRESULT!(SEVERI
3040: 54 59 5f 45 52 52 4f 52 2c 20 46 41 43 49 4c 49  TY_ERROR, FACILI
3050: 54 59 5f 57 49 4e 33 32 2c 20 45 52 52 4f 52 5f  TY_WIN32, ERROR_
3060: 46 49 4c 45 5f 4e 4f 54 5f 46 4f 55 4e 44 29 3b  FILE_NOT_FOUND);
3070: 0d 0a 63 6f 6e 73 74 20 48 52 45 53 55 4c 54 20  ..const HRESULT 
3080: 44 49 45 52 52 5f 4f 42 4a 45 43 54 4e 4f 54 46  DIERR_OBJECTNOTF
3090: 4f 55 4e 44 20 20 20 20 20 20 20 20 20 20 20 20  OUND            
30a0: 20 20 20 20 20 20 20 20 3d 20 4d 41 4b 45 5f 48          = MAKE_H
30b0: 52 45 53 55 4c 54 21 28 53 45 56 45 52 49 54 59  RESULT!(SEVERITY
30c0: 5f 45 52 52 4f 52 2c 20 46 41 43 49 4c 49 54 59  _ERROR, FACILITY
30d0: 5f 57 49 4e 33 32 2c 20 45 52 52 4f 52 5f 46 49  _WIN32, ERROR_FI
30e0: 4c 45 5f 4e 4f 54 5f 46 4f 55 4e 44 29 3b 0d 0a  LE_NOT_FOUND);..
30f0: 63 6f 6e 73 74 20 48 52 45 53 55 4c 54 20 44 49  const HRESULT DI
3100: 45 52 52 5f 49 4e 56 41 4c 49 44 50 41 52 41 4d  ERR_INVALIDPARAM
3110: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
3120: 20 20 20 20 20 20 3d 20 45 5f 49 4e 56 41 4c 49        = E_INVALI
3130: 44 41 52 47 3b 0d 0a 63 6f 6e 73 74 20 48 52 45  DARG;..const HRE
3140: 53 55 4c 54 20 44 49 45 52 52 5f 4e 4f 49 4e 54  SULT DIERR_NOINT
3150: 45 52 46 41 43 45 20 20 20 20 20 20 20 20 20 20  ERFACE          
3160: 20 20 20 20 20 20 20 20 20 20 20 20 20 3d 20 45               = E
3170: 5f 4e 4f 49 4e 54 45 52 46 41 43 45 3b 0d 0a 63  _NOINTERFACE;..c
3180: 6f 6e 73 74 20 48 52 45 53 55 4c 54 20 44 49 45  onst HRESULT DIE
3190: 52 52 5f 47 45 4e 45 52 49 43 20 20 20 20 20 20  RR_GENERIC      
31a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
31b0: 20 20 20 20 20 3d 20 45 5f 46 41 49 4c 3b 0d 0a       = E_FAIL;..
31c0: 63 6f 6e 73 74 20 48 52 45 53 55 4c 54 20 44 49  const HRESULT DI
31d0: 45 52 52 5f 4f 55 54 4f 46 4d 45 4d 4f 52 59 20  ERR_OUTOFMEMORY 
31e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
31f0: 20 20 20 20 20 20 3d 20 45 5f 4f 55 54 4f 46 4d        = E_OUTOFM
3200: 45 4d 4f 52 59 3b 0d 0a 63 6f 6e 73 74 20 48 52  EMORY;..const HR
3210: 45 53 55 4c 54 20 44 49 45 52 52 5f 55 4e 53 55  ESULT DIERR_UNSU
3220: 50 50 4f 52 54 45 44 20 20 20 20 20 20 20 20 20  PPORTED         
3230: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3d 20                = 
3240: 45 5f 4e 4f 54 49 4d 50 4c 3b 0d 0a 63 6f 6e 73  E_NOTIMPL;..cons
3250: 74 20 48 52 45 53 55 4c 54 20 44 49 45 52 52 5f  t HRESULT DIERR_
3260: 4e 4f 54 49 4e 49 54 49 41 4c 49 5a 45 44 20 20  NOTINITIALIZED  
3270: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
3280: 20 20 3d 20 4d 41 4b 45 5f 48 52 45 53 55 4c 54    = MAKE_HRESULT
3290: 21 28 53 45 56 45 52 49 54 59 5f 45 52 52 4f 52  !(SEVERITY_ERROR
32a0: 2c 20 46 41 43 49 4c 49 54 59 5f 57 49 4e 33 32  , FACILITY_WIN32
32b0: 2c 20 32 31 29 3b 0d 0a 63 6f 6e 73 74 20 48 52  , 21);..const HR
32c0: 45 53 55 4c 54 20 44 49 45 52 52 5f 41 4c 52 45  ESULT DIERR_ALRE
32d0: 41 44 59 49 4e 49 54 49 41 4c 49 5a 45 44 20 20  ADYINITIALIZED  
32e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3d 20                = 
32f0: 4d 41 4b 45 5f 48 52 45 53 55 4c 54 21 28 53 45  MAKE_HRESULT!(SE
3300: 56 45 52 49 54 59 5f 45 52 52 4f 52 2c 20 46 41  VERITY_ERROR, FA
3310: 43 49 4c 49 54 59 5f 57 49 4e 33 32 2c 20 31 32  CILITY_WIN32, 12
3320: 34 37 29 3b 0d 0a 63 6f 6e 73 74 20 48 52 45 53  47);..const HRES
3330: 55 4c 54 20 44 49 45 52 52 5f 4e 4f 41 47 47 52  ULT DIERR_NOAGGR
3340: 45 47 41 54 49 4f 4e 20 20 20 20 20 20 20 20 20  EGATION         
3350: 20 20 20 20 20 20 20 20 20 20 20 20 3d 20 43 4c              = CL
3360: 41 53 53 5f 45 5f 4e 4f 41 47 47 52 45 47 41 54  ASS_E_NOAGGREGAT
3370: 49 4f 4e 3b 0d 0a 63 6f 6e 73 74 20 48 52 45 53  ION;..const HRES
3380: 55 4c 54 20 44 49 45 52 52 5f 4f 54 48 45 52 41  ULT DIERR_OTHERA
3390: 50 50 48 41 53 50 52 49 4f 20 20 20 20 20 20 20  PPHASPRIO       
33a0: 20 20 20 20 20 20 20 20 20 20 20 20 3d 20 30 78              = 0x
33b0: 38 30 30 37 30 30 30 35 3b 0d 0a 63 6f 6e 73 74  80070005;..const
33c0: 20 48 52 45 53 55 4c 54 20 44 49 45 52 52 5f 49   HRESULT DIERR_I
33d0: 4e 50 55 54 4c 4f 53 54 20 20 20 20 20 20 20 20  NPUTLOST        
33e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
33f0: 20 3d 20 4d 41 4b 45 5f 48 52 45 53 55 4c 54 21   = MAKE_HRESULT!
3400: 28 53 45 56 45 52 49 54 59 5f 45 52 52 4f 52 2c  (SEVERITY_ERROR,
3410: 20 46 41 43 49 4c 49 54 59 5f 57 49 4e 33 32 2c   FACILITY_WIN32,
3420: 20 45 52 52 4f 52 5f 52 45 41 44 5f 46 41 55 4c   ERROR_READ_FAUL
3430: 54 29 3b 0d 0a 63 6f 6e 73 74 20 48 52 45 53 55  T);..const HRESU
3440: 4c 54 20 44 49 45 52 52 5f 41 43 51 55 49 52 45  LT DIERR_ACQUIRE
3450: 44 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  D               
3460: 20 20 20 20 20 20 20 20 20 20 20 3d 20 4d 41 4b             = MAK
3470: 45 5f 48 52 45 53 55 4c 54 21 28 53 45 56 45 52  E_HRESULT!(SEVER
3480: 49 54 59 5f 45 52 52 4f 52 2c 20 46 41 43 49 4c  ITY_ERROR, FACIL
3490: 49 54 59 5f 57 49 4e 33 32 2c 20 31 37 30 29 3b  ITY_WIN32, 170);
34a0: 0d 0a 63 6f 6e 73 74 20 48 52 45 53 55 4c 54 20  ..const HRESULT 
34b0: 44 49 45 52 52 5f 4e 4f 54 41 43 51 55 49 52 45  DIERR_NOTACQUIRE
34c0: 44 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  D               
34d0: 20 20 20 20 20 20 20 20 3d 20 4d 41 4b 45 5f 48          = MAKE_H
34e0: 52 45 53 55 4c 54 21 28 53 45 56 45 52 49 54 59  RESULT!(SEVERITY
34f0: 5f 45 52 52 4f 52 2c 20 46 41 43 49 4c 49 54 59  _ERROR, FACILITY
3500: 5f 57 49 4e 33 32 2c 20 31 32 29 3b 0d 0a 63 6f  _WIN32, 12);..co
3510: 6e 73 74 20 48 52 45 53 55 4c 54 20 44 49 45 52  nst HRESULT DIER
3520: 52 5f 52 45 41 44 4f 4e 4c 59 20 20 20 20 20 20  R_READONLY      
3530: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
3540: 20 20 20 20 3d 20 30 78 38 30 30 37 30 30 30 35      = 0x80070005
3550: 3b 0d 0a 63 6f 6e 73 74 20 48 52 45 53 55 4c 54  ;..const HRESULT
3560: 20 44 49 45 52 52 5f 48 41 4e 44 4c 45 45 58 49   DIERR_HANDLEEXI
3570: 53 54 53 20 20 20 20 20 20 20 20 20 20 20 20 20  STS             
3580: 20 20 20 20 20 20 20 20 20 3d 20 30 78 38 30 30           = 0x800
3590: 37 30 30 30 35 3b 0d 0a 63 6f 6e 73 74 20 48 52  70005;..const HR
35a0: 45 53 55 4c 54 20 44 49 45 52 52 5f 49 4e 53 55  ESULT DIERR_INSU
35b0: 46 46 49 43 49 45 4e 54 50 52 49 56 53 20 20 20  FFICIENTPRIVS   
35c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3d 20                = 
35d0: 30 78 38 30 30 34 30 32 30 30 3b 0d 0a 63 6f 6e  0x80040200;..con
35e0: 73 74 20 48 52 45 53 55 4c 54 20 44 49 45 52 52  st HRESULT DIERR
35f0: 5f 44 45 56 49 43 45 46 55 4c 4c 20 20 20 20 20  _DEVICEFULL     
3600: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
3610: 20 20 20 3d 20 30 78 38 30 30 34 30 32 30 31 3b     = 0x80040201;
3620: 0d 0a 63 6f 6e 73 74 20 48 52 45 53 55 4c 54 20  ..const HRESULT 
3630: 44 49 45 52 52 5f 4d 4f 52 45 44 41 54 41 20 20  DIERR_MOREDATA  
3640: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
3650: 20 20 20 20 20 20 20 20 3d 20 30 78 38 30 30 34          = 0x8004
3660: 30 32 30 32 3b 0d 0a 63 6f 6e 73 74 20 48 52 45  0202;..const HRE
3670: 53 55 4c 54 20 44 49 45 52 52 5f 4e 4f 54 44 4f  SULT DIERR_NOTDO
3680: 57 4e 4c 4f 41 44 45 44 20 20 20 20 20 20 20 20  WNLOADED        
3690: 20 20 20 20 20 20 20 20 20 20 20 20 20 3d 20 30               = 0
36a0: 78 38 30 30 34 30 32 30 33 3b 0d 0a 63 6f 6e 73  x80040203;..cons
36b0: 74 20 48 52 45 53 55 4c 54 20 44 49 45 52 52 5f  t HRESULT DIERR_
36c0: 48 41 53 45 46 46 45 43 54 53 20 20 20 20 20 20  HASEFFECTS      
36d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
36e0: 20 20 3d 20 30 78 38 30 30 34 30 32 30 34 3b 0d    = 0x80040204;.
36f0: 0a 63 6f 6e 73 74 20 48 52 45 53 55 4c 54 20 44  .const HRESULT D
3700: 49 45 52 52 5f 4e 4f 54 45 58 43 4c 55 53 49 56  IERR_NOTEXCLUSIV
3710: 45 41 43 51 55 49 52 45 44 20 20 20 20 20 20 20  EACQUIRED       
3720: 20 20 20 20 20 20 20 3d 20 30 78 38 30 30 34 30         = 0x80040
3730: 32 30 35 3b 0d 0a 63 6f 6e 73 74 20 48 52 45 53  205;..const HRES
3740: 55 4c 54 20 44 49 45 52 52 5f 49 4e 43 4f 4d 50  ULT DIERR_INCOMP
3750: 4c 45 54 45 45 46 46 45 43 54 20 20 20 20 20 20  LETEEFFECT      
3760: 20 20 20 20 20 20 20 20 20 20 20 20 3d 20 30 78              = 0x
3770: 38 30 30 34 30 32 30 36 3b 0d 0a 63 6f 6e 73 74  80040206;..const
3780: 20 48 52 45 53 55 4c 54 20 44 49 45 52 52 5f 4e   HRESULT DIERR_N
3790: 4f 54 42 55 46 46 45 52 45 44 20 20 20 20 20 20  OTBUFFERED      
37a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
37b0: 20 3d 20 30 78 38 30 30 34 30 32 30 37 3b 0d 0a   = 0x80040207;..
37c0: 63 6f 6e 73 74 20 48 52 45 53 55 4c 54 20 44 49  const HRESULT DI
37d0: 45 52 52 5f 45 46 46 45 43 54 50 4c 41 59 49 4e  ERR_EFFECTPLAYIN
37e0: 47 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  G               
37f0: 20 20 20 20 20 20 3d 20 30 78 38 30 30 34 30 32        = 0x800402
3800: 30 38 3b 0d 0a 63 6f 6e 73 74 20 48 52 45 53 55  08;..const HRESU
3810: 4c 54 20 44 49 45 52 52 5f 55 4e 50 4c 55 47 47  LT DIERR_UNPLUGG
3820: 45 44 20 20 20 20 20 20 20 20 20 20 20 20 20 20  ED              
3830: 20 20 20 20 20 20 20 20 20 20 20 3d 20 30 78 38             = 0x8
3840: 30 30 34 30 32 30 39 3b 0d 0a 63 6f 6e 73 74 20  0040209;..const 
3850: 48 52 45 53 55 4c 54 20 44 49 45 52 52 5f 52 45  HRESULT DIERR_RE
3860: 50 4f 52 54 46 55 4c 4c 20 20 20 20 20 20 20 20  PORTFULL        
3870: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
3880: 3d 20 30 78 38 30 30 34 30 32 30 41 3b 0d 0a 63  = 0x8004020A;..c
3890: 6f 6e 73 74 20 48 52 45 53 55 4c 54 20 44 49 45  onst HRESULT DIE
38a0: 52 52 5f 4d 41 50 46 49 4c 45 46 41 49 4c 20 20  RR_MAPFILEFAIL  
38b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
38c0: 20 20 20 20 20 3d 20 30 78 38 30 30 34 30 32 30       = 0x8004020
38d0: 42 3b 0d 0a                                      B;..