Ada计算机图形DirectX之dinput

------------------------------------
-- DirectX for Ada:dinput package --
--   From Microsoft DirectX SDK   --
--      By Dongfeng.Gu,2008/6     --
--         Follow GPL             --
-- Maybe Exist Bugs,you can modify--
-- them,and welcome e-mail to:    --
--         515639@qq.com          --
------------------------------------

--------------------------
-- Update at 2008/06/30 --
--------------------------

with win32;
use  win32;
with win32.rpcdce;
with win32.windef;
with win32.objbase;
use  win32.objbase;
with win32.winbase;
with win32.winnt;
with interfaces.C;
with Ada.unchecked_conversion;

package dinput is
    
   type LPDword_Array is access all Dword_Array;
   type LPLong_Array  is access all Long_Array;
    
   subtype GUID is win32.rpcdce.GUID;
    
   MAX_PATH:CONSTANT:=260;

   DIRECTINPUT_HEADER_VERSION:constant:=16#0800#; --40Line:dinput.h
   DIRECTINPUT_VERSION:constant:=DIRECTINPUT_HEADER_VERSION;
    
   -----------------------------------------------
   --Notice:Please modify your Win32.RPCDCE.GUID--
   --char_array(0..7) to UCHAR_ARRAY(0..7)      --
   -----------------------------------------------
   --Class IDs--
   CLSID_DirectInput:CONSTANT GUID:=(16#25E609E0#,16#B259#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   CLSID_DirectInputDevice:CONSTANT GUID:=(16#25E609E1#,16#B259#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));

   CLSID_DirectInput8:CONSTANT GUID:=(16#25E609E4#,16#B259#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   CLSID_DirectInputDevice8:CONSTANT GUID:=(16#25E609E5#,16#B259#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));

   --interfaces--
   IID_IDirectInputA       :CONSTANT GUID:=(16#89521360#,16#AA8A#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   IID_IDirectInputW       :CONSTANT GUID:=(16#89521361#,16#AA8A#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   IID_IDirectInput2A      :CONSTANT GUID:=(16#5944E662#,16#AA8A#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   IID_IDirectInput2W      :CONSTANT GUID:=(16#5944E663#,16#AA8A#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   IID_IDirectInput7A      :CONSTANT GUID:=(16#9A4CB684#,16#236D#,16#11D3#,(16#8E#,16#9D#,16#00#,16#C0#,16#4F#,16#68#,16#44#,16#AE#));
   IID_IDirectInput7W      :CONSTANT GUID:=(16#9A4CB685#,16#236D#,16#11D3#,(16#8E#,16#9D#,16#00#,16#C0#,16#4F#,16#68#,16#44#,16#AE#));
   IID_IDirectInput8A      :CONSTANT GUID:=(16#BF798030#,16#483A#,16#4DA2#,(16#AA#,16#99#,16#5D#,16#64#,16#ED#,16#36#,16#97#,16#00#));
   IID_IDirectInput8W      :CONSTANT GUID:=(16#BF798031#,16#483A#,16#4DA2#,(16#AA#,16#99#,16#5D#,16#64#,16#ED#,16#36#,16#97#,16#00#));
   IID_IDirectInputDeviceA :CONSTANT GUID:=(16#5944E680#,16#C92E#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   IID_IDirectInputDeviceW :CONSTANT GUID:=(16#5944E681#,16#C92E#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   IID_IDirectInputDevice2A:CONSTANT GUID:=(16#5944E682#,16#C92E#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   IID_IDirectInputDevice2W:CONSTANT GUID:=(16#5944E683#,16#C92E#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   IID_IDirectInputDevice7A:CONSTANT GUID:=(16#57D7C6BC#,16#2356#,16#11D3#,(16#8E#,16#9D#,16#00#,16#C0#,16#4F#,16#68#,16#44#,16#AE#));
   IID_IDirectInputDevice7W:CONSTANT GUID:=(16#57D7C6BD#,16#2356#,16#11D3#,(16#8E#,16#9D#,16#00#,16#C0#,16#4F#,16#68#,16#44#,16#AE#));
   IID_IDirectInputDevice8A:CONSTANT GUID:=(16#54D41080#,16#DC15#,16#4833#,(16#A4#,16#1B#,16#74#,16#8F#,16#73#,16#A3#,16#81#,16#79#));
   IID_IDirectInputDevice8W:CONSTANT GUID:=(16#54D41081#,16#DC15#,16#4833#,(16#A4#,16#1B#,16#74#,16#8F#,16#73#,16#A3#,16#81#,16#79#));
   IID_IDirectInputEffect  :CONSTANT GUID:=(16#E7E1F7C0#,16#88D2#,16#11D0#,(16#9A#,16#D0#,16#00#,16#A0#,16#C9#,16#A0#,16#6E#,16#35#));

   --Predefined object types--
   GUID_XAxis          :aliased GUID:=(16#A36D02E0#,16#C9F3#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   GUID_YAxis          :aliased GUID:=(16#A36D02E1#,16#C9F3#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   GUID_ZAxis          :aliased GUID:=(16#A36D02E2#,16#C9F3#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   GUID_RxAxis         :aliased GUID:=(16#A36D02F4#,16#C9F3#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   GUID_RyAxis         :aliased GUID:=(16#A36D02F5#,16#C9F3#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   GUID_RzAxis         :aliased GUID:=(16#A36D02E3#,16#C9F3#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   GUID_Slider         :aliased GUID:=(16#A36D02E4#,16#C9F3#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));

   GUID_Button         :aliased GUID:=(16#A36D02F0#,16#C9F3#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   GUID_Key            :aliased GUID:=(16#55728220#,16#D33C#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));

   GUID_POV            :aliased GUID:=(16#A36D02F2#,16#C9F3#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));

   GUID_Unknown        :aliased GUID:=(16#A36D02F3#,16#C9F3#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));

   --Predefined product GUIDs--
   GUID_SysMouse       :aliased GUID:=(16#6F1D2B60#,16#D5A0#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   GUID_SysKeyboard    :aliased GUID:=(16#6F1D2B61#,16#D5A0#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   GUID_Joystick       :aliased GUID:=(16#6F1D2B70#,16#D5A0#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   GUID_SysMouseEm     :aliased GUID:=(16#6F1D2B80#,16#D5A0#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   GUID_SysMouseEm2    :aliased GUID:=(16#6F1D2B81#,16#D5A0#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   GUID_SysKeyboardEm  :aliased GUID:=(16#6F1D2B82#,16#D5A0#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
   GUID_SysKeyboardEm2 :aliased GUID:=(16#6F1D2B83#,16#D5A0#,16#11CF#,(16#BF#,16#C7#,16#44#,16#45#,16#53#,16#54#,16#00#,16#00#));
         
   --Predefined force feedback effects--
   GUID_ConstantForce  :aliased GUID:=(16#13541C20#,16#8E33#,16#11D0#,(16#9A#,16#D0#,16#00#,16#A0#,16#C9#,16#A0#,16#6E#,16#35#));
   GUID_RampForce      :aliased GUID:=(16#13541C21#,16#8E33#,16#11D0#,(16#9A#,16#D0#,16#00#,16#A0#,16#C9#,16#A0#,16#6E#,16#35#));
   GUID_Square         :aliased GUID:=(16#13541C22#,16#8E33#,16#11D0#,(16#9A#,16#D0#,16#00#,16#A0#,16#C9#,16#A0#,16#6E#,16#35#));
   GUID_Sine           :aliased GUID:=(16#13541C23#,16#8E33#,16#11D0#,(16#9A#,16#D0#,16#00#,16#A0#,16#C9#,16#A0#,16#6E#,16#35#));
   GUID_Triangle       :aliased GUID:=(16#13541C24#,16#8E33#,16#11D0#,(16#9A#,16#D0#,16#00#,16#A0#,16#C9#,16#A0#,16#6E#,16#35#));
   GUID_SawtoothUp     :aliased GUID:=(16#13541C25#,16#8E33#,16#11D0#,(16#9A#,16#D0#,16#00#,16#A0#,16#C9#,16#A0#,16#6E#,16#35#));
   GUID_SawtoothDown   :aliased GUID:=(16#13541C26#,16#8E33#,16#11D0#,(16#9A#,16#D0#,16#00#,16#A0#,16#C9#,16#A0#,16#6E#,16#35#));
   GUID_Spring         :aliased GUID:=(16#13541C27#,16#8E33#,16#11D0#,(16#9A#,16#D0#,16#00#,16#A0#,16#C9#,16#A0#,16#6E#,16#35#));
   GUID_Damper         :aliased GUID:=(16#13541C28#,16#8E33#,16#11D0#,(16#9A#,16#D0#,16#00#,16#A0#,16#C9#,16#A0#,16#6E#,16#35#));
   GUID_Inertia        :aliased GUID:=(16#13541C29#,16#8E33#,16#11D0#,(16#9A#,16#D0#,16#00#,16#A0#,16#C9#,16#A0#,16#6E#,16#35#));
   GUID_Friction       :aliased GUID:=(16#13541C2A#,16#8E33#,16#11D0#,(16#9A#,16#D0#,16#00#,16#A0#,16#C9#,16#A0#,16#6E#,16#35#));
   GUID_CustomForce    :aliased GUID:=(16#13541C2B#,16#8E33#,16#11D0#,(16#9A#,16#D0#,16#00#,16#A0#,16#C9#,16#A0#,16#6E#,16#35#));


   DIEFT_ALL                :constant:=       16#00000000#;
   DIEFT_CONSTANTFORCE      :constant:=       16#00000001#;
   DIEFT_RAMPFORCE          :constant:=       16#00000002#;
   DIEFT_PERIODIC           :constant:=       16#00000003#;
   DIEFT_CONDITION          :constant:=       16#00000004#;
   DIEFT_CUSTOMFORCE        :constant:=       16#00000005#;
   DIEFT_HARDWARE           :constant:=       16#000000FF#;  
   DIEFT_FFATTACK           :constant:=       16#00000200#; 
   DIEFT_FFFADE             :constant:=       16#00000400#; 
   DIEFT_SATURATION         :constant:=       16#00000800#; 
   DIEFT_POSNEGCOEFFICIENTS :constant:=       16#00001000#; 
   DIEFT_POSNEGSATURATION   :constant:=       16#00002000#;
   DIEFT_DEADBAND           :constant:=       16#00004000#;
   DIEFT_STARTDELAY         :constant:=       16#00008000#;
    
   function LOBYTE(W:Word) return Byte;
   function HIBYTE(W:Word) return BYTE;
   function DIEFT_GETTYPE(w:word) return BYTE;

   DI_DEGREES              :constant:=    100;
   DI_FFNOMINALMAX         :constant:=    10000;
   DI_SECONDS              :constant:=    1000000;
    
   --Line:2004..2015--
   DIMOFS_X :constant:= 0;
   DIMOFS_Y :constant:= 4;
   DIMOFS_Z :constant:= 8;
   DIMOFS_BUTTON0 :constant:= 12;
   DIMOFS_BUTTON1 :constant:= DIMOFS_BUTTON0 + 1;
   DIMOFS_BUTTON2 :constant:= DIMOFS_BUTTON0 + 2;
   DIMOFS_BUTTON3 :constant:= DIMOFS_BUTTON0 + 3;
   DIMOFS_BUTTON4 :constant:= DIMOFS_BUTTON0 + 4;
   DIMOFS_BUTTON5 :constant:= DIMOFS_BUTTON0 + 5;
   DIMOFS_BUTTON6 :constant:= DIMOFS_BUTTON0 + 6;
   DIMOFS_BUTTON7 :constant:= DIMOFS_BUTTON0 + 7;
    
   --Pasacal Dinput Line:1365..1383
   DIDOI_FFACTUATOR        :constant:= 16#00000001#;
   DIDOI_FFEFFECTTRIGGER   :constant:= 16#00000002#;
   DIDOI_POLLED            :constant:= 16#00008000#;
   DIDOI_ASPECTPOSITION    :constant:= 16#00000100#;
   DIDOI_ASPECTVELOCITY    :constant:= 16#00000200#;
   DIDOI_ASPECTACCEL       :constant:= 16#00000300#;
   DIDOI_ASPECTFORCE       :constant:= 16#00000400#;
   DIDOI_ASPECTMASK        :constant:= 16#00000F00#;
   DIDOI_GUIDISUSAGE       :constant:= 16#00010000#;
    
     
   --Line:175--
   type DICONSTANTFORCE is record
      lMagnitude:Long;
   end record;
   type LPDICONSTANTFORCE is access all DICONSTANTFORCE;
   subtype PDICONSTANTFORCE is LPDICONSTANTFORCE;
    
   type LPCDICONSTANTFORCE is access constant DICONSTANTFORCE;
    
   DICONSTANTFORCE_SIZE:constant:=4;
    
   --Line:180
   type DIRAMPFORCE is record
      lStart:Long;
      lEnd:Long;
   end record;
   type LPDIRAMPFORCE is access all DIRAMPFORCE;
   subtype PDIRAMPFORCE is LPDIRAMPFORCE;
   type LPCDIRAMPFORCE is access constant DIRAMPFORCE;
    
   DIRAMPFORCE_SIZE:constant:=8;
    
   --Line:186
   type DIPERIODIC is record
      dwMagnitude:Dword;
      lOffset    :Long;
      dwPhase    :Dword;
      dwPeriod   :Dword;
   end record;
   type LPDIPERIODIC is Access all DIPERIODIC;
   type LPCDIPERIODIC is access constant DIPERIODIC;
    
   DIPERIODIC_SIZE:constant:=16;
    
    
   --Line:194
   type DICONDITION is record
      lOffset             :Long;
      lPositiveCoefficient:Long;
      lNegativeCoefficient:LONG;
      dwPositiveSaturation:DWORD;
      dwNegativeSaturation:DWORD;
      lDeadBandONG        :Long;
   end record;
   type LPDICONDITION is access all DICONDITION;
   type LPCDICONDITION is access constant DICONDITION;
    
   DICONDITION_SIZE:constant:=24;
    
   --Line:204
   type DICUSTOMFORCE is record
      cChannels:DWORD;
      dwSamplePeriod:DWORD;
      cSamples:DWORD;
      rglForceData:LPLONG;
   end record;
   type LPDICUSTOMFORCE is access all DICUSTOMFORCE;
   type LPCDICUSTOMFORCE is access constant DICUSTOMFORCE;
    
   DICUSTOMFORCE_SIZE:CONSTANT:=16;
    
   --Line:213
   type DIENVELOPE is record
      dwSize       :DWORD;      -- sizeof(DIENVELOPE) 
      dwAttackLevel:DWORD;
      dwAttackTime :DWORD;      -- Microseconds        
      dwFadeLevel  :DWORD;
      dwFadeTime   :DWORD;      -- Microseconds        
   end record;
   type LPDIENVELOPE is access all DIENVELOPE;
   type LPCDIENVELOPE is access constant DIENVELOPE;
    
   DIENVELOPE_SIZE:CONSTANT:=20;
    
    
   --Dx5.0 DIEFFECT_DX5 --
   --LINE:224
   type DIEFFECT_DX5 is record
      dwSize:DWORD;                   -- sizeof(DIEFFECT_DX5) --
      dwFlags:DWORD;                  -- DIEFF_*              --
      dwDuration:DWORD;               -- Microseconds         --
      dwSamplePeriod:DWORD;           -- Microseconds         --
      dwGain:DWORD;
      dwTriggerButton:DWORD;          -- or DIEB_NOTRIGGER    --
      dwTriggerRepeatInterval:DWORD;  -- Microseconds         --
      cAxes:DWORD;                    -- Number of axes       --
      rgdwAxes:LPDWORD;
      rglDirection:LPLONG;
      lpEnvelope:LPDIENVELOPE;
      cbTypeSpecificParams:DWORD;
      lpvTypeSpecificParams:LPVOID;
   end record;
   type LPDIEFFECT_DX5 is access all DIEFFECT_DX5;
   type LPCDIEFFECT_DX5 is access constant DIEFFECT_DX5;
    
   DIEFFECT_DX5_SIZE:CONSTANT:=52;
    
   --Line:241
   type DIEFFECT is record
      dwSize:Dword;                      -- sizeof(DIEFFECT)     
      dwFlags:Dword;                     -- DIEFF_*             
      dwDuration:Dword;                  -- Microseconds         
      dwSamplePeriod:Dword;              -- Microseconds         
      dwGain:Dword;
      dwTriggerButton:Dword;             -- or DIEB_NOTRIGGER    
      dwTriggerRepeatInterval:Dword;     -- Microseconds         
      cAxes:Dword;                       -- Number of axes       
      rgdwAxes:LPDword;            -- Array of axes        
      rglDirection:LPLONG;         -- Array of directions  
      lpEnvelope:LPDIENVELOPE;           -- Optional             
      cbTypeSpecificParams:Dword;        -- Size of params      
      lpvTypeSpecificParams:LPVOID;      -- Pointer to params 
      --version>=16#0600#
      dwStartDelay:Dword;                -- Microseconds
   end record;
   type LPDIEFFECT is access all DIEFFECT;
   type LPCDIEFFECT is access constant DIEFFECT;
    
   DIEFFECT_SIZE:CONSTANT:=56;
    
   --Line:266
   type DIFILEEFFECT is record
      dwSize:Dword;
      GuidEffect:GUID;
      lpDiEffect:LPCDIEFFECT;
      szFriendlyName:CHAR_Array(0..259);
   end record;
   type LPDIFILEEFFECT is access all DIFILEEFFECT;
   type LPCDIFILEEFFECT is access constant DIFILEEFFECT;
    
   DIFILEEFFECT_SIZE:CONSTANT:=284;  --SIZE CHECKED BY VC++,ALL DOWN!
    
   --Line:273
   type LPDIENUMEFFECTSINFILECALLBACK is access function(DFE:LPCDIFILEEFFECT;LPV:LPVOID) return BOOL;
   LPDIENUMEFFECTSINFILECALLBACK_SIZE:CONSTANT:=4;
    
   --Line:277..308
   DIEFF_OBJECTIDS             :constant:=16#00000001#;
   DIEFF_OBJECTOFFSETS         :constant:=16#00000002#;
   DIEFF_CARTESIAN             :constant:=16#00000010#;
   DIEFF_POLAR                 :constant:=16#00000020#;
   DIEFF_SPHERICAL             :constant:=16#00000040#;

   DIEP_DURATION               :constant:=16#00000001#;
   DIEP_SAMPLEPERIOD           :constant:=16#00000002#;
   DIEP_GAIN                   :constant:=16#00000004#;
   DIEP_TRIGGERBUTTON          :constant:=16#00000008#;
   DIEP_TRIGGERREPEATINTERVAL  :constant:=16#00000010#;
   DIEP_AXES                   :constant:=16#00000020#;
   DIEP_DIRECTION              :constant:=16#00000040#;
   DIEP_ENVELOPE               :constant:=16#00000080#;
   DIEP_TYPESPECIFICPARAMS     :constant:=16#00000100#;
    
   DIEP_STARTDELAY             :constant:=16#00000200#;
   DIEP_ALLPARAMS_DX5          :constant:=16#000001FF#;
   DIEP_ALLPARAMS              :constant:=16#000003FF#;

   DIEP_START                  :constant:=16#20000000#;
   DIEP_NORESTART              :constant:=16#40000000#;
   DIEP_NODOWNLOAD             :constant:=16#80000000#;
   DIEB_NOTRIGGER              :constant:=16#FFFFFFFF#;

   DIES_SOLO                   :constant:=16#00000001#;
   DIES_NODOWNLOAD             :constant:=16#80000000#;

   DIEGES_PLAYING              :constant:=16#00000001#;
   DIEGES_EMULATED             :constant:=16#00000002#;
    
   --Line:310
   type DIEFFESCAPE is record
      dwSize:DWORD;
      dwCommand:Dword;
      lpvInBuffer:LPVOID;
      cbInBuffer:DWORD;
      lpvOutBuffer:LPVOID;
      cbOutBuffer:DWORD;
   end record;
   type LPDIEFFESCAPE is access all DIEFFESCAPE;
   type LPCDIEFFESCAPE is access constant DIEFFESCAPE;
    
   DIEFFESCAPE_SIZE:CONSTANT:=24;
    
   ----------------------------------
   -- Interface:IDirectInputEffect --
   ----------------------------------
   type IDirectInputEffect;
   type LPIDirectInputEffect is access all IDirectInputEffect;
   type IDirectInputEffect_Vtbl;
   type LPIDirectInputEffect_Vtbl is access all IDirectInputEffect_Vtbl;
    
   ------------------------------------------------------------
   -- Notice:Standard is a pointer to function_virtual_table --
   ------------------------------------------------------------
   --Line:324
   type IDirectInputEffect is record
      lpvtbl:LPIDirectInputEffect_Vtbl;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputEffect);
    
   IDirectInputEffect_SIZE:CONSTANT:=4; --IN GPL2008,SIZE IS 4,STRIANGE!!,VC++ IS ALSO 4!
    
   type af_IDirectInputEffect_queryInterface is access 
     procedure(This:access IDirectInputEffect;
               riid:win32.objbase.REFIID;
               ppvObj:access LPVOID
              );
   pragma convention(STDCALL,af_IDirectInputEffect_QueryInterface);
    
   type af_IDirectInputEffect_AddRef is access
     function(This:access IDirectInputEffect) return ULONG;
   pragma convention(STDCALL,af_IDirectInputEffect_AddRef);
    
   type af_IDirectInputEffect_Release is access
     function(THIS:access IDirectInputEffect) return ULONG;
   pragma convention(STDCALL,af_IDirectInputEffect_Release);
    
   type af_IDirectInputEffect_Initialize is access
     procedure(THIS:access IDirectInputEffect;
               Hinst:win32.windef.HINSTANCE;  
               dw:DWORD;
               GUID:win32.objbase.REFGUID
              );
   pragma convention(STDCALL,af_IDirectInputEffect_Initialize);
    
   type af_IDirectInputEffect_GetEffectGuid is access 
     procedure(THIS:access IDirectInputEffect;
               PIID:win32.objbase.LPGUID);
   pragma convention(STDCALL,af_IDirectInputEffect_GetEffectGuid);
    
   type af_IDirectInputEffect_GetParameters is access
     procedure(THIS:access IDirectInputEffect;
               pEffect:LPDIEFFECT;
               dw:Dword
              );
   pragma convention(STDCALL,af_IDirectInputEffect_GetParameters);
    
   type af_IDirectInputEffect_SetParameters is access 
     procedure(THIS:access IDirectInputEffect;
               pEffect:LPCDIEFFECT;
               dw:Dword
              );
   pragma convention(STDCALL,af_IDirectInputEffect_SetParameters);
    
   type af_IDirectInputEffect_Start is access
     procedure(THIS:access IDirectInputEffect;
               dw:Dword;
               dw2:Dword);
   pragma convention(STDCALL,af_IDirectInputEffect_Start);
    
   type af_IDirectInputEffect_Stop is access
     procedure(THIS:access IDirectInputEffect);
   pragma convention(STDCALL,af_IDirectInputEffect_Stop);
     
    
    
   type af_IDirectInputEffect_GetEffectStatus is access
     procedure(THIS:access IDirectInputEffect;
               pdw:LPDWORD);
   pragma convention(STDCALL,af_IDirectInputEffect_GetEffectStatus);
    
   type af_IDirectInputEffect_Download is access
     procedure(THIS:access IDirectInputEffect);
   pragma convention(STDCALL,af_IDirectInputEffect_Download);
    
   type af_IDirectInputEffect_UnLoad is access
     procedure(THIS:access IDirectInputEffect);
   pragma convention(STDCALL,af_IDirectInputEffect_UnLoad);
    
   type af_IDirectInputEffect_Escape is access
     procedure(THIS:access IDirectInputEffect;
               LPDE:LPDIEFFESCAPE
              );
   pragma convention(STDCALL,af_IDirectInputEffect_Escape);
    
   type IDirectInputEffect_vtbl is record
      QueryInterface :af_IDirectInputEffect_queryInterface;
      AddRef         :af_IDirectInputEffect_AddRef;
      Release        :af_IDirectInputEffect_Release;
      initialize     :af_IDirectInputEffect_Initialize;
      GetEffectGuid  :af_IDirectInputEffect_GetEffectGuid;
      GetParameters  :af_IDirectInputEffect_GetParameters;
      SetParameters  :af_IDirectInputEffect_SetParameters;
      Start          :af_IDirectInputEffect_Start;
      Stop           :af_IDirectInputEffect_Stop;
      GetEffectStatus:af_IDirectInputEffect_GetEffectStatus;
      Download       :af_IDirectInputEffect_Download;
      Unload         :af_IDirectInputEffect_Unload;
      Escape         :af_IDirectInputEffect_Escape;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputEffect_vtbl);
    
    
   ---------------------------------------
   --  DirectInput keyboard scan codes  --
   ---------------------------------------
    
   --Line:2032..2175
   DIK_ESCAPE          :constant:=16#01#;
   DIK_1               :constant:=16#02#;
   DIK_2               :constant:=16#03#;
   DIK_3               :constant:=16#04#;
   DIK_4               :constant:=16#05#;
   DIK_5               :constant:=16#06#;
   DIK_6               :constant:=16#07#;
   DIK_7               :constant:=16#08#;
   DIK_8               :constant:=16#09#;
   DIK_9               :constant:=16#0A#;
   DIK_0               :constant:=16#0B#;
   DIK_MINUS           :constant:=16#0C#;      -- - on main keyboard --
   DIK_EQUALS          :constant:=16#0D#;
   DIK_BACK            :constant:=16#0E#;      -- backspace --
   DIK_TAB             :constant:=16#0F#;
   DIK_Q               :constant:=16#10#;
   DIK_W               :constant:=16#11#;
   DIK_E               :constant:=16#12#;
   DIK_R               :constant:=16#13#;
   DIK_T               :constant:=16#14#;
   DIK_Y               :constant:=16#15#;
   DIK_U               :constant:=16#16#;
   DIK_I               :constant:=16#17#;
   DIK_O               :constant:=16#18#;
   DIK_P               :constant:=16#19#;
   DIK_LBRACKET        :constant:=16#1A#;
   DIK_RBRACKET        :constant:=16#1B#;
   DIK_RETURN          :constant:=16#1C#;     -- Enter on main keyboard --
   DIK_LCONTROL        :constant:=16#1D#;
   DIK_A               :constant:=16#1E#;
   DIK_S               :constant:=16#1F#;
   DIK_D               :constant:=16#20#;
   DIK_F               :constant:=16#21#;
   DIK_G               :constant:=16#22#;
   DIK_H               :constant:=16#23#;
   DIK_J               :constant:=16#24#;
   DIK_K               :constant:=16#25#;
   DIK_L               :constant:=16#26#;
   DIK_SEMICOLON       :constant:=16#27#;
   DIK_APOSTROPHE      :constant:=16#28#;
   DIK_GRAVE           :constant:=16#29#;      -- accent grave --
   DIK_LSHIFT          :constant:=16#2A#;
   DIK_BACKSLASH       :constant:=16#2B#;
   DIK_Z               :constant:=16#2C#;
   DIK_X               :constant:=16#2D#;
   DIK_C               :constant:=16#2E#;
   DIK_V               :constant:=16#2F#;
   DIK_B               :constant:=16#30#;
   DIK_N               :constant:=16#31#;
   DIK_M               :constant:=16#32#;
   DIK_COMMA           :constant:=16#33#;
   DIK_PERIOD          :constant:=16#34#;      -- . on main keyboard --
   DIK_SLASH           :constant:=16#35#;      -- / on main keyboard --
   DIK_RSHIFT          :constant:=16#36#;
   DIK_MULTIPLY        :constant:=16#37#;      -- * on numeric keypad --
   DIK_LMENU           :constant:=16#38#;      -- left Alt --
   DIK_SPACE           :constant:=16#39#;
   DIK_CAPITAL         :constant:=16#3A#;
   DIK_F1              :constant:=16#3B#;
   DIK_F2              :constant:=16#3C#;
   DIK_F3              :constant:=16#3D#;
   DIK_F4              :constant:=16#3E#;
   DIK_F5              :constant:=16#3F#;
   DIK_F6              :constant:=16#40#;
   DIK_F7              :constant:=16#41#;
   DIK_F8              :constant:=16#42#;
   DIK_F9              :constant:=16#43#;
   DIK_F10             :constant:=16#44#;
   DIK_NUMLOCK         :constant:=16#45#;
   DIK_SCROLL          :constant:=16#46#;    -- Scroll Lock --
   DIK_NUMPAD7         :constant:=16#47#;
   DIK_NUMPAD8         :constant:=16#48#;
   DIK_NUMPAD9         :constant:=16#49#;
   DIK_SUBTRACT        :constant:=16#4A#;    -- - on numeric keypad --
   DIK_NUMPAD4         :constant:=16#4B#;
   DIK_NUMPAD5         :constant:=16#4C#;
   DIK_NUMPAD6         :constant:=16#4D#;
   DIK_ADD             :constant:=16#4E#;    -- + on numeric keypad --
   DIK_NUMPAD1         :constant:=16#4F#;
   DIK_NUMPAD2         :constant:=16#50#;
   DIK_NUMPAD3         :constant:=16#51#;
   DIK_NUMPAD0         :constant:=16#52#;
   DIK_DECIMAL         :constant:=16#53#;    -- . on numeric keypad --
   DIK_OEM_102         :constant:=16#56#;    -- <> or \# or  on RT 102-key keyboard (Non-U.S.) --
   DIK_F11             :constant:=16#57#;
   DIK_F12             :constant:=16#58#;
   DIK_F13             :constant:=16#64#;    --                     (NEC PC98) --
   DIK_F14             :constant:=16#65#;    --                     (NEC PC98) --
   DIK_F15             :constant:=16#66#;    --                     (NEC PC98) --
   DIK_KANA            :constant:=16#70#;    -- (Japanese keyboard)            --
   DIK_ABNT_C1         :constant:=16#73#;    -- /? on Brazilian keyboard --
   DIK_CONVERT         :constant:=16#79#;    -- (Japanese keyboard)            --
   DIK_NOCONVERT       :constant:=16#7B#;    -- (Japanese keyboard)            --
   DIK_YEN             :constant:=16#7D#;    -- (Japanese keyboard)            --
   DIK_ABNT_C2         :constant:=16#7E#;    -- Numpad . on Brazilian keyboard --
   DIK_NUMPADEQUALS    :constant:=16#8D#;    -- = on numeric keypad (NEC PC98) --
   DIK_PREVTRACK       :constant:=16#90#;    -- Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) --
   DIK_AT              :constant:=16#91#;    --                     (NEC PC98) --
   DIK_COLON           :constant:=16#92#;    --                     (NEC PC98) --
   DIK_UNDERLINE       :constant:=16#93#;    --                     (NEC PC98) --
   DIK_KANJI           :constant:=16#94#;    -- (Japanese keyboard)            --
   DIK_STOP            :constant:=16#95#;    --                     (NEC PC98) --
   DIK_AX              :constant:=16#96#;    --                     (Japan AX) --
   DIK_UNLABELED       :constant:=16#97#;    --                        (J3100) --
   DIK_NEXTTRACK       :constant:=16#99#;    -- Next Track --
   DIK_NUMPADENTER     :constant:=16#9C#;    -- Enter on numeric keypad --
   DIK_RCONTROL        :constant:=16#9D#;
   DIK_MUTE            :constant:=16#A0#;    -- Mute --
   DIK_CALCULATOR      :constant:=16#A1#;    -- Calculator --
   DIK_PLAYPAUSE       :constant:=16#A2#;    -- Play / Pause --
   DIK_MEDIASTOP       :constant:=16#A4#;    -- Media Stop --
   DIK_VOLUMEDOWN      :constant:=16#AE#;    -- Volume - --
   DIK_VOLUMEUP        :constant:=16#B0#;    -- Volume + --
   DIK_WEBHOME         :constant:=16#B2#;    -- Web home --
   DIK_NUMPADCOMMA     :constant:=16#B3#;    -- , on numeric keypad (NEC PC98) --
   DIK_DIVIDE          :constant:=16#B5#;    -- / on numeric keypad --
   DIK_SYSRQ           :constant:=16#B7#;
   DIK_RMENU           :constant:=16#B8#;    -- right Alt --
   DIK_PAUSE           :constant:=16#C5#;    -- Pause --
   DIK_HOME            :constant:=16#C7#;    -- Home on arrow keypad --
   DIK_UP              :constant:=16#C8#;    -- UpArrow on arrow keypad --
   DIK_PRIOR           :constant:=16#C9#;    -- PgUp on arrow keypad --
   DIK_LEFT            :constant:=16#CB#;    -- LeftArrow on arrow keypad --
   DIK_RIGHT           :constant:=16#CD#;    -- RightArrow on arrow keypad --
   DIK_END             :constant:=16#CF#;    -- End on arrow keypad --
   DIK_DOWN            :constant:=16#D0#;    -- DownArrow on arrow keypad --
   DIK_NEXT            :constant:=16#D1#;    -- PgDn on arrow keypad --
   DIK_INSERT          :constant:=16#D2#;    -- Insert on arrow keypad --
   DIK_DELETE          :constant:=16#D3#;    -- Delete on arrow keypad --
   DIK_LWIN            :constant:=16#DB#;    -- Left Windows key --
   DIK_RWIN            :constant:=16#DC#;    -- Right Windows key --
   DIK_APPS            :constant:=16#DD#;    -- AppMenu key --
   DIK_POWER           :constant:=16#DE#;    -- System Power --
   DIK_SLEEP           :constant:=16#DF#;    -- System Sleep --
   DIK_WAKE            :constant:=16#E3#;    -- System Wake --
   DIK_WEBSEARCH       :constant:=16#E5#;    -- Web Search --
   DIK_WEBFAVORITES    :constant:=16#E6#;    -- Web Favorites --
   DIK_WEBREFRESH      :constant:=16#E7#;    -- Web Refresh --
   DIK_WEBSTOP         :constant:=16#E8#;    -- Web Stop --
   DIK_WEBFORWARD      :constant:=16#E9#;    -- Web Forward --
   DIK_WEBBACK         :constant:=16#EA#;    -- Web Back --
   DIK_MYCOMPUTER      :constant:=16#EB#;    -- My Computer --
   DIK_MAIL            :constant:=16#EC#;    -- Mail --
   DIK_MEDIASELECT     :constant:=16#ED#;    -- Media Select --
    
   --Alternate names for keys, to facilitate transition from DOS.--
   --Line:2180..2194
   DIK_BACKSPACE       :constant:=DIK_BACK;            -- backspace --
   DIK_NUMPADSTAR      :constant:=DIK_MULTIPLY;        -- * on numeric keypad --
   DIK_LALT            :constant:=DIK_LMENU;           -- left Alt --
   DIK_CAPSLOCK        :constant:=DIK_CAPITAL;         -- CapsLock --
   DIK_NUMPADMINUS     :constant:=DIK_SUBTRACT;        -- - on numeric keypad --
   DIK_NUMPADPLUS      :constant:=DIK_ADD;             -- + on numeric keypad --
   DIK_NUMPADPERIOD    :constant:=DIK_DECIMAL;         -- . on numeric keypad --
   DIK_NUMPADSLASH     :constant:=DIK_DIVIDE;          -- / on numeric keypad --
   DIK_RALT            :constant:=DIK_RMENU;           -- right Alt --
   DIK_UPARROW         :constant:=DIK_UP;              -- UpArrow on arrow keypad --
   DIK_PGUP            :constant:=DIK_PRIOR;           -- PgUp on arrow keypad --
   DIK_LEFTARROW       :constant:=DIK_LEFT;            -- LeftArrow on arrow keypad --
   DIK_RIGHTARROW      :constant:=DIK_RIGHT;           -- RightArrow on arrow keypad --
   DIK_DOWNARROW       :constant:=DIK_DOWN;            -- DownArrow on arrow keypad --
   DIK_PGDN            :constant:=DIK_NEXT;            -- PgDn on arrow keypad --
    
    
   --Alternate names for keys originally not used on US keyboards.--
   --Line:2199
   DIK_CIRCUMFLEX      :constant:=DIK_PREVTRACK;       -- Japanese keyboard --
    
   --------------------------------------
   --             Joystick             --
   --------------------------------------
   --Line:2211
   type DIJOYSTATE is record    --80 BYTES of Structure size
      lx:Long;
      ly:Long;
      lz:Long;
      lRx:Long;
      lRy:Long;
      lRz:Long;
      rglSlider:Long_Array(0..1);
      rgdwPOV:DWORD_ARRAY(0..3);
      rgbButtons:BYTE_ARRAY(0..31);
   end record;
   pragma convention(C_PASS_BY_COPY,DIJOYSTATE);
   type LPDIJOYSTATE is access all DIJOYSTATE;
    
   DIJOYSTATE_SIZE:CONSTANT:=80;
    
    
   --Line:2223
   type DIJOYSTATE2 is record               --Structure size:68*4 BYTES
      lX:Long;                              -- x-axis position              --
      lY:Long;                              -- y-axis position              --
      lZ:Long;                              -- z-axis position              --
      lRx:Long;                             -- x-axis rotation              --
      lRy:Long;                             -- y-axis rotation              --
      lRz:Long;                             -- z-axis rotation              --
      rglSlider:Long_Array(0..1);           -- extra axes positions         --
      rgdwPOV:DWORD_ARRAY(0..3);            -- POV directions               --
      rgbButtons:BYTE_ARRAY(0..127);        -- 128 buttons                  --
      lVX:Long;                             -- x-axis velocity              --
      lVY:Long;                             -- y-axis velocity              --
      lVZ:Long;                             -- z-axis velocity              --
      lVRx:Long;                            -- x-axis angular velocity      --
      lVRy:Long;                            -- y-axis angular velocity      --
      lVRz:Long;                            -- z-axis angular velocity      --
      rglVSlider:Long_Array(0..1);          -- extra axes velocities        --
      lAX:Long;                             -- x-axis acceleration          --
      lAY:Long;                             -- y-axis acceleration          --
      lAZ:Long;                             -- z-axis acceleration          --
      lARx:Long;                            -- x-axis angular acceleration  --
      lARy:Long;                            -- y-axis angular acceleration  --
      lARz:Long;                            -- z-axis angular acceleration  --
      rglASlider:Long_Array(0..1);          -- extra axes accelerations     --
      lFX:Long;                             -- x-axis force                 --
      lFY:Long;                             -- y-axis force                 --
      lFZ:Long;                             -- z-axis force                 --
      lFRx:Long;                            -- x-axis torque                --
      lFRy:Long;                            -- y-axis torque                --
      lFRz:Long;                            -- z-axis torque                --
      rglFSlider:Long_Array(0..1);          -- extra axes forces            --
   end record;
   pragma convention(C_PASS_BY_COPY,DIJOYSTATE2);
   DIJOYSTATE2_SIZE:CONSTANT:=272;
    
   type LPDIJOYSTATE2 is access all DIJOYSTATE2;
    
   DIJOFS_X:constant:=0;
   DIJOFS_Y:constant:=4;
   DIJOFS_z:constant:=8;
   DIJOFS_Rx:constant:=12;
   DIJOFS_Ry:constant:=16;
   DIJOFS_Rz:constant:=20;
    
   --2266..2298
   DIJOFS_BUTTON       :constant:=48;
   DIJOFS_BUTTON0      :constant:= DIJOFS_BUTTON +  0; -- DIJOFS_BUTTON(0)
   DIJOFS_BUTTON1      :constant:= DIJOFS_BUTTON +  1; -- DIJOFS_BUTTON(1)
   DIJOFS_BUTTON2      :constant:= DIJOFS_BUTTON +  2; -- DIJOFS_BUTTON(2)
   DIJOFS_BUTTON3      :constant:= DIJOFS_BUTTON +  3; -- DIJOFS_BUTTON(3)
   DIJOFS_BUTTON4      :constant:= DIJOFS_BUTTON +  4; -- DIJOFS_BUTTON(4)
   DIJOFS_BUTTON5      :constant:= DIJOFS_BUTTON +  5; -- DIJOFS_BUTTON(5)
   DIJOFS_BUTTON6      :constant:= DIJOFS_BUTTON +  6; -- DIJOFS_BUTTON(6)
   DIJOFS_BUTTON7      :constant:= DIJOFS_BUTTON +  7; -- DIJOFS_BUTTON(7)
   DIJOFS_BUTTON8      :constant:= DIJOFS_BUTTON +  8; -- DIJOFS_BUTTON(8)
   DIJOFS_BUTTON9      :constant:= DIJOFS_BUTTON +  9; -- DIJOFS_BUTTON(9)
   DIJOFS_BUTTON10     :constant:= DIJOFS_BUTTON + 10; -- DIJOFS_BUTTON(10)
   DIJOFS_BUTTON11     :constant:= DIJOFS_BUTTON + 11; -- DIJOFS_BUTTON(11)
   DIJOFS_BUTTON12     :constant:= DIJOFS_BUTTON + 12; -- DIJOFS_BUTTON(12)
   DIJOFS_BUTTON13     :constant:= DIJOFS_BUTTON + 13; -- DIJOFS_BUTTON(13)
   DIJOFS_BUTTON14     :constant:= DIJOFS_BUTTON + 14; -- DIJOFS_BUTTON(14)
   DIJOFS_BUTTON15     :constant:= DIJOFS_BUTTON + 15; -- DIJOFS_BUTTON(15)
   DIJOFS_BUTTON16     :constant:= DIJOFS_BUTTON + 16; -- DIJOFS_BUTTON(16)
   DIJOFS_BUTTON17     :constant:= DIJOFS_BUTTON + 17; -- DIJOFS_BUTTON(17)
   DIJOFS_BUTTON18     :constant:= DIJOFS_BUTTON + 18; -- DIJOFS_BUTTON(18)
   DIJOFS_BUTTON19     :constant:= DIJOFS_BUTTON + 19; -- DIJOFS_BUTTON(19)
   DIJOFS_BUTTON20     :constant:= DIJOFS_BUTTON + 20; -- DIJOFS_BUTTON(20)
   DIJOFS_BUTTON21     :constant:= DIJOFS_BUTTON + 21; -- DIJOFS_BUTTON(21)
   DIJOFS_BUTTON22     :constant:= DIJOFS_BUTTON + 22; -- DIJOFS_BUTTON(22)
   DIJOFS_BUTTON23     :constant:= DIJOFS_BUTTON + 23; -- DIJOFS_BUTTON(23)
   DIJOFS_BUTTON24     :constant:= DIJOFS_BUTTON + 24; -- DIJOFS_BUTTON(24)
   DIJOFS_BUTTON25     :constant:= DIJOFS_BUTTON + 25; -- DIJOFS_BUTTON(25)
   DIJOFS_BUTTON26     :constant:= DIJOFS_BUTTON + 26; -- DIJOFS_BUTTON(26)
   DIJOFS_BUTTON27     :constant:= DIJOFS_BUTTON + 27; -- DIJOFS_BUTTON(27)
   DIJOFS_BUTTON28     :constant:= DIJOFS_BUTTON + 28; -- DIJOFS_BUTTON(28)
   DIJOFS_BUTTON29     :constant:= DIJOFS_BUTTON + 29; -- DIJOFS_BUTTON(29)
   DIJOFS_BUTTON30     :constant:= DIJOFS_BUTTON + 30; -- DIJOFS_BUTTON(30)
   DIJOFS_BUTTON31     :constant:= DIJOFS_BUTTON + 31; -- DIJOFS_BUTTON(31)
  
    
    
    
   --------------------------
   --  IDirectInputDevice  --
   --------------------------
    
   --if version<16#0700#--
    
   --Line:386
   DIDEVTYPE_DEVICE  :constant := 1;
   DIDEVTYPE_MOUSE   :constant := 2;
   DIDEVTYPE_KEYBOARD:constant := 3;
   DIDEVTYPE_JOYSTICK:constant := 4;
    
   --else
   --Line:399..410
   DI8DEVCLASS_ALL             :constant:=   0;
   DI8DEVCLASS_DEVICE          :constant:=   1;
   DI8DEVCLASS_POINTER         :constant:=   2;
   DI8DEVCLASS_KEYBOARD        :constant:=   3;
   DI8DEVCLASS_GAMECTRL        :constant:=   4;

   DI8DEVTYPE_DEVICE           :constant:=16#11#;
   DI8DEVTYPE_MOUSE            :constant:=16#12#;
   DI8DEVTYPE_KEYBOARD         :constant:=16#13#;
   DI8DEVTYPE_JOYSTICK         :constant:=16#14#;
   DI8DEVTYPE_GAMEPAD          :constant:=16#15#;
   DI8DEVTYPE_DRIVING          :constant:=16#16#;
   DI8DEVTYPE_FLIGHT           :constant:=16#17#;
   DI8DEVTYPE_1STPERSON        :constant:=16#18#;
   DI8DEVTYPE_DEVICECTRL       :constant:=16#19#;
   DI8DEVTYPE_SCREENPOINTER    :constant:=16#1A#;
   DI8DEVTYPE_REMOTE           :constant:=16#1B#;
   DI8DEVTYPE_SUPPLEMENTAL     :constant:=16#1C#;
   --endif
    
   DIDEVTYPE_HID               :constant:=16#00010000#;
    
   --if DIRECTINPUT_VERSION <= 16#700#
   --Line:416..513
   DIDEVTYPEMOUSE_UNKNOWN          :constant:=1;
   DIDEVTYPEMOUSE_TRADITIONAL      :constant:=2;
   DIDEVTYPEMOUSE_FINGERSTICK      :constant:=3;
   DIDEVTYPEMOUSE_TOUCHPAD         :constant:=4;
   DIDEVTYPEMOUSE_TRACKBALL        :constant:=5;

   DIDEVTYPEKEYBOARD_UNKNOWN       :constant:=0;
   DIDEVTYPEKEYBOARD_PCXT          :constant:=1;
   DIDEVTYPEKEYBOARD_OLIVETTI      :constant:=2;
   DIDEVTYPEKEYBOARD_PCAT          :constant:=3;
   DIDEVTYPEKEYBOARD_PCENH         :constant:=4;
   DIDEVTYPEKEYBOARD_NOKIA1050     :constant:=5;
   DIDEVTYPEKEYBOARD_NOKIA9140     :constant:=6;
   DIDEVTYPEKEYBOARD_NEC98         :constant:=7;
   DIDEVTYPEKEYBOARD_NEC98LAPTOP   :constant:=8;
   DIDEVTYPEKEYBOARD_NEC98106      :constant:=9;
   DIDEVTYPEKEYBOARD_JAPAN106      :constant:=10;
   DIDEVTYPEKEYBOARD_JAPANAX       :constant:=11;
   DIDEVTYPEKEYBOARD_J3100         :constant:=12;

   DIDEVTYPEJOYSTICK_UNKNOWN       :constant:=1;
   DIDEVTYPEJOYSTICK_TRADITIONAL   :constant:=2;
   DIDEVTYPEJOYSTICK_FLIGHTSTICK   :constant:=3;
   DIDEVTYPEJOYSTICK_GAMEPAD       :constant:=4;
   DIDEVTYPEJOYSTICK_RUDDER        :constant:=5;
   DIDEVTYPEJOYSTICK_WHEEL         :constant:=6;
   DIDEVTYPEJOYSTICK_HEADTRACKER   :constant:=7;

   --else
   DI8DEVTYPEMOUSE_UNKNOWN                       :constant:=1;
   DI8DEVTYPEMOUSE_TRADITIONAL                   :constant:=2;
   DI8DEVTYPEMOUSE_FINGERSTICK                   :constant:=3;
   DI8DEVTYPEMOUSE_TOUCHPAD                      :constant:=4;
   DI8DEVTYPEMOUSE_TRACKBALL                     :constant:=5;
   DI8DEVTYPEMOUSE_ABSOLUTE                      :constant:=6;

   DI8DEVTYPEKEYBOARD_UNKNOWN                    :constant:=0;
   DI8DEVTYPEKEYBOARD_PCXT                       :constant:=1;
   DI8DEVTYPEKEYBOARD_OLIVETTI                   :constant:=2;
   DI8DEVTYPEKEYBOARD_PCAT                       :constant:=3;
   DI8DEVTYPEKEYBOARD_PCENH                      :constant:=4;
   DI8DEVTYPEKEYBOARD_NOKIA1050                  :constant:=5;
   DI8DEVTYPEKEYBOARD_NOKIA9140                  :constant:=6;
   DI8DEVTYPEKEYBOARD_NEC98                      :constant:=7;
   DI8DEVTYPEKEYBOARD_NEC98LAPTOP                :constant:=8;
   DI8DEVTYPEKEYBOARD_NEC98106                   :constant:=9;
   DI8DEVTYPEKEYBOARD_JAPAN106                   :constant:=10;
   DI8DEVTYPEKEYBOARD_JAPANAX                    :constant:=11;
   DI8DEVTYPEKEYBOARD_J3100                      :constant:=12;

   DI8DEVTYPE_LIMITEDGAMESUBTYPE                 :constant:=1;

   DI8DEVTYPEJOYSTICK_LIMITED                    :constant:=DI8DEVTYPE_LIMITEDGAMESUBTYPE;
   DI8DEVTYPEJOYSTICK_STANDARD                   :constant:=2;

   DI8DEVTYPEGAMEPAD_LIMITED                     :constant:=DI8DEVTYPE_LIMITEDGAMESUBTYPE;
   DI8DEVTYPEGAMEPAD_STANDARD                    :constant:=2;
   DI8DEVTYPEGAMEPAD_TILT                        :constant:=3;

   DI8DEVTYPEDRIVING_LIMITED                     :constant:=DI8DEVTYPE_LIMITEDGAMESUBTYPE;
   DI8DEVTYPEDRIVING_COMBINEDPEDALS              :constant:=2;
   DI8DEVTYPEDRIVING_DUALPEDALS                  :constant:=3;
   DI8DEVTYPEDRIVING_THREEPEDALS                 :constant:=4;
   DI8DEVTYPEDRIVING_HANDHELD                    :constant:=5;

   DI8DEVTYPEFLIGHT_LIMITED                      :constant:=DI8DEVTYPE_LIMITEDGAMESUBTYPE;
   DI8DEVTYPEFLIGHT_STICK                        :constant:=2;
   DI8DEVTYPEFLIGHT_YOKE                         :constant:=3;
   DI8DEVTYPEFLIGHT_RC                           :constant:=4;

   DI8DEVTYPE1STPERSON_LIMITED                   :constant:=DI8DEVTYPE_LIMITEDGAMESUBTYPE;
   DI8DEVTYPE1STPERSON_UNKNOWN                   :constant:= 2;
   DI8DEVTYPE1STPERSON_SIXDOF                    :constant:=3;
   DI8DEVTYPE1STPERSON_SHOOTER                   :constant:=4;

   DI8DEVTYPESCREENPTR_UNKNOWN                   :constant:=2;
   DI8DEVTYPESCREENPTR_LIGHTGUN                  :constant:=3;
   DI8DEVTYPESCREENPTR_LIGHTPEN                  :constant:=4;
   DI8DEVTYPESCREENPTR_TOUCH                     :constant:=5;

   DI8DEVTYPEREMOTE_UNKNOWN                      :constant:=2;

   DI8DEVTYPEDEVICECTRL_UNKNOWN                  :constant:=2;
   DI8DEVTYPEDEVICECTRL_COMMSSELECTION           :constant:=3;
   DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED :constant:=4;

   DI8DEVTYPESUPPLEMENTAL_UNKNOWN                :constant:=2;
   DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER      :constant:=3;
   DI8DEVTYPESUPPLEMENTAL_HEADTRACKER            :constant:=4;
   DI8DEVTYPESUPPLEMENTAL_HANDTRACKER            :constant:=5;
   DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE         :constant:=6;
   DI8DEVTYPESUPPLEMENTAL_SHIFTER                :constant:=7;
   DI8DEVTYPESUPPLEMENTAL_THROTTLE               :constant:=8;
   DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE          :constant:=9;
   DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS         :constant:=10;
   DI8DEVTYPESUPPLEMENTAL_DUALPEDALS             :constant:=11;
   DI8DEVTYPESUPPLEMENTAL_THREEPEDALS            :constant:=12;
   DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS           :constant:=13;  
   --endif
    
   subtype dwDevType is DWORD;
   --Line:516..517
   ------------------------------------------
   --Please Notice The Below Two functions:--
   --First,LOWORD OF A DWORD,THEN DO NEXT  --
   ------------------------------------------
   function LOBYTE(DT:DWORD) return BYTE;
   function HIBYTE(DT:DWORD) return BYTE;
   function GET_DIDEVICE_TYPE   (DT:dwDevType) return BYTE;
   function GET_DIDEVICE_SUBTYPE(DT:dwDevType) return BYTE;
    
   --if version>=16#0500#
   --This structure is defined for DirectX 3.0 compatibility--
   --Line:521
   type DIDEVCAPS_DX3 is record
      dwSize    :DWORD;
      dwFlags   :DWORD;
      dwDevType :DWORD;
      dwAxes    :DWORD;
      dwButtons :DWORD;
      dwPOVs    :DWORD;
   end record;
   pragma convention(C_PASS_BY_COPY,DIDEVCAPS_DX3);
   DIDEVCAPS_DX3_SIZE:constant:=24;
    
   --endif
   type PDIDEVCAPS_DX3 is access all DIDEVCAPS_DX3;
    
   --Line:531
   type DIDEVCAPS is record
      dwSize                :DWORD;
      dwFlags               :DWORD;
      dwDevType             :DWORD;
      dwAxes                :DWORD;
      dwButtons             :DWORD;
      dwPOVs                :DWORD;
      --version >16#0500# define belows
      dwFFSamplePeriod      :DWORD;
      dwFFMinTimeResolution :DWORD;
      dwFirmwareRevision    :DWORD;
      dwHardwareRevision    :DWORD;
      dwFFDriverVersion     :DWORD;
   end record;
   pragma convention(C_PASS_BY_COPY,DIDEVCAPS);
    
   type LPDIDEVCAPS is access all DIDEVCAPS;
    
   DIDEVCAPS_SIZE:CONSTANT:=44;
    
    
   DIDC_ATTACHED           :constant:=16#00000001#;
   DIDC_POLLEDDEVICE       :constant:=16#00000002#;
   DIDC_EMULATED           :constant:=16#00000004#;
   DIDC_POLLEDDATAFORMAT   :constant:=16#00000008#;
   --if(DIRECTINPUT_VERSION >=16#0500#)
   DIDC_FORCEFEEDBACK      :constant:=16#00000100#;
   DIDC_FFATTACK           :constant:=16#00000200#;
   DIDC_FFFADE             :constant:=16#00000400#;
   DIDC_SATURATION         :constant:=16#00000800#;
   DIDC_POSNEGCOEFFICIENTS :constant:=16#00001000#;
   DIDC_POSNEGSATURATION   :constant:=16#00002000#;
   DIDC_DEADBAND           :constant:=16#00004000#;
   --#endif -- DIRECTINPUT_VERSION >=16#0500# --
   DIDC_STARTDELAY         :constant:=16#00008000#;
   --#if(DIRECTINPUT_VERSION >=16#050a#)
   DIDC_ALIAS              :constant:=16#00010000#;
   DIDC_PHANTOM            :constant:=16#00020000#;
   --endif -- DIRECTINPUT_VERSION >=16#050a# --
   --if(DIRECTINPUT_VERSION >=16#0800#);
   DIDC_HIDDEN             :constant:=16#00040000#;
   --#endif -- DIRECTINPUT_VERSION >=16#0800# --

   DIDFT_ALL           :constant:=16#00000000#;

   DIDFT_RELAXIS       :constant:=16#00000001#;
   DIDFT_ABSAXIS       :constant:=16#00000002#;
   DIDFT_AXIS          :constant:=16#00000003#;

   DIDFT_PSHBUTTON     :constant:=16#00000004#;
   DIDFT_TGLBUTTON     :constant:=16#00000008#;
   DIDFT_BUTTON        :constant:=16#0000000C#;

   DIDFT_POV           :constant:=16#00000010#;
   DIDFT_COLLECTION    :constant:=16#00000040#;
   DIDFT_NODATA        :constant:=16#00000080#;

   DIDFT_ANYINSTANCE   :constant:=16#00FFFF00#;
   DIDFT_INSTANCEMASK  :constant:=DIDFT_ANYINSTANCE;
    
   function DIDFT_MAKEINSTANCE(n:DWORD) return DWORD;
    
   function DIDFT_GETTYPE(n:DWORD) return BYTE;
    
   function DIDFT_GETINSTANCE(n:DWORD) return DWORD;
    
   DIDFT_FFACTUATOR        :constant:=16#01000000#;
   DIDFT_FFEFFECTTRIGGER   :constant:=16#02000000#;
    
   --#if(DIRECTINPUT_VERSION >= 0x050a)--
   DIDFT_OUTPUT            :constant:=16#10000000#;
   DIDFT_VENDORDEFINED     :constant:=16#04000000#;
   DIDFT_ALIAS             :constant:=16#08000000#;
   --#endif /* DIRECTINPUT_VERSION >= 0x050a --
   --#ifndef DIDFT_OPTIONAL
   DIDFT_OPTIONAL          :constant:=16#80000000#;
   --#endif
    
   --Line:599
   function DIDFT_ENUMCOLLECTION(n:DWORD) return DWORD;
    
   --Line:600
   DIDFT_NOCOLLECTION      :constant:=16#00FFFF00#;
    
   --Line:604
   --¶ÔÏóÊý¾Ý¸ñʽ--
   type DIOBJECTDATAFORMAT is record   --16bytes structure
      pGuid  :Win32.objbase.LPGUID;    --constant in C++      
      dwOfs  :DWORD;
      dwType :DWORD;
      dwFlags:DWORD;
   end record;
   pragma convention(C_PASS_BY_COPY,DIOBJECTDATAFORMAT);
    
   type LPDIOBJECTDATAFORMAT is access all DIOBJECTDATAFORMAT;
   type LPCDIOBJECTDATAFORMAT is access constant DIOBJECTDATAFORMAT;
    
   DIOBJECTDATAFORMAT_SIZE:CONSTANT:=16;
    
   --Line:612
   type DIDATAFORMAT is record
      dwSize       :DWORD;
      dwObjSize    :DWORD;
      dwFlags      :DWORD;
      dwDataSize   :DWORD;
      dwNumObjs    :DWORD;
      rgodf        :LPDIOBJECTDATAFORMAT;
   end record;
   pragma convention(C_PASS_BY_COPY,DIDATAFORMAT);
    
   type LPDIDATAFORMAT is access all DIDATAFORMAT;
   type LPCDIDATAFORMAT is access constant DIDATAFORMAT;
    
   DIDATAFORMAT_SIZE:CONSTANT:=24;
    
   --Line:622..623
   DIDF_ABSAXIS  :constant:=16#00000001#;
   DIDF_RELAXIS  :constant:=16#00000002#;
    
   --This is Added From dinput.pas--
   use type interfaces.C.unsigned_long;
   type DIObjectDataFormat_Array is Array(Natural range<>)of aliased DIObjectDataFormat;
   rgodfDIMouse:aliased DIObjectDataFormat_Array(0..6):=
     ((GUID_XAxis'Access,DIMOFS_X,(DIDFT_AXIS or DIDFT_ANYINSTANCE),0),
      (GUID_YAxis'Access,DIMOFS_Y,(DIDFT_AXIS or DIDFT_ANYINSTANCE),0),
      (GUID_ZAxis'Access,DIMOFS_Z,(DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#),0),
      (NULL,DIMOFS_BUTTON0,(DIDFT_BUTTON or DIDFT_ANYINSTANCE),0),
      (NULL,DIMOFS_BUTTON1,(DIDFT_BUTTON or DIDFT_ANYINSTANCE),0),
      (NULL,DIMOFS_BUTTON2,(DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#),0),
      (NULL,DIMOFS_BUTTON3,(DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#),0)
     );
    
    
   --Line:628
   c_dfDIMouse:DIDATAFORMAT:=(dwSize    =>DIDATAFORMAT'size/8,
                              dwObjSize =>DIObjectDataFormat'size/8,
                              dwFlags   =>DIDF_RELAXIS,
                              dwDataSize=>16, --SIZEOF(DIMOUSESTATE)
                              dwNumObjs =>7,  --c_dfDIMouse'Last+1
                              rgodf     =>rgodfDIMouse(0)'Access
                             );
    
   --#if version>16#0700#--
   --From Pascal
   rgodfDIMouse2:aliased DIObjectDataFormat_Array(0..10):=
     ((GUID_XAxis'Access,DIMOFS_X,(DIDFT_AXIS or DIDFT_ANYINSTANCE),0),
      (GUID_YAxis'Access,DIMOFS_Y,(DIDFT_AXIS or DIDFT_ANYINSTANCE),0),
      (GUID_ZAxis'Access,DIMOFS_Z,(DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#),0), -- DIDFT_ENUMCOLLECTION(DIDFT_ALIAS) == $80000000
      (NULL,DIMOFS_BUTTON0,(DIDFT_BUTTON or DIDFT_ANYINSTANCE),0),
      (NULL,DIMOFS_BUTTON1,(DIDFT_BUTTON or DIDFT_ANYINSTANCE),0),
      (NULL,DIMOFS_BUTTON2,(DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#),0),
      (NULL,DIMOFS_BUTTON3,(DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#),0),
      (NULL,DIMOFS_BUTTON4,(DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#),0),
      (NULL,DIMOFS_BUTTON5,(DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#),0),
      (NULL,DIMOFS_BUTTON6,(DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#),0),
      (NULL,DIMOFS_BUTTON7,(DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#),0)
     );
    
   --Line:631   
   c_dfDIMouse2:DIDATAFORMAT:=(dwSize    =>DIDATAFORMAT'size/8,
                               dwObjSize =>DIObjectDataFormat'size/8,
                               dwFlags   =>DIDF_RELAXIS,
                               dwDataSize=>20, --SIZEOF(DIMOUSESTATE2)
                               dwNumObjs =>11, --c_dfDIMouse2'Last+1
                               rgodf     =>rgodfDIMouse2(0)'Access
                              );
    
   --PASCAL DINPUT LINE:1146 & 1448
   DIPROPRANGE_NOMIN:CONSTANT:=16#80000000#;
   DIPROPRANGE_NOMAX:CONSTANT:=16#7FFFFFFF#;
    
   --From Pascal Dinput Line:2583
   rgodfKeyboard:DIObjectDataFormat_Array(0..255):=
     ((GUID_key'Access,    0,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (  0 *2** 8),  0),
      (GUID_key'Access,    1,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (  1 *2** 8),  0),
      (GUID_key'Access,    2,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (  2 *2** 8),  0),
      (GUID_key'Access,    3,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (  3 *2** 8),  0),
      (GUID_key'Access,    4,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (  4 *2** 8),  0),
      (GUID_key'Access,    5,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (  5 *2** 8),  0),
      (GUID_key'Access,    6,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (  6 *2** 8),  0),
      (GUID_key'Access,    7,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (  7 *2** 8),  0),
      (GUID_key'Access,    8,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (  8 *2** 8),  0),
      (GUID_key'Access,    9,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (  9 *2** 8),  0),
      (GUID_key'Access,   10,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 10 *2** 8),  0),
      (GUID_key'Access,   11,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 11 *2** 8),  0),
      (GUID_key'Access,   12,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 12 *2** 8),  0),
      (GUID_key'Access,   13,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 13 *2** 8),  0),
      (GUID_key'Access,   14,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 14 *2** 8),  0),
      (GUID_key'Access,   15,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 15 *2** 8),  0),
      (GUID_key'Access,   16,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 16 *2** 8),  0),
      (GUID_key'Access,   17,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 17 *2** 8),  0),
      (GUID_key'Access,   18,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 18 *2** 8),  0),
      (GUID_key'Access,   19,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 19 *2** 8),  0),
      (GUID_key'Access,   20,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 20 *2** 8),  0),
      (GUID_key'Access,   21,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 21 *2** 8),  0),
      (GUID_key'Access,   22,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 22 *2** 8),  0),
      (GUID_key'Access,   23,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 23 *2** 8),  0),
      (GUID_key'Access,   24,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 24 *2** 8),  0),
      (GUID_key'Access,   25,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 25 *2** 8),  0),
      (GUID_key'Access,   26,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 26 *2** 8),  0),
      (GUID_key'Access,   27,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 27 *2** 8),  0),
      (GUID_key'Access,   28,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 28 *2** 8),  0),
      (GUID_key'Access,   29,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 29 *2** 8),  0),
      (GUID_key'Access,   30,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 30 *2** 8),  0),
      (GUID_key'Access,   31,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 31 *2** 8),  0),
      (GUID_key'Access,   32,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 32 *2** 8),  0),
      (GUID_key'Access,   33,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 33 *2** 8),  0),
      (GUID_key'Access,   34,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 34 *2** 8),  0),
      (GUID_key'Access,   35,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 35 *2** 8),  0),
      (GUID_key'Access,   36,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 36 *2** 8),  0),
      (GUID_key'Access,   37,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 37 *2** 8),  0),
      (GUID_key'Access,   38,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 38 *2** 8),  0),
      (GUID_key'Access,   39,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 39 *2** 8),  0),
      (GUID_key'Access,   40,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 40 *2** 8),  0),
      (GUID_key'Access,   41,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 41 *2** 8),  0),
      (GUID_key'Access,   42,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 42 *2** 8),  0),
      (GUID_key'Access,   43,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 43 *2** 8),  0),
      (GUID_key'Access,   44,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 44 *2** 8),  0),
      (GUID_key'Access,   45,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 45 *2** 8),  0),
      (GUID_key'Access,   46,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 46 *2** 8),  0),
      (GUID_key'Access,   47,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 47 *2** 8),  0),
      (GUID_key'Access,   48,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 48 *2** 8),  0),
      (GUID_key'Access,   49,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 49 *2** 8),  0),
      (GUID_key'Access,   50,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 50 *2** 8),  0),
      (GUID_key'Access,   51,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 51 *2** 8),  0),
      (GUID_key'Access,   52,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 52 *2** 8),  0),
      (GUID_key'Access,   53,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 53 *2** 8),  0),
      (GUID_key'Access,   54,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 54 *2** 8),  0),
      (GUID_key'Access,   55,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 55 *2** 8),  0),
      (GUID_key'Access,   56,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 56 *2** 8),  0),
      (GUID_key'Access,   57,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 57 *2** 8),  0),
      (GUID_key'Access,   58,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 58 *2** 8),  0),
      (GUID_key'Access,   59,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 59 *2** 8),  0),
      (GUID_key'Access,   60,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 60 *2** 8),  0),
      (GUID_key'Access,   61,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 61 *2** 8),  0),
      (GUID_key'Access,   62,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 62 *2** 8),  0),
      (GUID_key'Access,   63,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 63 *2** 8),  0),
      (GUID_key'Access,   64,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 64 *2** 8),  0),
      (GUID_key'Access,   65,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 65 *2** 8),  0),
      (GUID_key'Access,   66,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 66 *2** 8),  0),
      (GUID_key'Access,   67,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 67 *2** 8),  0),
      (GUID_key'Access,   68,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 68 *2** 8),  0),
      (GUID_key'Access,   69,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 69 *2** 8),  0),
      (GUID_key'Access,   70,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 70 *2** 8),  0),
      (GUID_key'Access,   71,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 71 *2** 8),  0),
      (GUID_key'Access,   72,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 72 *2** 8),  0),
      (GUID_key'Access,   73,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 73 *2** 8),  0),
      (GUID_key'Access,   74,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 74 *2** 8),  0),
      (GUID_key'Access,   75,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 75 *2** 8),  0),
      (GUID_key'Access,   76,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 76 *2** 8),  0),
      (GUID_key'Access,   77,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 77 *2** 8),  0),
      (GUID_key'Access,   78,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 78 *2** 8),  0),
      (GUID_key'Access,   79,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 79 *2** 8),  0),
      (GUID_key'Access,   80,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 80 *2** 8),  0),
      (GUID_key'Access,   81,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 81 *2** 8),  0),
      (GUID_key'Access,   82,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 82 *2** 8),  0),
      (GUID_key'Access,   83,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 83 *2** 8),  0),
      (GUID_key'Access,   84,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 84 *2** 8),  0),
      (GUID_key'Access,   85,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 85 *2** 8),  0),
      (GUID_key'Access,   86,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 86 *2** 8),  0),
      (GUID_key'Access,   87,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 87 *2** 8),  0),
      (GUID_key'Access,   88,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 88 *2** 8),  0),
      (GUID_key'Access,   89,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 89 *2** 8),  0),
      (GUID_key'Access,   90,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 90 *2** 8),  0),
      (GUID_key'Access,   91,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 91 *2** 8),  0),
      (GUID_key'Access,   92,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 92 *2** 8),  0),
      (GUID_key'Access,   93,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 93 *2** 8),  0),
      (GUID_key'Access,   94,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 94 *2** 8),  0),
      (GUID_key'Access,   95,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 95 *2** 8),  0),
      (GUID_key'Access,   96,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 96 *2** 8),  0),
      (GUID_key'Access,   97,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 97 *2** 8),  0),
      (GUID_key'Access,   98,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 98 *2** 8),  0),
      (GUID_key'Access,   99,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or ( 99 *2** 8),  0),
      (GUID_key'Access,  100,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (100 *2** 8),  0),
      (GUID_key'Access,  101,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (101 *2** 8),  0),
      (GUID_key'Access,  102,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (102 *2** 8),  0),
      (GUID_key'Access,  103,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (103 *2** 8),  0),
      (GUID_key'Access,  104,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (104 *2** 8),  0),
      (GUID_key'Access,  105,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (105 *2** 8),  0),
      (GUID_key'Access,  106,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (106 *2** 8),  0),
      (GUID_key'Access,  107,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (107 *2** 8),  0),
      (GUID_key'Access,  108,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (108 *2** 8),  0),
      (GUID_key'Access,  109,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (109 *2** 8),  0),
      (GUID_key'Access,  110,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (110 *2** 8),  0),
      (GUID_key'Access,  111,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (111 *2** 8),  0),
      (GUID_key'Access,  112,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (112 *2** 8),  0),
      (GUID_key'Access,  113,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (113 *2** 8),  0),
      (GUID_key'Access,  114,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (114 *2** 8),  0),
      (GUID_key'Access,  115,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (115 *2** 8),  0),
      (GUID_key'Access,  116,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (116 *2** 8),  0),
      (GUID_key'Access,  117,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (117 *2** 8),  0),
      (GUID_key'Access,  118,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (118 *2** 8),  0),
      (GUID_key'Access,  119,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (119 *2** 8),  0),
      (GUID_key'Access,  120,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (120 *2** 8),  0),
      (GUID_key'Access,  121,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (121 *2** 8),  0),
      (GUID_key'Access,  122,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (122 *2** 8),  0),
      (GUID_key'Access,  123,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (123 *2** 8),  0),
      (GUID_key'Access,  124,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (124 *2** 8),  0),
      (GUID_key'Access,  125,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (125 *2** 8),  0),
      (GUID_key'Access,  126,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (126 *2** 8),  0),
      (GUID_key'Access,  127,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (127 *2** 8),  0),
      (GUID_key'Access,  128,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (128 *2** 8),  0),
      (GUID_key'Access,  129,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (129 *2** 8),  0),
      (GUID_key'Access,  130,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (130 *2** 8),  0),
      (GUID_key'Access,  131,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (131 *2** 8),  0),
      (GUID_key'Access,  132,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (132 *2** 8),  0),
      (GUID_key'Access,  133,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (133 *2** 8),  0),
      (GUID_key'Access,  134,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (134 *2** 8),  0),
      (GUID_key'Access,  135,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (135 *2** 8),  0),
      (GUID_key'Access,  136,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (136 *2** 8),  0),
      (GUID_key'Access,  137,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (137 *2** 8),  0),
      (GUID_key'Access,  138,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (138 *2** 8),  0),
      (GUID_key'Access,  139,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (139 *2** 8),  0),
      (GUID_key'Access,  140,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (140 *2** 8),  0),
      (GUID_key'Access,  141,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (141 *2** 8),  0),
      (GUID_key'Access,  142,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (142 *2** 8),  0),
      (GUID_key'Access,  143,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (143 *2** 8),  0),
      (GUID_key'Access,  144,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (144 *2** 8),  0),
      (GUID_key'Access,  145,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (145 *2** 8),  0),
      (GUID_key'Access,  146,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (146 *2** 8),  0),
      (GUID_key'Access,  147,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (147 *2** 8),  0),
      (GUID_key'Access,  148,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (148 *2** 8),  0),
      (GUID_key'Access,  149,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (149 *2** 8),  0),
      (GUID_key'Access,  150,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (150 *2** 8),  0),
      (GUID_key'Access,  151,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (151 *2** 8),  0),
      (GUID_key'Access,  152,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (152 *2** 8),  0),
      (GUID_key'Access,  153,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (153 *2** 8),  0),
      (GUID_key'Access,  154,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (154 *2** 8),  0),
      (GUID_key'Access,  155,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (155 *2** 8),  0),
      (GUID_key'Access,  156,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (156 *2** 8),  0),
      (GUID_key'Access,  157,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (157 *2** 8),  0),
      (GUID_key'Access,  158,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (158 *2** 8),  0),
      (GUID_key'Access,  159,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (159 *2** 8),  0),
      (GUID_key'Access,  160,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (160 *2** 8),  0),
      (GUID_key'Access,  161,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (161 *2** 8),  0),
      (GUID_key'Access,  162,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (162 *2** 8),  0),
      (GUID_key'Access,  163,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (163 *2** 8),  0),
      (GUID_key'Access,  164,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (164 *2** 8),  0),
      (GUID_key'Access,  165,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (165 *2** 8),  0),
      (GUID_key'Access,  166,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (166 *2** 8),  0),
      (GUID_key'Access,  167,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (167 *2** 8),  0),
      (GUID_key'Access,  168,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (168 *2** 8),  0),
      (GUID_key'Access,  169,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (169 *2** 8),  0),
      (GUID_key'Access,  170,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (170 *2** 8),  0),
      (GUID_key'Access,  171,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (171 *2** 8),  0),
      (GUID_key'Access,  172,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (172 *2** 8),  0),
      (GUID_key'Access,  173,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (173 *2** 8),  0),
      (GUID_key'Access,  174,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (174 *2** 8),  0),
      (GUID_key'Access,  175,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (175 *2** 8),  0),
      (GUID_key'Access,  176,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (176 *2** 8),  0),
      (GUID_key'Access,  177,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (177 *2** 8),  0),
      (GUID_key'Access,  178,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (178 *2** 8),  0),
      (GUID_key'Access,  179,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (179 *2** 8),  0),
      (GUID_key'Access,  180,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (180 *2** 8),  0),
      (GUID_key'Access,  181,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (181 *2** 8),  0),
      (GUID_key'Access,  182,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (182 *2** 8),  0),
      (GUID_key'Access,  183,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (183 *2** 8),  0),
      (GUID_key'Access,  184,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (184 *2** 8),  0),
      (GUID_key'Access,  185,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (185 *2** 8),  0),
      (GUID_key'Access,  186,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (186 *2** 8),  0),
      (GUID_key'Access,  187,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (187 *2** 8),  0),
      (GUID_key'Access,  188,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (188 *2** 8),  0),
      (GUID_key'Access,  189,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (189 *2** 8),  0),
      (GUID_key'Access,  190,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (190 *2** 8),  0),
      (GUID_key'Access,  191,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (191 *2** 8),  0),
      (GUID_key'Access,  192,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (192 *2** 8),  0),
      (GUID_key'Access,  193,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (193 *2** 8),  0),
      (GUID_key'Access,  194,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (194 *2** 8),  0),
      (GUID_key'Access,  195,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (195 *2** 8),  0),
      (GUID_key'Access,  196,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (196 *2** 8),  0),
      (GUID_key'Access,  197,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (197 *2** 8),  0),
      (GUID_key'Access,  198,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (198 *2** 8),  0),
      (GUID_key'Access,  199,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (199 *2** 8),  0),
      (GUID_key'Access,  200,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (200 *2** 8),  0),
      (GUID_key'Access,  201,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (201 *2** 8),  0),
      (GUID_key'Access,  202,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (202 *2** 8),  0),
      (GUID_key'Access,  203,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (203 *2** 8),  0),
      (GUID_key'Access,  204,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (204 *2** 8),  0),
      (GUID_key'Access,  205,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (205 *2** 8),  0),
      (GUID_key'Access,  206,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (206 *2** 8),  0),
      (GUID_key'Access,  207,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (207 *2** 8),  0),
      (GUID_key'Access,  208,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (208 *2** 8),  0),
      (GUID_key'Access,  209,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (209 *2** 8),  0),
      (GUID_key'Access,  210,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (210 *2** 8),  0),
      (GUID_key'Access,  211,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (211 *2** 8),  0),
      (GUID_key'Access,  212,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (212 *2** 8),  0),
      (GUID_key'Access,  213,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (213 *2** 8),  0),
      (GUID_key'Access,  214,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (214 *2** 8),  0),
      (GUID_key'Access,  215,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (215 *2** 8),  0),
      (GUID_key'Access,  216,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (216 *2** 8),  0),
      (GUID_key'Access,  217,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (217 *2** 8),  0),
      (GUID_key'Access,  218,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (218 *2** 8),  0),
      (GUID_key'Access,  219,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (219 *2** 8),  0),
      (GUID_key'Access,  220,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (220 *2** 8),  0),
      (GUID_key'Access,  221,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (221 *2** 8),  0),
      (GUID_key'Access,  222,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (222 *2** 8),  0),
      (GUID_key'Access,  223,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (223 *2** 8),  0),
      (GUID_key'Access,  224,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (224 *2** 8),  0),
      (GUID_key'Access,  225,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (225 *2** 8),  0),
      (GUID_key'Access,  226,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (226 *2** 8),  0),
      (GUID_key'Access,  227,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (227 *2** 8),  0),
      (GUID_key'Access,  228,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (228 *2** 8),  0),
      (GUID_key'Access,  229,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (229 *2** 8),  0),
      (GUID_key'Access,  230,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (230 *2** 8),  0),
      (GUID_key'Access,  231,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (231 *2** 8),  0),
      (GUID_key'Access,  232,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (232 *2** 8),  0),
      (GUID_key'Access,  233,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (233 *2** 8),  0),
      (GUID_key'Access,  234,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (234 *2** 8),  0),
      (GUID_key'Access,  235,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (235 *2** 8),  0),
      (GUID_key'Access,  236,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (236 *2** 8),  0),
      (GUID_key'Access,  237,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (237 *2** 8),  0),
      (GUID_key'Access,  238,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (238 *2** 8),  0),
      (GUID_key'Access,  239,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (239 *2** 8),  0),
      (GUID_key'Access,  240,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (240 *2** 8),  0),
      (GUID_key'Access,  241,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (241 *2** 8),  0),
      (GUID_key'Access,  242,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (242 *2** 8),  0),
      (GUID_key'Access,  243,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (243 *2** 8),  0),
      (GUID_key'Access,  244,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (244 *2** 8),  0),
      (GUID_key'Access,  245,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (245 *2** 8),  0),
      (GUID_key'Access,  246,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (246 *2** 8),  0),
      (GUID_key'Access,  247,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (247 *2** 8),  0),
      (GUID_key'Access,  248,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (248 *2** 8),  0),
      (GUID_key'Access,  249,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (249 *2** 8),  0),
      (GUID_key'Access,  250,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (250 *2** 8),  0),
      (GUID_key'Access,  251,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (251 *2** 8),  0),
      (GUID_key'Access,  252,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (252 *2** 8),  0),
      (GUID_key'Access,  253,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (253 *2** 8),  0),
      (GUID_key'Access,  254,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (254 *2** 8),  0),
      (GUID_key'Access,  255,  DIDFT_BUTTON or DIPROPRANGE_NOMIN or (255 *2** 8),  0)
     );
    
   c_dfDIKeyboard:CONSTANT DIDATAFORMAT:=(dwSize    =>DIDATAFORMAT'size/8,
                                          dwObjSize =>DIObjectDataFormat'size/8,
                                          dwFlags   =>DIDF_RELAXIS,
                                          dwDataSize=>256,  
                                          dwNumObjs =>256,  --rgodfKeyboard'Last+1
                                          rgodf     =>rgodfKeyboard(0)'Access
                                         );
    
    
   rgodfJoystick:DIObjectDataFormat_Array(0..43):=
     (
        (GUID_XAxis'Access,  DIJOFS_X,   DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
      (GUID_YAxis'Access,  DIJOFS_Y,   DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
      (GUID_ZAxis'Access,  DIJOFS_Z,   DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
      (GUID_RxAxis'Access, DIJOFS_RX,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
      (GUID_RyAxis'Access, DIJOFS_RY,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
      (GUID_RzAxis'Access, DIJOFS_RZ,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
        -- 2 Sliders
      (GUID_Slider'Access, 24,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
      (GUID_Slider'Access, 28,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
        -- 4 POVs (yes, really)
      (GUID_POV'Access, 32,  DIDFT_POV or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (GUID_POV'Access, 36,  DIDFT_POV or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (GUID_POV'Access, 40,  DIDFT_POV or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (GUID_POV'Access, 44,  DIDFT_POV or DIDFT_ANYINSTANCE or 16#80000000#,  0),
        -- Buttons
      (NULL, DIJOFS_BUTTON0,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON1,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON2,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON3,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON4,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON5,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON6,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON7,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON8,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON9,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON10,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON11,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON12,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON13,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON14,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON15,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON16,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON17,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON18,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON19,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON20,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON21,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON22,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON23,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON24,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON25,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON26,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON27,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON28,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON29,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON30,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      (NULL, DIJOFS_BUTTON31,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0)
     );
   c_dfDIJoystick:CONSTANT DIDATAFORMAT:=(dwSize    =>DIDATAFORMAT'size/8,
                                          dwObjSize =>DIObjectDataFormat'size/8,
                                          dwFlags   =>DIDF_ABSAXIS,
                                          dwDataSize=>DIJoyState'size/8,  
                                          dwNumObjs =>44,  --rgodfJoystick'last+1
                                          rgodf     =>rgodfJoystick(0)'Access
                                         );
    
    
   rgodfJoystick2:DIObjectDataFormat_Array(0..163):=
     (( GUID_XAxis'access,   DIJOFS_X,   DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
      ( GUID_YAxis'access,   DIJOFS_Y,   DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
      ( GUID_ZAxis'access,   DIJOFS_Z,   DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
      ( GUID_RxAxis'access,  DIJOFS_RX,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
      ( GUID_RyAxis'access,  DIJOFS_RY,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
      ( GUID_RzAxis'access,  DIJOFS_RZ,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
        -- 2 Sliders
      ( GUID_Slider'access,  24,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
      ( GUID_Slider'access,  28,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTPOSITION),
        -- 4 POVs (yes, really)
      ( GUID_POV'access,  32,  DIDFT_POV or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( GUID_POV'access,  36,  DIDFT_POV or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( GUID_POV'access,  40,  DIDFT_POV or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( GUID_POV'access,  44,  DIDFT_POV or DIDFT_ANYINSTANCE or 16#80000000#,  0),
        -- Buttons
      ( NULL,  DIJOFS_BUTTON0,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON1,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON2,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON3,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON4,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON5,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON6,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON7,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON8,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON9,   DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON10,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON11,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON12,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON13,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON14,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON15,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON16,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON17,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON18,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON19,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON20,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON21,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON22,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON23,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON24,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON25,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON26,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON27,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON28,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON29,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON30,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,  DIJOFS_BUTTON31,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  0),
      ( NULL,   80,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   81,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   82,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   83,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   84,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   85,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   86,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   87,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   88,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   89,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   90,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   91,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   92,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   93,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   94,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   95,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   96,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   97,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   98,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,   99,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  100,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  101,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  102,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  103,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  104,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  105,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  106,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  107,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  108,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  109,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  110,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  111,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  112,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  113,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  114,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  115,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  116,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  117,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  118,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  119,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  120,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  121,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  122,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  123,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  124,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  125,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  126,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  127,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  128,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  129,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  130,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  131,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  132,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  133,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  134,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  135,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  136,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  137,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  138,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  139,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  140,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  141,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  142,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  143,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  144,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  145,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  146,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  147,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  148,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  149,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  150,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  151,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  152,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  153,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  154,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  155,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  156,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  157,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  158,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  159,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  160,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  161,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  162,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  163,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  164,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  165,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  166,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  167,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  168,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  169,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  170,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  171,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  172,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  173,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  174,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( NULL,  175,  DIDFT_BUTTON or DIDFT_ANYINSTANCE or 16#80000000#,  16#0#),
      ( GUID_XAxis'access,   176,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTVELOCITY),
      ( GUID_YAxis'access,   180,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTVELOCITY),
      ( GUID_ZAxis'access,   184,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTVELOCITY),
      ( GUID_RxAxis'access,  188,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTVELOCITY),
      ( GUID_RyAxis'access,  192,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTVELOCITY),
      ( GUID_RzAxis'access,  196,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTVELOCITY),
      ( GUID_Slider'access,   24,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTVELOCITY),
      ( GUID_Slider'access,   28,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTVELOCITY),
      ( GUID_XAxis'access,   208,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTACCEL),
      ( GUID_YAxis'access,   212,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTACCEL),
      ( GUID_ZAxis'access,   216,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTACCEL),
      ( GUID_RxAxis'access,  220,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTACCEL),
      ( GUID_RyAxis'access,  224,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTACCEL),
      ( GUID_RzAxis'access,  228,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTACCEL),
      ( GUID_Slider'access,   24,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTACCEL),
      ( GUID_Slider'access,   28,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTACCEL),
      ( GUID_XAxis'access,   240,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTFORCE),
      ( GUID_YAxis'access,   244,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTFORCE),
      ( GUID_ZAxis'access,   248,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTFORCE),
      ( GUID_RxAxis'access,  252,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTFORCE),
      ( GUID_RyAxis'access,  256,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTFORCE),
      ( GUID_RzAxis'access,  260,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTFORCE),
      ( GUID_Slider'access,   24,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTFORCE),
      ( GUID_Slider'access,   28,  DIDFT_AXIS or DIDFT_ANYINSTANCE or 16#80000000#,  DIDOI_ASPECTFORCE)
     );
    
   c_dfDIJoystick2:DIDATAFORMAT:=(dwSize    =>DIDATAFORMAT'size/8,
                                  dwObjSize =>DIObjectDataFormat'size/8,
                                  dwFlags   =>DIDF_ABSAXIS,
                                  dwDataSize=>DIJoyState2'size/8,  
                                  dwNumObjs =>164,  --rgodfJoystick2'last+1
                                  rgodf     =>rgodfJoystick2(0)'Access
                                 );
                                            
                                            
                                            
   --Line:648
   --------------------------------------------
   --NOTICE:PLEASE VERY CAREFUL THE STRUCTURE--
   --THE SIZE IS 44,AND VC++ IS 40,so use    --
   --unchecked_union pragma                  --
   --------------------------------------------
   type DIACTIONA(B:Boolean:=True) is record
      uAppData:PUINT;
      dwSemantic:DWORD;
      dwFlags:DWORD;
      case B is
      when True=>
         lptszActionName:LPCSTR;
         guidInstance:GUID;
         dwObjID:DWORD;
         dwHow:DWORD;
      when False=>
         uResIdString2:uint;
         guidInstance2:GUID;
         dwObjID2:DWORD;
         dwHow2:DWORD;
      end case;
   end record;
   pragma unchecked_union(DIACTIONA);
    
   type LPDIACTIONA is access all DIACTIONA;
   type LPCDIACTIONA is access constant DIACTIONA;
    
   subtype DIACTION is DIACTIONA;
   subtype LPDIACTION is LPDIACTIONA;
   subtype LPCDIACTION is LPCDIACTIONA;
    
   DIACTIONA_SIZE:CONSTANT:=40;
    
    
   type DIACTIONW(B:BOOLEAN:=TRUE) is record
      uAppData:PUINT;
      dwSemantic:DWORD;
      dwFlags:DWORD;
      case B is
      when True=>
         lptszActionName:LPCWSTR;
         guidInstance:GUID;
         dwObjID:DWORD;
         dwHow:DWORD;
      when False=>
         uResIdString2:uint;
         guidInstance2:GUID;
         dwObjID2:DWORD;
         dwHow2:DWORD;
      end case;
   end record;
   PRAGMA UNCHECKED_UNION(DIACTIONW);
   type LPDIACTIONW is access all DIACTIONW;
   type LPCDIACTIONW is access constant DIACTIONW;  

    
   --Line:692..704
   DIA_FORCEFEEDBACK       :constant:=16#00000001#;
   DIA_APPMAPPED           :constant:=16#00000002#;
   DIA_APPNOMAP            :constant:=16#00000004#;
   DIA_NORANGE             :constant:=16#00000008#;
   DIA_APPFIXED            :constant:=16#00000010#;
   DIAH_UNMAPPED           :constant:=16#00000000#;
   DIAH_USERCONFIG         :constant:=16#00000001#;
   DIAH_APPREQUESTED       :constant:=16#00000002#;
   DIAH_HWAPP              :constant:=16#00000004#;
   DIAH_HWDEFAULT          :constant:=16#00000008#;
   DIAH_DEFAULT            :constant:=16#00000020#;
   DIAH_ERROR              :constant:=16#80000000#;
    
   --Line:706
   type DIACTIONFORMATA is record
      dwSize:DWORD;
      dwActionSize:DWORD;
      dwDataSize:DWORD;
      dwNumActions:DWORD;
      rgoAction:LPDIACTIONA;
      guidActionMap:GUID;
      dwGenre:DWORD;
      dwBufferSize:DWORD;
      lAxisMin:Long;
      lAxisMax:Long;
      hInstString:win32.windef.hinstance;
      ftTimeStamp:win32.winbase.FILETIME;
      dwCRC:DWORD;
      tszActionMap:CHAR_ARRAY(0..259);
   end record;
   type LPDIACTIONFORMATA is access all DIACTIONFORMATA;
   subtype LPDIACTIONFORMAT is LPDIACTIONFORMATA;
   subtype DIACTIONFORMAT is DIACTIONFORMATA;
    
   DIACTIONFORMATA_SIZE:constant:=328;
    
    
   --Line:722
   type DIACTIONFORMATW is record
      dwSize:DWORD;
      dwActionSize:DWORD;
      dwDataSize:DWORD;
      dwNumActions:DWORD;
      rgoAction:LPDIACTIONW;
      guidActionMap:GUID;
      dwGenre:DWORD;
      dwBufferSize:DWORD;
      lAxisMin:Long;
      lAxisMax:Long;
      hInstString:win32.windef.hinstance;
      ftTimeStamp:win32.winbase.FILETIME;
      dwCRC:DWORD;
      tszActionMap:WCHAR_ARRAY(0..259);
   end record;                                      
   type LPDIACTIONFORMATW is access all DIACTIONFORMATW;
    
   DIACTIONFORMATW_SIZE:CONSTANT:=588;

   DIAFTS_NEWDEVICELOW     :constant:=16#FFFFFFFF#;
   DIAFTS_NEWDEVICEHIGH    :constant:=16#FFFFFFFF#;
   DIAFTS_UNUSEDDEVICELOW  :constant:=16#00000000#;
   DIAFTS_UNUSEDDEVICEHIGH :constant:=16#00000000#;

   DIDBAM_DEFAULT          :constant:=16#00000000#;
   DIDBAM_PRESERVE         :constant:=16#00000001#;
   DIDBAM_INITIALIZE       :constant:=16#00000002#;
   DIDBAM_HWDEFAULTS       :constant:=16#00000004#;

   DIDSAM_DEFAULT          :constant:=16#00000000#;
   DIDSAM_NOUSER           :constant:=16#00000001#;
   DIDSAM_FORCESAVE        :constant:=16#00000002#;

   DICD_DEFAULT            :constant:=16#00000000#;
   DICD_EDIT               :constant:=16#00000001#;
                                            
   --Line:777
   subtype D3DCOLOR is DWORD;
    
   --Line:781
   type DICOLORSET is record
      dwSize           :DWORD;
      cTextFore        :D3DCOLOR;
      cTextHighlight   :D3DCOLOR;
      cCalloutLine     :D3DCOLOR;
      cCalloutHighlight:D3DCOLOR;
      cBorder          :D3DCOLOR;
      cControlFill     :D3DCOLOR;
      cHighlightFill   :D3DCOLOR;
      cAreaFill        :D3DCOLOR;
   end record;
   pragma convention(C_PASS_BY_COPY,DICOLORSET);
    
   type LPDICOLORSET is access all DICOLORSET;
   type LPCDICOLORSET is access constant DICOLORSET;
    
   DICOLORSET_SIZE:CONSTANT:=36;
    
   --Line:795
   type DICONFIGUREDEVICESPARAMSA is record
      dwSize         :DWORD;
      dwcUsers       :DWORD;
      lptszUserNames :LPSTR;
      dwcFormats     :DWORD;
      lprgFormats    :LPDIACTIONFORMATA;
      hwnd           :win32.windef.HWND;
      dics           :DICOLORSET;
      lpUnkDDSTarget:win32.objbase.IUNKNOWN;  --is a pointer or a IUNKNOWN?
   end record;
   pragma convention(C_PASS_BY_COPY,DICONFIGUREDEVICESPARAMSA);
   type LPDICONFIGUREDEVICESPARAMSA is access all DICONFIGUREDEVICESPARAMSA;
   subtype LPDICONFIGUREDEVICESPARAMS is LPDICONFIGUREDEVICESPARAMSA;
    
   --Line:805
   type DICONFIGUREDEVICESPARAMSW is record
      dwSize         :DWORD;
      dwcUsers       :DWORD;
      lptszUserNames :LPWSTR;
      dwcFormats     :DWORD;
      lprgFormats    :LPDIACTIONFORMATA;
      hwnd           :win32.windef.HWND;
      dics           :DICOLORSET;
      lpUnkDDSTarget :win32.objbase.IUNKNOWN;  --is a pointer or a IUNKNOWN?
   end record;
   pragma convention(C_PASS_BY_COPY,DICONFIGUREDEVICESPARAMSW);
   type LPDICONFIGUREDEVICESPARAMSW is access all DICONFIGUREDEVICESPARAMSW;
    
   --Line:834..842
   DIDIFT_CONFIGURATION:constant:=16#00000001#;
   DIDIFT_OVERLAY      :constant:=16#00000002#;

   DIDAL_CENTERED      :constant:=16#00000000#;
   DIDAL_LEFTALIGNED   :constant:=16#00000001#;
   DIDAL_RIGHTALIGNED  :constant:=16#00000002#;
   DIDAL_MIDDLE        :constant:=16#00000000#;
   DIDAL_TOPALIGNED    :constant:=16#00000004#;
   DIDAL_BOTTOMALIGNED :constant:=16#00000008#;
    
   --Line:
   type POINT_ARRAY is ARRAY(NATURAL RANGE<>)OF WIN32.WINDEF.POINT;
   type DIDEVICEIMAGEINFOA is record
      tszImagePath   :CHAR_ARRAY(0..259);
      dwFlags        :DWORD;
      --These are valid if DIDIFT_OVERLAY is present in dwFlags.
      dwViewID       :DWORD;
      rcOverlay      :win32.windef.RECT;
      dwObjID        :DWORD;
      dwcValidPts    :DWORD;
      rgptCalloutLine:POINT_ARRAY(0..4);
      rcCalloutRect  :win32.windef.RECT;
      dwTextAlign    :DWORD;
   end record;
   pragma convention(C_PASS_BY_COPY,DIDEVICEIMAGEINFOA);
    
   type LPDIDEVICEIMAGEINFOA is access all DIDEVICEIMAGEINFOA;
   subtype DIDEVICEIMAGEINFO is DIDEVICEIMAGEINFOA;
   subtype LPDIDEVICEIMAGEINFO is LPDIDEVICEIMAGEINFOA;
    
   --Line:856
   type DIDEVICEIMAGEINFOW is record
      tszImagePath   :WCHAR_ARRAY(0..259);
      dwFlags        :DWORD;
      --These are valid if DIDIFT_OVERLAY is present in dwFlags.
      dwViewID       :DWORD;
      rcOverlay      :win32.windef.RECT;
      dwObjID        :DWORD;
      dwcValidPts    :DWORD;
      rgptCalloutLine:POINT_ARRAY(0..4);
      rcCalloutRect  :win32.windef.RECT;
      dwTextAlign    :DWORD;
   end record;
   pragma convention(C_PASS_BY_COPY,DIDEVICEIMAGEINFOW);
   type LPDIDEVICEIMAGEINFOW is access all DIDEVICEIMAGEINFOW;
    
   --Line:886
   type DIDEVICEIMAGEINFOHEADERA is record
      dwSize:DWORD;
      dwSizeImageInfo:DWORD;
      dwcViews:DWORD;
      dwcButtons:DWORD;
      dwcAxes:DWORD;
      dwcPOVs:DWORD;
      dwBufferSize:DWORD;
      dwBufferUsed:DWORD;
      lprgImageInfoArray:LPDIDEVICEIMAGEINFOA;
   end record;
   pragma convention(C_PASS_BY_COPY,DIDEVICEIMAGEINFOHEADERA);
   type LPDIDEVICEIMAGEINFOHEADERA is access all DIDEVICEIMAGEINFOHEADERA;
   type LPCDIDEVICEIMAGEINFOHEADERA is access constant DIDEVICEIMAGEINFOHEADERA;
    
   subtype DIDEVICEIMAGEINFOHEADER is DIDEVICEIMAGEINFOHEADERA;
   subtype LPDIDEVICEIMAGEINFOHEADER is LPDIDEVICEIMAGEINFOHEADERA;
   subtype LPCDIDEVICEIMAGEINFOHEADER is LPCDIDEVICEIMAGEINFOHEADERA;
   --Line:897
   type DIDEVICEIMAGEINFOHEADERW is record
      dwSize:DWORD;
      dwSizeImageInfo:DWORD;
      dwcViews:DWORD;
      dwcButtons:DWORD;
      dwcAxes:DWORD;
      dwcPOVs:DWORD;
      dwBufferSize:DWORD;
      dwBufferUsed:DWORD;
      lprgImageInfoArray:LPDIDEVICEIMAGEINFOW;
   end record;
   pragma convention(C_PASS_BY_COPY,DIDEVICEIMAGEINFOHEADERW);
   type LPDIDEVICEIMAGEINFOHEADERW is access all DIDEVICEIMAGEINFOHEADERW;
   type LPCDIDEVICEIMAGEINFOHEADERW is access constant DIDEVICEIMAGEINFOHEADERW;
    
   --Line:931
   type DIDEVICEOBJECTINSTANCE_DX3A is record
      dwSize:DWORD;
      guidType:GUID;
      dwOfs:DWORD;
      dwType:DWORD;
      dwFlags:DWORD;
      tszName:CHAR_ARRAY(0..259);
   end record;
   pragma convention(C_PASS_BY_COPY,DIDEVICEOBJECTINSTANCE_DX3A);
   type LPDIDEVICEOBJECTINSTANCE_DX3A is access all DIDEVICEOBJECTINSTANCE_DX3A;
   type LPCDIDEVICEOBJECTINSTANCE_DX3A is access constant DIDEVICEOBJECTINSTANCE_DX3A;
    
   subtype DIDEVICEOBJECTINSTANCE_DX3 is DIDEVICEOBJECTINSTANCE_DX3A;
   subtype LPDIDEVICEOBJECTINSTANCE_DX3 is LPDIDEVICEOBJECTINSTANCE_DX3A;
   subtype LPCDIDEVICEOBJECTINSTANCE_DX3 is LPCDIDEVICEOBJECTINSTANCE_DX3A;
   --Line:939
   type DIDEVICEOBJECTINSTANCE_DX3W is record
      dwSize:DWORD;
      guidType:GUID;
      dwOfs:DWORD;
      dwType:DWORD;
      dwFlags:DWORD;
      tszName:WCHAR_ARRAY(0..259);
   end record;
   pragma convention(C_PASS_BY_COPY,DIDEVICEOBJECTINSTANCE_DX3W);
   type LPDIDEVICEOBJECTINSTANCE_DX3W is access all DIDEVICEOBJECTINSTANCE_DX3W;
    
   --Line:959
   type DIDEVICEOBJECTINSTANCEA is record
      dwSize:DWORD;
      guidType:GUID;
      dwOfs:DWORD;
      dwType:DWORD;
      dwFlags:DWORD;
      tszName:CHAR_ARRAY(0..259);
      --version >=16#0500#
      dwFFMaxForce:DWORD;
      dwFFForceResolution:DWORD;
      wCollectionNumber:WORD;
      wDesignatorIndex:WORD;
      wUsagePage:WORD;
      wUsage:WORD;
      dwDimension:DWORD;
      wExponent:WORD;
      wReportId:WORD;
   end record;
   pragma convention(C_PASS_BY_COPY,DIDEVICEOBJECTINSTANCEA);
   type LPDIDEVICEOBJECTINSTANCEA is access all DIDEVICEOBJECTINSTANCEA;
   type LPCDIDEVICEOBJECTINSTANCEA is access constant DIDEVICEOBJECTINSTANCEA;
   subtype DIDEVICEOBJECTINSTANCE is DIDEVICEOBJECTINSTANCEA;
   subtype LPDIDEVICEOBJECTINSTANCE is LPDIDEVICEOBJECTINSTANCEA;
   subtype LPCDIDEVICEOBJECTINSTANCE is LPCDIDEVICEOBJECTINSTANCEA;
    
   --Line:978
   type DIDEVICEOBJECTINSTANCEW is record
      dwSize:DWORD;
      guidType:GUID;
      dwOfs:DWORD;
      dwType:DWORD;
      dwFlags:DWORD;
      tszName:WCHAR_ARRAY(0..259);
      --version >=16#0500# define belows
      dwFFMaxForce:DWORD;
      dwFFForceResolution:DWORD;
      wCollectionNumber:WORD;
      wDesignatorIndex:WORD;
      wUsagePage:WORD;
      wUsage:WORD;
      dwDimension:DWORD;
      wExponent:WORD;
      wReportId:WORD;
   end record;
   pragma convention(C_PASS_BY_COPY,DIDEVICEOBJECTINSTANCEW);
   type LPDIDEVICEOBJECTINSTANCEW is access all DIDEVICEOBJECTINSTANCEW;
   type LPCDIDEVICEOBJECTINSTANCEW is access constant DIDEVICEOBJECTINSTANCEW;
    
   --Line:1008..1009
   type LPDIENUMDEVICEOBJECTSCALLBACKA is access function
     (doi:LPCDIDEVICEOBJECTINSTANCEA;addr:lpvoid) return WIN32.BOOL;
   pragma convention(STDCALL,LPDIENUMDEVICEOBJECTSCALLBACKA);
    
   type LPDIENUMDEVICEOBJECTSCALLBACKW is access function
     (doi:LPCDIDEVICEOBJECTINSTANCEW;addr:lpvoid) return WIN32.BOOL;
   pragma convention(STDCALL,LPDIENUMDEVICEOBJECTSCALLBACKW);
    
    
   --Line:1030
   type DIPROPHEADER is record
      dwSize:DWORD;
      dwHeaderSize:DWORD;
      dwObj:DWORD;
      dwHow:DWORD;  
   end record;
   pragma convention(C_PASS_BY_COPY,DIPROPHEADER);
   type LPDIPROPHEADER is access all DIPROPHEADER;
   type LPCDIPROPHEADER is access constant DIPROPHEADER;
    
   DIPH_DEVICE     :constant:=0;
   DIPH_BYOFFSET   :constant:=1;
   DIPH_BYID       :constant:=2;
   DIPH_BYUSAGE    :constant:=3;
    
   --Line:1046
   function DIMAKEUSAGEDWORD(UsagePage:WORD;Usage:WORD) return DWORD;
    
   --Line:1050
   type DIPROPDWORD is record
      diph:DIPROPHEADER;
      dwData:DWORD;
   end record;
   pragma convention(C_PASS_BY_COPY,DIPROPDWORD);
   type LPDIPROPDWORD  is access all DIPROPDWORD;
   type LPCDIPROPDWORD is access constant DIPROPDWORD;
    
   --Line:1057
   type DIPROPPOINTER is record
      diph:DIPROPHEADER;
      UDATA:PUINT;
   end record;
   pragma convention(C_PASS_BY_COPY,DIPROPPOINTER);
   type LPDIPROPPOINTER  is access all DIPROPPOINTER;
   type LPCDIPROPPOINTER is access constant DIPROPPOINTER;
    
   --Line:1064
   type DIPROPRANGE is record
      diph:DIPROPHEADER;
      lMin:Long;
      lMax:Long;
   end record;
   pragma convention(C_PASS_BY_COPY,DIPROPRANGE);
   type LPDIPROPRANGE  is access all DIPROPRANGE;
   type LPCDIPROPRANGE is access constant DIPROPRANGE;
    
    
   --Line:1075
   type DIPROPCAL is record
      diph:DIPROPHEADER;
      lMin:Long;
      lCenter:Long;
      lMax:Long;
   end record;
   pragma convention(C_PASS_BY_COPY,DIPROPCAL);
   type LPDIPROPCAL  is access all DIPROPCAL;
   type LPCDIPROPCAL is access constant DIPROPCAL;
    
   --Line:1083
   type DIPROPCALPOV is record
      diph:DIPROPHEADER;
      lMin:LONG_ARRAY(0..4);
      lMax:LONG_ARRAY(0..4);
   end record;
   pragma convention(C_PASS_BY_COPY,DIPROPCALPOV);
   type LPDIPROPCALPOV  is access all DIPROPCALPOV;
   type LPCDIPROPCALPOV is access constant DIPROPCALPOV;
    
   --Line:1090
   type DIPROPGUIDANDPATH is record
      diph:DIPROPHEADER;
      guidClass:GUID;
      wszPath:WCHAR_ARRAY(0..259);
   end record;
   pragma convention(C_PASS_BY_COPY,DIPROPGUIDANDPATH);
   type LPDIPROPGUIDANDPATH  is access all DIPROPGUIDANDPATH;
   type LPCDIPROPGUIDANDPATH is access constant DIPROPGUIDANDPATH;
    
   --Line:1097
   type DIPROPSTRING is record
      diph:DIPROPHEADER;
      wsz:WCHAR_ARRAY(0..259);
   end record;
   pragma convention(C_PASS_BY_COPY,DIPROPSTRING);
   type LPDIPROPSTRING  is access all DIPROPSTRING;
   type LPCDIPROPSTRING is access constant DIPROPSTRING;
    
   --Line:1106
   MAXCPOINTSNUM         :constant:=8;
    
   --Line:1108
   type CPOINT is record
      lp:LONG;     --raw value
      dwLog:DWORD; --logical_value / max_logical_value * 10000
   end record;
   pragma convention(C_PASS_BY_COPY,CPOINT);
   type LPCPOINT is access all CPOINT;
   type CPOINT_ARRAY is array(natural range<>)of CPOINT;
    
   --Line:1114
   type DIPROPCPOINTS is record
      diph:DIPROPHEADER;
      dwCPointsNum:DWORD;
      cp:CPOINT_ARRAY(0..7);
   end record;
   pragma convention(C_PASS_BY_COPY,DIPROPCPOINTS);
   type LPDIPROPCPOINTS  is access all DIPROPCPOINTS;
   type LPCDIPROPCPOINTS is access constant DIPROPCPOINTS;
    
   --Line:1124
   function MAKEDIPROP(prop:DWORD) return Win32.objbase.REFGUID;
    
   function UC is new Ada.unchecked_conversion(win32.DWORD,WIN32.OBJBASE.REFGUID);
    
   --Line:1129..1194
   DIPROP_BUFFERSIZE              :constant Win32.objbase.REFGUID:=UC(1);
   DIPROP_AXISMODE                :constant Win32.objbase.REFGUID:=UC(2);
   DIPROPAXISMODE_ABS             :constant:=  0;
   DIPROPAXISMODE_REL             :constant:=  1;
   DIPROP_GRANULARITY             :constant Win32.objbase.REFGUID:=UC(3);
   DIPROP_RANGE                   :constant Win32.objbase.REFGUID:=UC(4);
   DIPROP_DEADZONE                :constant Win32.objbase.REFGUID:=UC(5);
   DIPROP_SATURATION              :constant Win32.objbase.REFGUID:=UC(6);
   DIPROP_FFGAIN                  :constant Win32.objbase.REFGUID:=UC(7);
   DIPROP_FFLOAD                  :constant Win32.objbase.REFGUID:=UC(8);
   DIPROP_AUTOCENTER              :constant Win32.objbase.REFGUID:=UC(9);
   DIPROPAUTOCENTER_OFF           :constant:=   0;
   DIPROPAUTOCENTER_ON            :constant:=   1;
   DIPROP_CALIBRATIONMODE         :constant Win32.objbase.REFGUID:=UC(10);
   DIPROPCALIBRATIONMODE_COOKED   :constant:=   0;
   DIPROPCALIBRATIONMODE_RAW      :constant:=   1;

   --#if(DIRECTINPUT_VERSION >= 0x050a)
   DIPROP_CALIBRATION    :constant Win32.objbase.REFGUID:=UC(11);
   DIPROP_GUIDANDPATH    :constant Win32.objbase.REFGUID:=UC(12);
   DIPROP_INSTANCENAME   :constant Win32.objbase.REFGUID:=UC(13);
   DIPROP_PRODUCTNAME    :constant Win32.objbase.REFGUID:=UC(14);
   --#endif /* DIRECTINPUT_VERSION >= 0x050a --
   --#if(DIRECTINPUT_VERSION >= 0x05b2)
   DIPROP_JOYSTICKID            :constant Win32.objbase.REFGUID:=UC(15);
   DIPROP_GETPORTDISPLAYNAME    :constant Win32.objbase.REFGUID:=UC(16);
   --#endif /* DIRECTINPUT_VERSION >= 0x05b2 --
   --#if(DIRECTINPUT_VERSION >= 0x0700)
   DIPROP_PHYSICALRANGE:constant Win32.objbase.REFGUID:=UC(18);
   DIPROP_LOGICALRANGE :constant Win32.objbase.REFGUID:=UC(19);
   --#endif /* DIRECTINPUT_VERSION >= 0x0700 --
   --#if(DIRECTINPUT_VERSION >= 0x0800)
   DIPROP_KEYNAME      :constant Win32.objbase.REFGUID:=UC(20);
   DIPROP_CPOINTS      :constant Win32.objbase.REFGUID:=UC(21);
   DIPROP_APPDATA      :constant Win32.objbase.REFGUID:=UC(22);
   DIPROP_SCANCODE     :constant Win32.objbase.REFGUID:=UC(23);
   DIPROP_VIDPID       :constant Win32.objbase.REFGUID:=UC(24);
   DIPROP_USERNAME     :constant Win32.objbase.REFGUID:=UC(25);
   DIPROP_TYPENAME     :constant Win32.objbase.REFGUID:=UC(26);
   --#endif /* DIRECTINPUT_VERSION >= 0x0800 --
    
   --Line:1198
   type DIDEVICEOBJECTDATA_DX3 is record
      dwOfs      :DWORD;
      dwData     :DWORD;
      dwTimeStamp:DWORD;
      dwSequence :DWORD;    
   end record;
   pragma convention(C_PASS_BY_COPY,DIDEVICEOBJECTDATA_DX3);
   TYPE LPDIDEVICEOBJECTDATA_DX3 is access all DIDEVICEOBJECTDATA_DX3;
   TYPE LPCDIDEVICEOBJECTDATA_DX3 is access constant DIDEVICEOBJECTDATA_DX3;
    
   --Line:1206
   type DIDEVICEOBJECTDATA is record
      dwOfs      :DWORD;
      dwData     :DWORD;
      dwTimeStamp:DWORD;
      dwSequence :DWORD;    
      uAppData   :PUINT;
   end record;
   pragma convention(C_PASS_BY_COPY,DIDEVICEOBJECTDATA);
   type LPDIDEVICEOBJECTDATA is access all DIDEVICEOBJECTDATA;
   type LPCDIDEVICEOBJECTDATA is access constant DIDEVICEOBJECTDATA;
    
   --Line:
   DIGDD_PEEK          :constant:=16#00000001#;
    
   --This function compare two DWORD--
   type operator is (E,NE,L,S,LE,SE);
   --E:Equeal,NE:not equeal,L:larger,S,Smaller..
   for  operator'size use 32;
    
   --Line:1219
   function DISEQUENCE_COMPARE(seq1:DWORD;oper:OPERATOR;seq2:DWORD) RETURN BOOL;
    
   DISCL_EXCLUSIVE     :constant:=16#00000001#;
   DISCL_NONEXCLUSIVE  :constant:=16#00000002#;
   DISCL_FOREGROUND    :constant:=16#00000004#;
   DISCL_BACKGROUND    :constant:=16#00000008#;
   DISCL_NOWINKEY      :constant:=16#00000010#;
    
   --Line:1230
   type DIDEVICEINSTANCE_DX3A is record
      dwSize         :DWORD;
      guidInstance   :GUID;
      guidProduct    :GUID;
      dwDevType      :DWORD;
      tszInstanceName:CHAR_ARRAY(0..259);
      tszProductName :CHAR_ARRAY(0..259);
   end record;
   type LPDIDEVICEINSTANCE_DX3A is access all DIDEVICEINSTANCE_DX3A;
   type LPCDIDEVICEINSTANCE_DX3A is access constant DIDEVICEINSTANCE_DX3A;
   subtype DIDEVICEINSTANCE_DX3 is DIDEVICEINSTANCE_DX3A;
   subtype LPDIDEVICEINSTANCE_DX3 is LPDIDEVICEINSTANCE_DX3A;
    
   --Line:1238
   type DIDEVICEINSTANCE_DX3W is record
      dwSize         :DWORD;
      guidInstance   :GUID;
      guidProduct    :GUID;
      dwDevType      :DWORD;
      tszInstanceName:WCHAR_ARRAY(0..259);
      tszProductName :WCHAR_ARRAY(0..259);
   end record;
   type LPDIDEVICEINSTANCE_DX3W is access all DIDEVICEINSTANCE_DX3W;

   --Line:1258
   type DIDEVICEINSTANCEA is record
      dwSize         :DWORD;
      guidInstance   :GUID;
      guidProduct    :GUID;
      dwDevType      :DWORD;
      tszInstanceName:CHAR_ARRAY(0..259);
      tszProductName :CHAR_ARRAY(0..259);
      --if Version>=16#0500#,default set true
      guidFFDriver:GUID;
      wUsagePage:WORD;
      wUsage:WORD;
   end record;
   type LPDIDEVICEINSTANCEA    is access all DIDEVICEINSTANCEA;
   type LPCDIDEVICEINSTANCEA   is access constant DIDEVICEINSTANCEA;
   subtype DIDEVICEINSTANCE    is DIDEVICEINSTANCEA;
   subtype LPDIDEVICEINSTANCE  is LPDIDEVICEINSTANCEA;
   subtype LPCDIDEVICEINSTANCE is LPCDIDEVICEINSTANCEA;
    
   --Line:1271
   type DIDEVICEINSTANCEW is record
      dwSize         :DWORD;
      guidInstance   :GUID;
      guidProduct    :GUID;
      dwDevType      :DWORD;
      tszInstanceName:WCHAR_ARRAY(0..259);
      tszProductName :WCHAR_ARRAY(0..259);
      --if Version>=16#0500#,default set true
      guidFFDriver:GUID;
      wUsagePage:WORD;
      wUsage:WORD;
   end record;
   type LPDIDEVICEINSTANCEW  is access all DIDEVICEINSTANCEW;
   type LPCDIDEVICEINSTANCEW is access constant DIDEVICEINSTANCEW;
    
   -----------------------------------
   -- INTERFACE IDirectInputDeviceW --
   -----------------------------------
   type IDirectInputDeviceW;
   type IDirectInputDeviceW_vtbl;
   type LPIDirectInputDeviceW is Access all IDirectInputDeviceW;
   subtype LPDIRECTINPUTDEVICEW is LPIDIRECTINPUTDEVICEW;
   type LPCIDirectInputDeviceW is access constant IDirectInputDeviceW;
   subtype LPCDirectInputDeviceW is LPCIDirectInputDeviceW;
    
    
   type af_IDirectInputDeviceW_QueryInterface is access procedure
     (THIS:ACCESS IDirectInputDeviceW;
      RIID:win32.objbase.REFIID;
      ppVObj:ACCESS pVoid
     );
   pragma convention(STDCALL,af_IDirectInputDeviceW_QueryInterface);
    
   type af_IDirectInputDeviceW_AddRef is access function
     (THIS:ACCESS IDirectInputDeviceW) RETURN ULong;
   pragma convention(STDCALL,af_IDirectInputDeviceW_AddRef);
    
   type af_IDirectInputDeviceW_Release is access function
     (THIS:ACCESS IDirectInputDeviceW) return ULONG;
   pragma convention(STDCALL,af_IDirectInputDeviceW_Release);
    
   type af_IDirectInputDeviceW_GetCapabilities is access procedure
     (THIS:access IDirectInputDeviceW;
      pDIDevCaps:LPDIDEVCAPS);
   pragma convention(STDCALL,af_IDirectInputDeviceW_GetCapabilities);
    
   type af_IDirectInputDeviceW_EnumObjects is access procedure
     (THIS:ACCESS IDirectInputDeviceW;
      EDCB:LPDIENUMDEVICEOBJECTSCALLBACKW;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDeviceW_EnumObjects);
    
   type af_IDirectInputDeviceW_GetProperty is access procedure
     (THIS:ACCESS IDirectInputDeviceW;
      IID:WIN32.OBJBASE.REFGUID;
      PH:LPDIPROPHEADER);
   pragma convention(STDCALL,af_IDirectInputDeviceW_GetProperty);
    
   type af_IDirectInputDeviceW_SetProperty is access procedure
     (THIS:ACCESS IDirectInputDeviceW;
      iid:WIN32.OBJBASE.REFGUID;
      PH:LPCDIPROPHEADER
     );
   pragma convention(STDCALL,af_IDirectInputDeviceW_SetProperty);
    
   type af_IDirectInputDeviceW_Acquire is access procedure
     (THIS:ACCESS IDirectInputDeviceW);
   pragma convention(STDCALL,af_IDirectInputDeviceW_Acquire);
    
   type af_IDirectInputDeviceW_Unacquire is access procedure
     (THIS:ACCESS IDirectInputDeviceW);
   pragma convention(STDCALL,af_IDirectInputDeviceW_Unacquire);
    
   type af_IDirectInputDeviceW_GetDeviceState is access procedure
     (THIS:ACCESS IDirectInputDeviceW;
      DW:DWORD;
      ADDR:LPVOID
     );
   pragma convention(STDCALL,af_IDirectInputDeviceW_GetDeviceState);
    
   type af_IDirectInputDeviceW_GetDeviceData is access procedure
     (THIS:access IDirectInputDeviceW;
      DW:DWORD;
      DOD:LPDIDEVICEOBJECTDATA;
      PDW:LPDWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDeviceW_GetDeviceData);
    
   type af_IDirectInputDeviceW_SetDataFormat is access procedure
     (THIS:ACCESS IDirectInputDeviceW;DF:LPCDIDATAFORMAT);
   pragma convention(STDCALL,af_IDirectInputDeviceW_SetDataFormat);
    
   type af_IDirectInputDeviceW_SetEventNotification is access procedure
     (THIS:ACCESS IDirectInputDeviceW;
      H:WIN32.WINNT.Handle
     );
   pragma convention(STDCALL,af_IDirectInputDeviceW_SetEventNotification);
    
   type af_IDirectInputDeviceW_SetCooperativeLevel is access procedure
     (THIS:ACCESS IDirectInputDeviceW;
      hw:win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDeviceW_SetCooperativeLevel);
    
   type af_IDirectInputDeviceW_GetObjectInfo is access procedure
     (THIS:ACCESS IDirectInputDeviceW;
      DOI:LPDIDEVICEOBJECTINSTANCEW;
      DW:DWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDeviceW_GetObjectInfo);
    
   type af_IDirectInputDeviceW_GetDeviceInfo is access procedure
     (THIS:ACCESS IDirectInputDeviceW;
      DI:LPDIDEVICEINSTANCEW
     );
   pragma convention(STDCALL,af_IDirectInputDeviceW_GetDeviceInfo);
    
   type af_IDirectInputDeviceW_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInputDeviceW;HW:win32.windef.HWND;DW:DWORD);
   pragma convention(STDCALL,af_IDirectInputDeviceW_RunControlPanel);
    
   type af_IDirectInputDeviceW_Initialize is access procedure
     (THIS:ACCESS IDirectInputDeviceW;HINST:WIN32.WINDEF.hinstance;dw:DWORD;iid:win32.objbase.REFGUID);
   pragma convention(STDCALL,af_IDirectInputDeviceW_Initialize);
    
   type IDirectInputDeviceW_vtbl is record
      QueryInterface :af_IDirectInputDeviceW_QueryInterface;
      AddRef         :af_IDirectInputDeviceW_AddRef;
      Release        :af_IDirectInputDeviceW_Release;
        
      GetCapabilities:af_IDirectInputDeviceW_GetCapabilities;
      EnumObjects:af_IDirectInputDeviceW_EnumObjects;
      GetProperty:af_IDirectInputDeviceW_GetProperty;
      SetProperty:af_IDirectInputDeviceW_SetProperty;
      Acquire:af_IDirectInputDeviceW_Acquire;
      Unacquire:af_IDirectInputDeviceW_Unacquire;
      GetDeviceState:af_IDirectInputDeviceW_GetDeviceState;
      GetDeviceData:af_IDirectInputDeviceW_GetDeviceData;
      SetDataFormat:af_IDirectInputDeviceW_SetDataFormat;
      SetEventNotification:af_IDirectInputDeviceW_SetEventNotification;
      SetCooperativeLevel:af_IDirectInputDeviceW_SetCooperativeLevel;
      GetObjectInfo:af_IDirectInputDeviceW_GetObjectInfo;
      GetDeviceInfo:af_IDirectInputDeviceW_GetDeviceInfo;
      RunControlPanel:af_IDirectInputDeviceW_RunControlPanel;
      Initialize:af_IDirectInputDeviceW_Initialize;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDeviceW_vtbl);
    
   type LPIDirectInputDeviceW_VTBL is access all IDirectInputDeviceW_VTBL;
    
   --Line:1306
   type IDirectInputDeviceW is record
      lpVTBL:LPIDirectInputDeviceW_VTBL;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDeviceW);
    
   -----------------------------------
   -- INTERFACE IDirectInputDeviceA --
   -----------------------------------
   type IDirectInputDeviceA;
   type IDirectInputDeviceA_vtbl;
   type LPIDirectInputDeviceA is Access all IDirectInputDeviceA;
    
    
    
   type af_IDirectInputDeviceA_QueryInterface is access procedure
     (THIS:ACCESS IDirectInputDeviceA;
      RIID:win32.objbase.REFIID;
      ppVObj:ACCESS pVoid
     );
   pragma convention(STDCALL,af_IDirectInputDeviceA_QueryInterface);
    
   type af_IDirectInputDeviceA_AddRef is access function
     (THIS:ACCESS IDirectInputDeviceA) RETURN ULong;
   pragma convention(STDCALL,af_IDirectInputDeviceA_AddRef);
    
   type af_IDirectInputDeviceA_Release is access function
     (THIS:ACCESS IDirectInputDeviceA) return ULONG;
   pragma convention(STDCALL,af_IDirectInputDeviceA_Release);
    
   type af_IDirectInputDeviceA_GetCapabilities is access procedure
     (THIS:access IDirectInputDeviceA;
      pDIDevCaps:LPDIDEVCAPS);
   pragma convention(STDCALL,af_IDirectInputDeviceA_GetCapabilities);
    
   type af_IDirectInputDeviceA_EnumObjects is access procedure
     (THIS:ACCESS IDirectInputDeviceA;
      EDCB:LPDIENUMDEVICEOBJECTSCALLBACKA;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDeviceA_EnumObjects);
    
   type af_IDirectInputDeviceA_GetProperty is access procedure
     (THIS:ACCESS IDirectInputDeviceA;
      IID:WIN32.OBJBASE.REFGUID;
      PH:LPDIPROPHEADER);
   pragma convention(STDCALL,af_IDirectInputDeviceA_GetProperty);
    
   type af_IDirectInputDeviceA_SetProperty is access procedure
     (THIS:ACCESS IDirectInputDeviceA;
      iid:WIN32.OBJBASE.REFGUID;
      PH:LPCDIPROPHEADER
     );
   pragma convention(STDCALL,af_IDirectInputDeviceA_SetProperty);
    
   type af_IDirectInputDeviceA_Acquire is access procedure
     (THIS:ACCESS IDirectInputDeviceA);
   pragma convention(STDCALL,af_IDirectInputDeviceA_Acquire);
    
   type af_IDirectInputDeviceA_Unacquire is access procedure
     (THIS:ACCESS IDirectInputDeviceA);
   pragma convention(STDCALL,af_IDirectInputDeviceA_Unacquire);
    
   type af_IDirectInputDeviceA_GetDeviceState is access procedure
     (THIS:ACCESS IDirectInputDeviceA;
      DW:DWORD;
      ADDR:LPVOID
     );
   pragma convention(STDCALL,af_IDirectInputDeviceA_GetDeviceState);
    
   type af_IDirectInputDeviceA_GetDeviceData is access procedure
     (THIS:access IDirectInputDeviceA;
      DW :DWORD;
      DOD:LPDIDEVICEOBJECTDATA;
      PDW:LPDWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDeviceA_GetDeviceData);
    
   type af_IDirectInputDeviceA_SetDataFormat is access procedure
     (THIS:ACCESS IDirectInputDeviceA;DF:LPCDIDATAFORMAT);
   pragma convention(STDCALL,af_IDirectInputDeviceA_SetDataFormat);
    
   type af_IDirectInputDeviceA_SetEventNotification is access procedure
     (THIS:ACCESS IDirectInputDeviceA;
      H:WIN32.WINNT.Handle
     );
   pragma convention(STDCALL,af_IDirectInputDeviceA_SetEventNotification);
    
   type af_IDirectInputDeviceA_SetCooperativeLevel is access procedure
     (THIS:ACCESS IDirectInputDeviceA;
      hw:win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDeviceA_SetCooperativeLevel);
    
   type af_IDirectInputDeviceA_GetObjectInfo is access procedure
     (THIS:ACCESS IDirectInputDeviceA;
      DOI:LPDIDEVICEOBJECTINSTANCEA;
      DW:DWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDeviceA_GetObjectInfo);
    
   type af_IDirectInputDeviceA_GetDeviceInfo is access procedure
     (THIS:ACCESS IDirectInputDeviceA;
      DI:LPDIDEVICEINSTANCEA
     );
   pragma convention(STDCALL,af_IDirectInputDeviceA_GetDeviceInfo);
    
   type af_IDirectInputDeviceA_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInputDeviceA;HW:win32.windef.HWND;DW:DWORD);
   pragma convention(STDCALL,af_IDirectInputDeviceA_RunControlPanel);
    
   type af_IDirectInputDeviceA_Initialize is access procedure
     (THIS:ACCESS IDirectInputDeviceA;HINST:WIN32.WINDEF.hinstance;dw:DWORD;iid:win32.objbase.REFGUID);
   pragma convention(STDCALL,af_IDirectInputDeviceA_Initialize);
    
   type IDirectInputDeviceA_vtbl is record
      QueryInterface      :af_IDirectInputDeviceA_QueryInterface;
      AddRef              :af_IDirectInputDeviceA_AddRef;
      Release             :af_IDirectInputDeviceA_Release;
        
      GetCapabilities     :af_IDirectInputDeviceA_GetCapabilities;
      EnumObjects         :af_IDirectInputDeviceA_EnumObjects;
      GetProperty         :af_IDirectInputDeviceA_GetProperty;
      SetProperty         :af_IDirectInputDeviceA_SetProperty;
      Acquire             :af_IDirectInputDeviceA_Acquire;
      Unacquire           :af_IDirectInputDeviceA_Unacquire;
      GetDeviceState      :af_IDirectInputDeviceA_GetDeviceState;
      GetDeviceData       :af_IDirectInputDeviceA_GetDeviceData;
      SetDataFormat       :af_IDirectInputDeviceA_SetDataFormat;
      SetEventNotification:af_IDirectInputDeviceA_SetEventNotification;
      SetCooperativeLevel :af_IDirectInputDeviceA_SetCooperativeLevel;
      GetObjectInfo       :af_IDirectInputDeviceA_GetObjectInfo;
      GetDeviceInfo       :af_IDirectInputDeviceA_GetDeviceInfo;
      RunControlPanel     :af_IDirectInputDeviceA_RunControlPanel;
      Initialize          :af_IDirectInputDeviceA_Initialize;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDeviceA_vtbl);
    
   type LPIDirectInputDeviceA_VTBL is access all IDirectInputDeviceA_VTBL;
    
   --Line:1306
   type IDirectInputDeviceA is record
      lpVTBL:LPIDirectInputDeviceA_VTBL;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDeviceA);
    
   subtype IDirectInputDevice is IDirectInputDeviceA;
   subtype IDirectInputDevice_vtbl is IDirectInputDeviceA_vtbl;
   subtype LPIDirectInputDevice is LPIDirectInputDeviceA;
    
   IID_IDirectInputDevice:constant GUID:=IID_IDirectInputDeviceA;
    
   --#if(DIRECTINPUT_VERSION >= 0x0500)
   --Line:1419..1437
   DISFFC_RESET            :constant:=16#00000001#;
   DISFFC_STOPALL          :constant:=16#00000002#;
   DISFFC_PAUSE            :constant:=16#00000004#;
   DISFFC_CONTINUE         :constant:=16#00000008#;
   DISFFC_SETACTUATORSON   :constant:=16#00000010#;
   DISFFC_SETACTUATORSOFF  :constant:=16#00000020#;

   DIGFFS_EMPTY            :constant:=16#00000001#;
   DIGFFS_STOPPED          :constant:=16#00000002#;
   DIGFFS_PAUSED           :constant:=16#00000004#;
   DIGFFS_ACTUATORSON      :constant:=16#00000010#;
   DIGFFS_ACTUATORSOFF     :constant:=16#00000020#;
   DIGFFS_POWERON          :constant:=16#00000040#;
   DIGFFS_POWEROFF         :constant:=16#00000080#;
   DIGFFS_SAFETYSWITCHON   :constant:=16#00000100#;
   DIGFFS_SAFETYSWITCHOFF  :constant:=16#00000200#;
   DIGFFS_USERFFSWITCHON   :constant:=16#00000400#;
   DIGFFS_USERFFSWITCHOFF  :constant:=16#00000800#;
   DIGFFS_DEVICELOST       :constant:=16#80000000#;
    
   --Line:1441
   type DIEFFECTINFOA is record
      dwSize:DWORD;
      gid:GUID;
      dwEffType:DWORD;
      dwStaticParams:DWORD;
      dwDynamicParams:DWORD;
      tszName:CHAR_ARRAY(0..259);
   end record;
   pragma convention(C_PASS_BY_COPY,DIEFFECTINFOA);
    
   type LPDIEFFECTINFOA is access all DIEFFECTINFOA;
   type LPCDIEFFECTINFOA is access constant DIEFFECTINFOA;
    
   subtype DIEFFECTINFO is DIEFFECTINFOA;
   subtype LPDIEFFECTINFO is LPDIEFFECTINFOA;
   subtype LPCDIEFFECTINFO is LPCDIEFFECTINFOA;
    
   --Line:1449
   type DIEFFECTINFOW is record
      dwSize:DWORD;
      gid:GUID;
      dwEffType:DWORD;
      dwStaticParams:DWORD;
      dwDynamicParams:DWORD;
      tszName:WCHAR_ARRAY(0..259);
   end record;
   pragma convention(C_PASS_BY_COPY,DIEFFECTINFOW);
    
   type LPDIEFFECTINFOW is access all DIEFFECTINFOW;
   type LPCDIEFFECTINFOW is access constant DIEFFECTINFOW;
    
   --Line:1648
   DISDD_CONTINUE    :constant:=      16#00000001#;
    
   --Line:1470..1471
   type LPDIENUMEFFECTSCALLBACKA is access function
     (ei:LPCDIEFFECTINFOA;addr:LPVOID)return win32.BOOL;
   pragma convention(STDCALL,LPDIENUMEFFECTSCALLBACKA);
    
   subtype LPDIENUMEFFECTSCALLBACK is LPDIENUMEFFECTSCALLBACKA;
    
   type LPDIENUMEFFECTSCALLBACKW is access function
     (ei:LPCDIEFFECTINFOW;addr:LPVOID)return win32.BOOL;
   pragma convention(STDCALL,LPDIENUMEFFECTSCALLBACKW);
    
   subtype LPDIRECTINPUTEFFECT is LPIDIRECTINPUTEFFECT;
   --Line:1477
   type LPDIENUMCREATEDEFFECTOBJECTSCALLBACK is access function
     (die:LPDIRECTINPUTEFFECT;addr:LPVOID)return win32.BOOL;
   pragma convention(STDCALL,LPDIENUMCREATEDEFFECTOBJECTSCALLBACK);
    
   -------------------------------------
   -- INTERFACE IDirectInputDevice2W  --
   -------------------------------------
    
   type IDirectInputDevice2W;
   type IDirectInputDevice2W_vtbl;
   type LPIDirectInputDevice2W is Access all IDirectInputDevice2W;
    
    
    
   type af_IDirectInputDevice2W_QueryInterface is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      RIID:win32.objbase.REFIID;
      ppVObj:ACCESS pVoid
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_QueryInterface);
    
   type af_IDirectInputDevice2W_AddRef is access function
     (THIS:ACCESS IDirectInputDevice2W) RETURN ULong;
   pragma convention(STDCALL,af_IDirectInputDevice2W_AddRef);
    
   type af_IDirectInputDevice2W_Release is access function
     (THIS:ACCESS IDirectInputDevice2W) return ULONG;
   pragma convention(STDCALL,af_IDirectInputDevice2W_Release);
    
   type af_IDirectInputDevice2W_GetCapabilities is access procedure
     (THIS:access IDirectInputDevice2W;
      pDIDevCaps:LPDIDEVCAPS);
   pragma convention(STDCALL,af_IDirectInputDevice2W_GetCapabilities);
    
   type af_IDirectInputDevice2W_EnumObjects is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      EDCB:LPDIENUMDEVICEOBJECTSCALLBACKW;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_EnumObjects);
    
   type af_IDirectInputDevice2W_GetProperty is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      IID:WIN32.OBJBASE.REFGUID;
      PH:LPDIPROPHEADER);
   pragma convention(STDCALL,af_IDirectInputDevice2W_GetProperty);
    
   type af_IDirectInputDevice2W_SetProperty is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      iid:WIN32.OBJBASE.REFGUID;
      PH:LPDIPROPHEADER
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_SetProperty);
    
   type af_IDirectInputDevice2W_Acquire is access procedure
     (THIS:ACCESS IDirectInputDevice2W);
   pragma convention(STDCALL,af_IDirectInputDevice2W_Acquire);
    
   type af_IDirectInputDevice2W_Unacquire is access procedure
     (THIS:ACCESS IDirectInputDevice2W);
   pragma convention(STDCALL,af_IDirectInputDevice2W_Unacquire);
    
   type af_IDirectInputDevice2W_GetDeviceState is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      DW:DWORD;
      ADDR:LPVOID
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_GetDeviceState);
    
   type af_IDirectInputDevice2W_GetDeviceData is access procedure
     (THIS:access IDirectInputDevice2W;
      DW:DWORD;
      DOD:LPDIDEVICEOBJECTDATA;
      PDW:LPDWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_GetDeviceData);
    
   type af_IDirectInputDevice2W_SetDataFormat is access procedure
     (THIS:ACCESS IDirectInputDevice2W;DF:LPCDIDATAFORMAT);
   pragma convention(STDCALL,af_IDirectInputDevice2W_SetDataFormat);
    
   type af_IDirectInputDevice2W_SetEventNotification is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      H:WIN32.WINNT.Handle
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_SetEventNotification);
    
   type af_IDirectInputDevice2W_SetCooperativeLevel is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      hw:win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_SetCooperativeLevel);
    
   type af_IDirectInputDevice2W_GetObjectInfo is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      DOI:LPDIDEVICEOBJECTINSTANCEW;
      DW:DWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_GetObjectInfo);
    
   type af_IDirectInputDevice2W_GetDeviceInfo is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      DI:LPDIDEVICEINSTANCEW
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_GetDeviceInfo);
    
   type af_IDirectInputDevice2W_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInputDevice2W;HW:win32.windef.HWND;DW:DWORD);
   pragma convention(STDCALL,af_IDirectInputDevice2W_RunControlPanel);
    
   type af_IDirectInputDevice2W_Initialize is access procedure
     (THIS:ACCESS IDirectInputDevice2W;HINST:WIN32.WINDEF.hinstance;dw:DWORD;iid:win32.objbase.REFGUID);
   pragma convention(STDCALL,af_IDirectInputDevice2W_Initialize);
    
   ---IDirectInputDevice2W methods---
   type af_IDirectInputDevice2W_CreateEffect is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      IID:WIN32.OBJBASE.REFGUID;
      EF:LPCDIEFFECT;
      PPIE:ACCESS LPDIRECTINPUTEFFECT;
      IU:access WIN32.OBJBASE.IUNKNOWN     --?POINTER OR A IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_CreateEffect);
    
   type af_IDirectInputDevice2W_EnumEffects is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      ecb:LPDIENUMEFFECTSCALLBACKW;
      addr:LPVOID;
      dw:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_EnumEffects);
    
   type af_IDirectInputDevice2W_GetEffectInfo is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      EI:LPDIEFFECTINFOW;
      IID:WIN32.OBJBASE.REFGUID
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_GetEffectInfo);
    
   type af_IDirectInputDevice2W_GetForceFeedbackState is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      pdw:LPDWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_GetForceFeedbackState);
    
   type af_IDirectInputDevice2W_SendForceFeedbackCommand is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      dw:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_SendForceFeedbackCommand);
    
   type af_IDirectInputDevice2W_EnumCreatedEffectObjects is access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      EEOCB:LPDIENUMCREATEDEFFECTOBJECTSCALLBACK;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_EnumCreatedEffectObjects);
    
   type af_IDirectInputDevice2W_Escape IS access procedure
     (THIS:ACCESS IDirectInputDevice2W;
      EE:LPDIEFFESCAPE
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_Escape);
    
   type af_IDirectInputDevice2W_Poll IS ACCESS PROCEDURE
     (THIS:ACCESS IDirectInputDevice2W);
   pragma convention(STDCALL,af_IDirectInputDevice2W_Poll);
    
   type af_IDirectInputDevice2W_SendDeviceData IS ACCESS PROCEDURE
     (THIS:ACCESS IDirectInputDevice2W;
      dw:DWORD;
      DOD:LPCDIDEVICEOBJECTDATA; 
      PDW:LPDWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2W_SendDeviceData);
    
    
   type IDirectInputDevice2W_vtbl is record
      --IUNKNOWN METHODS--
      QueryInterface          :af_IDirectInputDevice2W_QueryInterface;
      AddRef                  :af_IDirectInputDevice2W_AddRef;
      Release                 :af_IDirectInputDevice2W_Release;
      --IDirectInputDeviceW methods--
      GetCapabilities         :af_IDirectInputDevice2W_GetCapabilities;
      EnumObjects             :af_IDirectInputDevice2W_EnumObjects;
      GetProperty             :af_IDirectInputDevice2W_GetProperty;
      SetProperty             :af_IDirectInputDevice2W_SetProperty;
      Acquire                 :af_IDirectInputDevice2W_Acquire;
      Unacquire               :af_IDirectInputDevice2W_Unacquire;
      GetDeviceState          :af_IDirectInputDevice2W_GetDeviceState;
      GetDeviceData           :af_IDirectInputDevice2W_GetDeviceData;
      SetDataFormat           :af_IDirectInputDevice2W_SetDataFormat;
      SetEventNotification    :af_IDirectInputDevice2W_SetEventNotification;
      SetCooperativeLevel     :af_IDirectInputDevice2W_SetCooperativeLevel;
      GetObjectInfo           :af_IDirectInputDevice2W_GetObjectInfo;
      GetDeviceInfo           :af_IDirectInputDevice2W_GetDeviceInfo;
      RunControlPanel         :af_IDirectInputDevice2W_RunControlPanel;
      Initialize              :af_IDirectInputDevice2W_Initialize;
      --IDirectInputDevice2W methods--
      CreateEffect            :af_IDirectInputDevice2W_CreateEffect;
      EnumEffects             :af_IDirectInputDevice2W_EnumEffects;
      GetEffectInfo           :af_IDirectInputDevice2W_GetEffectInfo;
      GetForceFeedbackState   :af_IDirectInputDevice2W_GetForceFeedbackState;
      SendForceFeedbackCommand:af_IDirectInputDevice2W_SendForceFeedbackCommand;
      EnumCreatedEffectObjects:af_IDirectInputDevice2W_EnumCreatedEffectObjects;
      Escape                  :af_IDirectInputDevice2W_Escape;
      Poll                    :af_IDirectInputDevice2W_Poll;
      SendDeviceData:af_IDirectInputDevice2W_SendDeviceData;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDevice2W_vtbl);
    
   type LPIDirectInputDevice2W_VTBL is access all IDirectInputDevice2W_VTBL;
    
   --Line:1306
   type IDirectInputDevice2W is record
      lpVTBL:LPIDirectInputDevice2W_VTBL;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDevice2W);
    
    
   -------------------------------------
   -- INTERFACE IDirectInputDevice2A  --
   -------------------------------------
    
   type IDirectInputDevice2A;
   type IDirectInputDevice2A_vtbl;
   type LPIDirectInputDevice2A is Access all IDirectInputDevice2A;
    
    
    
   type af_IDirectInputDevice2A_QueryInterface is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      RIID:win32.objbase.REFIID;
      ppVObj:ACCESS pVoid
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_QueryInterface);
    
   type af_IDirectInputDevice2A_AddRef is access function
     (THIS:ACCESS IDirectInputDevice2A) RETURN ULong;
   pragma convention(STDCALL,af_IDirectInputDevice2A_AddRef);
    
   type af_IDirectInputDevice2A_Release is access function
     (THIS:ACCESS IDirectInputDevice2A) return ULONG;
   pragma convention(STDCALL,af_IDirectInputDevice2A_Release);
    
   ---------------
   type af_IDirectInputDevice2A_GetCapabilities is access procedure
     (THIS:access IDirectInputDevice2A;
      pDIDevCaps:LPDIDEVCAPS);
   pragma convention(STDCALL,af_IDirectInputDevice2A_GetCapabilities);
    
   type af_IDirectInputDevice2A_EnumObjects is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      EDCB:LPDIENUMDEVICEOBJECTSCALLBACKA;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_EnumObjects);
    
   type af_IDirectInputDevice2A_GetProperty is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      IID:WIN32.OBJBASE.REFGUID;
      PH:LPDIPROPHEADER);
   pragma convention(STDCALL,af_IDirectInputDevice2A_GetProperty);
    
   type af_IDirectInputDevice2A_SetProperty is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      iid:WIN32.OBJBASE.REFGUID;
      PH:LPDIPROPHEADER
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_SetProperty);
    
   type af_IDirectInputDevice2A_Acquire is access procedure
     (THIS:ACCESS IDirectInputDevice2A);
   pragma convention(STDCALL,af_IDirectInputDevice2A_Acquire);
    
   type af_IDirectInputDevice2A_Unacquire is access procedure
     (THIS:ACCESS IDirectInputDevice2A);
   pragma convention(STDCALL,af_IDirectInputDevice2A_Unacquire);
    
   type af_IDirectInputDevice2A_GetDeviceState is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      DW:DWORD;
      ADDR:LPVOID
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_GetDeviceState);
    
   type af_IDirectInputDevice2A_GetDeviceData is access procedure
     (THIS:access IDirectInputDevice2A;
      DW:DWORD;
      DOD:LPDIDEVICEOBJECTDATA;
      PDW:LPDWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_GetDeviceData);
    
   type af_IDirectInputDevice2A_SetDataFormat is access procedure
     (THIS:ACCESS IDirectInputDevice2A;DF:LPCDIDATAFORMAT);
   pragma convention(STDCALL,af_IDirectInputDevice2A_SetDataFormat);
    
   type af_IDirectInputDevice2A_SetEventNotification is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      H:WIN32.WINNT.Handle
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_SetEventNotification);
    
   type af_IDirectInputDevice2A_SetCooperativeLevel is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      hw:win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_SetCooperativeLevel);
    
   type af_IDirectInputDevice2A_GetObjectInfo is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      DOI:LPDIDEVICEOBJECTINSTANCEA;
      DW:DWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_GetObjectInfo);
    
   type af_IDirectInputDevice2A_GetDeviceInfo is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      DI:LPDIDEVICEINSTANCEA
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_GetDeviceInfo);
    
   type af_IDirectInputDevice2A_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInputDevice2A;HW:win32.windef.HWND;DW:DWORD);
   pragma convention(STDCALL,af_IDirectInputDevice2A_RunControlPanel);
    
   type af_IDirectInputDevice2A_Initialize is access procedure
     (THIS:ACCESS IDirectInputDevice2A;HINST:WIN32.WINDEF.hinstance;dw:DWORD;iid:win32.objbase.REFGUID);
   pragma convention(STDCALL,af_IDirectInputDevice2A_Initialize);
    
   ---IDirectInputDevice2A methods---
   type af_IDirectInputDevice2A_CreateEffect is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      IID:WIN32.OBJBASE.REFGUID;
      EF:LPCDIEFFECT;
      PPIE:ACCESS LPDIRECTINPUTEFFECT;
      IU:access WIN32.OBJBASE.IUNKNOWN     --?POINTER OR A IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_CreateEffect);
    
   type af_IDirectInputDevice2A_EnumEffects is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      ecb:LPDIENUMEFFECTSCALLBACKA;
      addr:LPVOID;
      dw:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_EnumEffects);
    
   type af_IDirectInputDevice2A_GetEffectInfo is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      EI:LPDIEFFECTINFOA;
      IID:WIN32.OBJBASE.REFGUID
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_GetEffectInfo);
    
   type af_IDirectInputDevice2A_GetForceFeedbackState is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      pdw:LPDWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_GetForceFeedbackState);
    
   type af_IDirectInputDevice2A_SendForceFeedbackCommand is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      dw:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_SendForceFeedbackCommand);
    
   type af_IDirectInputDevice2A_EnumCreatedEffectObjects is access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      EEOCB:LPDIENUMCREATEDEFFECTOBJECTSCALLBACK;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_EnumCreatedEffectObjects);
    
   type af_IDirectInputDevice2A_Escape IS access procedure
     (THIS:ACCESS IDirectInputDevice2A;
      EE:LPDIEFFESCAPE
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_Escape);
    
   type af_IDirectInputDevice2A_Poll IS ACCESS PROCEDURE
     (THIS:ACCESS IDirectInputDevice2A);
   pragma convention(STDCALL,af_IDirectInputDevice2A_Poll);
    
   type af_IDirectInputDevice2A_SendDeviceData IS ACCESS PROCEDURE
     (THIS:ACCESS IDirectInputDevice2A;
      dw:DWORD;
      DOD:LPCDIDEVICEOBJECTDATA; 
      PDW:LPDWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice2A_SendDeviceData);
    
    
   type IDirectInputDevice2A_vtbl is record
      --IUNKNOWN METHODS--
      QueryInterface :af_IDirectInputDevice2A_QueryInterface;
      AddRef         :af_IDirectInputDevice2A_AddRef;
      Release        :af_IDirectInputDevice2A_Release;
      --IDirectInputDeviceA methods--
      GetCapabilities:af_IDirectInputDevice2A_GetCapabilities;
      EnumObjects:af_IDirectInputDevice2A_EnumObjects;
      GetProperty:af_IDirectInputDevice2A_GetProperty;
      SetProperty:af_IDirectInputDevice2A_SetProperty;
      Acquire:af_IDirectInputDevice2A_Acquire;
      Unacquire:af_IDirectInputDevice2A_Unacquire;
      GetDeviceState:af_IDirectInputDevice2A_GetDeviceState;
      GetDeviceData:af_IDirectInputDevice2A_GetDeviceData;
      SetDataFormat:af_IDirectInputDevice2A_SetDataFormat;
      SetEventNotification:af_IDirectInputDevice2A_SetEventNotification;
      SetCooperativeLevel:af_IDirectInputDevice2A_SetCooperativeLevel;
      GetObjectInfo:af_IDirectInputDevice2A_GetObjectInfo;
      GetDeviceInfo:af_IDirectInputDevice2A_GetDeviceInfo;
      RunControlPanel:af_IDirectInputDevice2A_RunControlPanel;
      Initialize:af_IDirectInputDevice2A_Initialize;
      --IDirectInputDevice2A methods--
      CreateEffect:af_IDirectInputDevice2A_CreateEffect;
      EnumEffects:af_IDirectInputDevice2A_EnumEffects;
      GetEffectInfo:af_IDirectInputDevice2A_GetEffectInfo;
      GetForceFeedbackState:af_IDirectInputDevice2A_GetForceFeedbackState;
      SendForceFeedbackCommand:af_IDirectInputDevice2A_SendForceFeedbackCommand;
      EnumCreatedEffectObjects:af_IDirectInputDevice2A_EnumCreatedEffectObjects;
      Escape:af_IDirectInputDevice2A_Escape;
      Poll:af_IDirectInputDevice2A_Poll;
      SendDeviceData:af_IDirectInputDevice2A_SendDeviceData;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDevice2A_vtbl);
    
   type LPIDirectInputDevice2A_VTBL is access all IDirectInputDevice2A_VTBL;
    
   --Line:1306
   type IDirectInputDevice2A is record
      lpVTBL:LPIDirectInputDevice2A_VTBL;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDevice2A);
    
    
   subtype LPIDirectInputDevice2 is LPIDirectInputDevice2A;
   subtype IDirectInputDevice2 is IDirectInputDevice2A;
   subtype LPDirectInputDevice2 is LPIDirectInputDevice2A;
   type LPCIDirectInputDevice2A is access constant IDirectInputDevice2A;
   subtype LPCIDirectInputDevice2 is LPCIDirectInputDevice2A;
   subtype LPCDirectInputDevice2 is LPCIDirectInputDevice2A;
    
   --Line:1635..1637
   DIFEF_DEFAULT            :constant:=16#00000000#;
   DIFEF_INCLUDENONSTANDARD :constant:=16#00000001#;
   DIFEF_MODIFYIFNEEDED     :constant:=16#00000010#;
    
   -----------------------------------------
   --   INTERFACE IDirectInputDevice7A  ----
   -----------------------------------------
   type IDirectInputDevice7A;
   type LPIDirectInputDevice7A is access all IDirectInputDevice7A;
   subtype LPDirectInputDevice7A is LPIDirectInputDevice7A;
   subtype IDirectInputDevice7 is IDirectInputDevice7A;
   type LPCIDirectInputDevice7A is access constant IDirectInputDevice7A;
   subtype LPCIDirectInputDevice7 is LPCIDirectInputDevice7A;
   subtype LPCDirectInputDevice7 is LPCIDirectInputDevice7;
    
   --  IUNKNOWN METHODS  --
   type af_IDirectInputDevice7A_QueryInterface is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      IID :WIN32.OBJBASE.REFGUID;
      ppVObj:access LPVOID
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_QueryInterface);
    
   type af_IDirectInputDevice7A_AddRef is access function
     (THIS:ACCESS IDirectInputDevice7A)RETURN ULONG;
   pragma convention(STDCALL,af_IDirectInputDevice7A_AddRef);
    
   type af_IDirectInputDevice7A_Release is access function
     (THIS:ACCESS IDirectInputDevice7A)RETURN ULONG;
   pragma convention(STDCALL,af_IDirectInputDevice7A_Release);
    
   --IDirectInputDeviceA methods--
   type af_IDirectInputDevice7A_GetCapabilities is access procedure
     (THIS:access IDirectInputDevice7A;
      pDIDevCaps:LPDIDEVCAPS);
   pragma convention(STDCALL,af_IDirectInputDevice7A_GetCapabilities);
    
   type af_IDirectInputDevice7A_EnumObjects is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      EDCB:LPDIENUMDEVICEOBJECTSCALLBACKA;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_EnumObjects);
    
   type af_IDirectInputDevice7A_GetProperty is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      IID:WIN32.OBJBASE.REFGUID;
      PH:LPDIPROPHEADER);
   pragma convention(STDCALL,af_IDirectInputDevice7A_GetProperty);
    
   type af_IDirectInputDevice7A_SetProperty is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      iid:WIN32.OBJBASE.REFGUID;
      PH:LPDIPROPHEADER
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_SetProperty);
    
   type af_IDirectInputDevice7A_Acquire is access procedure
     (THIS:ACCESS IDirectInputDevice7A);
   pragma convention(STDCALL,af_IDirectInputDevice7A_Acquire);
    
   type af_IDirectInputDevice7A_Unacquire is access procedure
     (THIS:ACCESS IDirectInputDevice7A);
   pragma convention(STDCALL,af_IDirectInputDevice7A_Unacquire);
    
   type af_IDirectInputDevice7A_GetDeviceState is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      DW:DWORD;
      ADDR:LPVOID
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_GetDeviceState);
    
   type af_IDirectInputDevice7A_GetDeviceData is access procedure
     (THIS:access IDirectInputDevice7A;
      DW:DWORD;
      DOD:LPDIDEVICEOBJECTDATA;
      PDW:LPDWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_GetDeviceData);
    
   type af_IDirectInputDevice7A_SetDataFormat is access procedure
     (THIS:ACCESS IDirectInputDevice7A;DF:LPCDIDATAFORMAT);
   pragma convention(STDCALL,af_IDirectInputDevice7A_SetDataFormat);
    
   type af_IDirectInputDevice7A_SetEventNotification is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      H:WIN32.WINNT.Handle
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_SetEventNotification);
    
   type af_IDirectInputDevice7A_SetCooperativeLevel is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      hw:win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_SetCooperativeLevel);
    
   type af_IDirectInputDevice7A_GetObjectInfo is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      DOI:LPDIDEVICEOBJECTINSTANCEA;
      DW:DWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_GetObjectInfo);
    
   type af_IDirectInputDevice7A_GetDeviceInfo is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      DI:LPDIDEVICEINSTANCEA
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_GetDeviceInfo);
    
   type af_IDirectInputDevice7A_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInputDevice7A;HW:win32.windef.HWND;DW:DWORD);
   pragma convention(STDCALL,af_IDirectInputDevice7A_RunControlPanel);
    
   type af_IDirectInputDevice7A_Initialize is access procedure
     (THIS:ACCESS IDirectInputDevice7A;HINST:WIN32.WINDEF.hinstance;dw:DWORD;iid:win32.objbase.REFGUID);
   pragma convention(STDCALL,af_IDirectInputDevice7A_Initialize);
    
   ---IDirectInputDevice2A methods---
   type af_IDirectInputDevice7A_CreateEffect is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      IID:WIN32.OBJBASE.REFGUID;
      EF:LPCDIEFFECT;
      PPIE:ACCESS LPDIRECTINPUTEFFECT;
      IU:access WIN32.OBJBASE.IUNKNOWN     --?POINTER OR A IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_CreateEffect);
    
   type af_IDirectInputDevice7A_EnumEffects is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      ecb:LPDIENUMEFFECTSCALLBACKA;
      addr:LPVOID;
      dw:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_EnumEffects);
    
   type af_IDirectInputDevice7A_GetEffectInfo is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      EI:LPDIEFFECTINFOA;
      IID:WIN32.OBJBASE.REFGUID
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_GetEffectInfo);
    
   type af_IDirectInputDevice7A_GetForceFeedbackState is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      pdw:LPDWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_GetForceFeedbackState);
    
   type af_IDirectInputDevice7A_SendForceFeedbackCommand is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      dw:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_SendForceFeedbackCommand);
    
   type af_IDirectInputDevice7A_EnumCreatedEffectObjects is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      EEOCB:LPDIENUMCREATEDEFFECTOBJECTSCALLBACK;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_EnumCreatedEffectObjects);
    
   type af_IDirectInputDevice7A_Escape IS access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      EE:LPDIEFFESCAPE
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_Escape);
    
   type af_IDirectInputDevice7A_Poll IS ACCESS PROCEDURE
     (THIS:ACCESS IDirectInputDevice7A);
   pragma convention(STDCALL,af_IDirectInputDevice7A_Poll);
    
   type af_IDirectInputDevice7A_SendDeviceData IS ACCESS PROCEDURE
     (THIS:ACCESS IDirectInputDevice7A;
      dw:DWORD;
      DOD:LPCDIDEVICEOBJECTDATA; 
      PDW:LPDWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_SendDeviceData);
    
   -- IDirectInputDevice7A methods --
   type af_IDirectInputDevice7A_EnumEffectsInFile is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      STR:LPCSTR;
      EEIFCB:LPDIENUMEFFECTSINFILECALLBACK;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_EnumEffectsInFile);
    
   type af_IDirectInputDevice7A_WriteEffectToFile is access procedure
     (THIS:ACCESS IDirectInputDevice7A;
      STR :LPCSTR;
      DW  :DWORD;
      FF  :LPDIFILEEFFECT;
      DW2 :DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7A_WriteEffectToFile);
    
   type IDirectInputDevice7A_vtbl is record
      --IUNKNOWN METHODS--
      QueryInterface :af_IDirectInputDevice7A_QueryInterface;
      AddRef         :af_IDirectInputDevice7A_AddRef;
      Release        :af_IDirectInputDevice7A_Release;
      --IDirectInputDeviceA methods--
      GetCapabilities:af_IDirectInputDevice7A_GetCapabilities;
      EnumObjects:af_IDirectInputDevice7A_EnumObjects;
      GetProperty:af_IDirectInputDevice7A_GetProperty;
      SetProperty:af_IDirectInputDevice7A_SetProperty;
      Acquire:af_IDirectInputDevice7A_Acquire;
      Unacquire:af_IDirectInputDevice7A_Unacquire;
      GetDeviceState:af_IDirectInputDevice7A_GetDeviceState;
      GetDeviceData:af_IDirectInputDevice7A_GetDeviceData;
      SetDataFormat:af_IDirectInputDevice7A_SetDataFormat;
      SetEventNotification:af_IDirectInputDevice7A_SetEventNotification;
      SetCooperativeLevel:af_IDirectInputDevice7A_SetCooperativeLevel;
      GetObjectInfo:af_IDirectInputDevice7A_GetObjectInfo;
      GetDeviceInfo:af_IDirectInputDevice7A_GetDeviceInfo;
      RunControlPanel:af_IDirectInputDevice7A_RunControlPanel;
      Initialize:af_IDirectInputDevice7A_Initialize;
      --IDirectInputDevice2A methods--
      CreateEffect:af_IDirectInputDevice7A_CreateEffect;
      EnumEffects:af_IDirectInputDevice7A_EnumEffects;
      GetEffectInfo:af_IDirectInputDevice7A_GetEffectInfo;
      GetForceFeedbackState:af_IDirectInputDevice7A_GetForceFeedbackState;
      SendForceFeedbackCommand:af_IDirectInputDevice7A_SendForceFeedbackCommand;
      EnumCreatedEffectObjects:af_IDirectInputDevice7A_EnumCreatedEffectObjects;
      Escape:af_IDirectInputDevice7A_Escape;
      Poll:af_IDirectInputDevice7A_Poll;
      SendDeviceData:af_IDirectInputDevice7A_SendDeviceData;
      --IDirectInputDevice7A methods--
      EnumEffectsInFile:af_IDirectInputDevice7A_EnumEffectsInFile;
      WriteEffectToFile:af_IDirectInputDevice7A_WriteEffectToFile;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDevice7A_vtbl);
    
   type LPIDirectInputDevice7A_vtbl is access all IDirectInputDevice7A_vtbl;
    
   type IDirectInputDevice7A is record
      lpvtbl:LPIDirectInputDevice7A_vtbl;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDevice7A);
    
   -----------------------------------------
   --   INTERFACE IDirectInputDevice7W  ----
   -----------------------------------------
   type IDirectInputDevice7W;
   type LPIDirectInputDevice7W is access all IDirectInputDevice7W;
   subtype LPDirectInputDevice7W is LPIDirectInputDevice7W;
   type LPCIDirectInputDevice7W is access constant IDirectInputDevice7W;
    
    
   --  IUNKNOWN METHODS  --
   type af_IDirectInputDevice7W_QueryInterface is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      IID :WIN32.OBJBASE.REFGUID;
      ppVObj:access LPVOID
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_QueryInterface);
    
   type af_IDirectInputDevice7W_AddRef is access function
     (THIS:ACCESS IDirectInputDevice7W)RETURN ULONG;
   pragma convention(STDCALL,af_IDirectInputDevice7W_AddRef);
    
   type af_IDirectInputDevice7W_Release is access function
     (THIS:ACCESS IDirectInputDevice7W)RETURN ULONG;
   pragma convention(STDCALL,af_IDirectInputDevice7W_Release);
    
   --IDirectInputDeviceA methods--
   type af_IDirectInputDevice7W_GetCapabilities is access procedure
     (THIS:access IDirectInputDevice7W;
      pDIDevCaps:LPDIDEVCAPS);
   pragma convention(STDCALL,af_IDirectInputDevice7W_GetCapabilities);
    
   type af_IDirectInputDevice7W_EnumObjects is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      EDCB:LPDIENUMDEVICEOBJECTSCALLBACKW;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_EnumObjects);
    
   type af_IDirectInputDevice7W_GetProperty is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      IID:WIN32.OBJBASE.REFGUID;
      PH:LPDIPROPHEADER);
   pragma convention(STDCALL,af_IDirectInputDevice7W_GetProperty);
    
   type af_IDirectInputDevice7W_SetProperty is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      iid:WIN32.OBJBASE.REFGUID;
      PH:LPDIPROPHEADER
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_SetProperty);
    
   type af_IDirectInputDevice7W_Acquire is access procedure
     (THIS:ACCESS IDirectInputDevice7W);
   pragma convention(STDCALL,af_IDirectInputDevice7W_Acquire);
    
   type af_IDirectInputDevice7W_Unacquire is access procedure
     (THIS:ACCESS IDirectInputDevice7W);
   pragma convention(STDCALL,af_IDirectInputDevice7W_Unacquire);
    
   type af_IDirectInputDevice7W_GetDeviceState is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      DW:DWORD;
      ADDR:LPVOID
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_GetDeviceState);
    
   type af_IDirectInputDevice7W_GetDeviceData is access procedure
     (THIS:access IDirectInputDevice7W;
      DW:DWORD;
      DOD:LPDIDEVICEOBJECTDATA;
      PDW:LPDWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_GetDeviceData);
    
   type af_IDirectInputDevice7W_SetDataFormat is access procedure
     (THIS:ACCESS IDirectInputDevice7W;DF:LPCDIDATAFORMAT);
   pragma convention(STDCALL,af_IDirectInputDevice7W_SetDataFormat);
    
   type af_IDirectInputDevice7W_SetEventNotification is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      H:WIN32.WINNT.Handle
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_SetEventNotification);
    
   type af_IDirectInputDevice7W_SetCooperativeLevel is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      hw:win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_SetCooperativeLevel);
    
   type af_IDirectInputDevice7W_GetObjectInfo is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      DOI:LPDIDEVICEOBJECTINSTANCEW;
      DW:DWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_GetObjectInfo);
    
   type af_IDirectInputDevice7W_GetDeviceInfo is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      DI:LPDIDEVICEINSTANCEW
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_GetDeviceInfo);
    
   type af_IDirectInputDevice7W_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInputDevice7W;HW:win32.windef.HWND;DW:DWORD);
   pragma convention(STDCALL,af_IDirectInputDevice7W_RunControlPanel);
    
   type af_IDirectInputDevice7W_Initialize is access procedure
     (THIS:ACCESS IDirectInputDevice7W;HINST:WIN32.WINDEF.hinstance;dw:DWORD;iid:win32.objbase.REFGUID);
   pragma convention(STDCALL,af_IDirectInputDevice7W_Initialize);
    
   ---IDirectInputDevice2A methods---
   type af_IDirectInputDevice7W_CreateEffect is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      IID:WIN32.OBJBASE.REFGUID;
      EF:LPCDIEFFECT;
      PPIE:ACCESS LPDIRECTINPUTEFFECT;
      IU:access WIN32.OBJBASE.IUNKNOWN     --?POINTER OR A IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_CreateEffect);
    
   type af_IDirectInputDevice7W_EnumEffects is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      ecb:LPDIENUMEFFECTSCALLBACKW;
      addr:LPVOID;
      dw:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_EnumEffects);
    
   type af_IDirectInputDevice7W_GetEffectInfo is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      EI:LPDIEFFECTINFOW;
      IID:WIN32.OBJBASE.REFGUID
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_GetEffectInfo);
    
   type af_IDirectInputDevice7W_GetForceFeedbackState is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      pdw:LPDWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_GetForceFeedbackState);
    
   type af_IDirectInputDevice7W_SendForceFeedbackCommand is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      dw:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_SendForceFeedbackCommand);
    
   type af_IDirectInputDevice7W_EnumCreatedEffectObjects is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      EEOCB:LPDIENUMCREATEDEFFECTOBJECTSCALLBACK;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_EnumCreatedEffectObjects);
    
   type af_IDirectInputDevice7W_Escape IS access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      EE:LPDIEFFESCAPE
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_Escape);
    
   type af_IDirectInputDevice7W_Poll IS ACCESS PROCEDURE
     (THIS:ACCESS IDirectInputDevice7W);
   pragma convention(STDCALL,af_IDirectInputDevice7W_Poll);
    
   type af_IDirectInputDevice7W_SendDeviceData IS ACCESS PROCEDURE
     (THIS:ACCESS IDirectInputDevice7W;
      dw:DWORD;
      DOD:LPCDIDEVICEOBJECTDATA; 
      PDW:LPDWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_SendDeviceData);
    
   -- IDirectInputDevice7W methods --
   type af_IDirectInputDevice7W_EnumEffectsInFile is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      STR:LPCWSTR;
      EEIFCB:LPDIENUMEFFECTSINFILECALLBACK;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_EnumEffectsInFile);
    
   type af_IDirectInputDevice7W_WriteEffectToFile is access procedure
     (THIS:ACCESS IDirectInputDevice7W;
      STR :LPCWSTR;
      DW  :DWORD;
      FF  :LPDIFILEEFFECT;
      DW2 :DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice7W_WriteEffectToFile);
    
   type IDirectInputDevice7W_vtbl is record
      --IUNKNOWN METHODS--
      QueryInterface :af_IDirectInputDevice7W_QueryInterface;
      AddRef         :af_IDirectInputDevice7W_AddRef;
      Release        :af_IDirectInputDevice7W_Release;
      --IDirectInputDeviceA methods--
      GetCapabilities:af_IDirectInputDevice7W_GetCapabilities;
      EnumObjects:af_IDirectInputDevice7W_EnumObjects;
      GetProperty:af_IDirectInputDevice7W_GetProperty;
      SetProperty:af_IDirectInputDevice7W_SetProperty;
      Acquire:af_IDirectInputDevice7W_Acquire;
      Unacquire:af_IDirectInputDevice7W_Unacquire;
      GetDeviceState:af_IDirectInputDevice7W_GetDeviceState;
      GetDeviceData:af_IDirectInputDevice7W_GetDeviceData;
      SetDataFormat:af_IDirectInputDevice7W_SetDataFormat;
      SetEventNotification:af_IDirectInputDevice7W_SetEventNotification;
      SetCooperativeLevel:af_IDirectInputDevice7W_SetCooperativeLevel;
      GetObjectInfo:af_IDirectInputDevice7W_GetObjectInfo;
      GetDeviceInfo:af_IDirectInputDevice7W_GetDeviceInfo;
      RunControlPanel:af_IDirectInputDevice7W_RunControlPanel;
      Initialize:af_IDirectInputDevice7W_Initialize;
      --IDirectInputDevice2A methods--
      CreateEffect:af_IDirectInputDevice7W_CreateEffect;
      EnumEffects:af_IDirectInputDevice7W_EnumEffects;
      GetEffectInfo:af_IDirectInputDevice7W_GetEffectInfo;
      GetForceFeedbackState:af_IDirectInputDevice7W_GetForceFeedbackState;
      SendForceFeedbackCommand:af_IDirectInputDevice7W_SendForceFeedbackCommand;
      EnumCreatedEffectObjects:af_IDirectInputDevice7W_EnumCreatedEffectObjects;
      Escape:af_IDirectInputDevice7W_Escape;
      Poll:af_IDirectInputDevice7W_Poll;
      SendDeviceData:af_IDirectInputDevice7W_SendDeviceData;
      --IDirectInputDevice7W methods--
      EnumEffectsInFile:af_IDirectInputDevice7W_EnumEffectsInFile;
      WriteEffectToFile:af_IDirectInputDevice7W_WriteEffectToFile;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDevice7W_vtbl);
    
   type LPIDirectInputDevice7W_vtbl is access all IDirectInputDevice7W_vtbl;
    
   type IDirectInputDevice7W is record
      lpvtbl:LPIDirectInputDevice7W_vtbl;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDevice7W);
    
   ----------------------------------
   --INTERFACE IDirectInputDevice8W--
   ----------------------------------
    
   type IDirectInputDevice8W;
    
    
   --  IUNKNOWN METHODS  --
   type af_IDirectInputDevice8W_QueryInterface is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      IID :WIN32.OBJBASE.REFGUID;
      ppVObj:access LPVOID
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_QueryInterface);
    
   type af_IDirectInputDevice8W_AddRef is access function
     (THIS:ACCESS IDirectInputDevice8W)RETURN ULONG;
   pragma convention(STDCALL,af_IDirectInputDevice8W_AddRef);
    
   type af_IDirectInputDevice8W_Release is access function
     (THIS:ACCESS IDirectInputDevice8W)RETURN ULONG;
   pragma convention(STDCALL,af_IDirectInputDevice8W_Release);
    
   --IDirectInputDeviceA methods--
   type af_IDirectInputDevice8W_GetCapabilities is access procedure
     (THIS:access IDirectInputDevice8W;
      pDIDevCaps:LPDIDEVCAPS);
   pragma convention(STDCALL,af_IDirectInputDevice8W_GetCapabilities);
    
   type af_IDirectInputDevice8W_EnumObjects is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      EDCB:LPDIENUMDEVICEOBJECTSCALLBACKW;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_EnumObjects);
    
   type af_IDirectInputDevice8W_GetProperty is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      IID:WIN32.OBJBASE.REFGUID;
      PH:LPDIPROPHEADER);
   pragma convention(STDCALL,af_IDirectInputDevice8W_GetProperty);
    
   type af_IDirectInputDevice8W_SetProperty is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      iid:WIN32.OBJBASE.REFGUID;
      PH:LPDIPROPHEADER
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_SetProperty);
    
   type af_IDirectInputDevice8W_Acquire is access procedure
     (THIS:ACCESS IDirectInputDevice8W);
   pragma convention(STDCALL,af_IDirectInputDevice8W_Acquire);
    
   type af_IDirectInputDevice8W_Unacquire is access procedure
     (THIS:ACCESS IDirectInputDevice8W);
   pragma convention(STDCALL,af_IDirectInputDevice8W_Unacquire);
    
   type af_IDirectInputDevice8W_GetDeviceState is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      DW:DWORD;
      ADDR:LPVOID
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_GetDeviceState);
    
   type af_IDirectInputDevice8W_GetDeviceData is access procedure
     (THIS:access IDirectInputDevice8W;
      DW:DWORD;
      DOD:LPDIDEVICEOBJECTDATA;
      PDW:LPDWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_GetDeviceData);
    
   type af_IDirectInputDevice8W_SetDataFormat is access procedure
     (THIS:ACCESS IDirectInputDevice8W;DF:LPCDIDATAFORMAT);
   pragma convention(STDCALL,af_IDirectInputDevice8W_SetDataFormat);
    
   type af_IDirectInputDevice8W_SetEventNotification is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      H:WIN32.WINNT.Handle
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_SetEventNotification);
    
   type af_IDirectInputDevice8W_SetCooperativeLevel is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      hw:win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_SetCooperativeLevel);
    
   type af_IDirectInputDevice8W_GetObjectInfo is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      DOI:LPDIDEVICEOBJECTINSTANCEW;
      DW:DWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_GetObjectInfo);
    
   type af_IDirectInputDevice8W_GetDeviceInfo is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      DI:LPDIDEVICEINSTANCEW
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_GetDeviceInfo);
    
   type af_IDirectInputDevice8W_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInputDevice8W;HW:win32.windef.HWND;DW:DWORD);
   pragma convention(STDCALL,af_IDirectInputDevice8W_RunControlPanel);
    
   type af_IDirectInputDevice8W_Initialize is access procedure
     (THIS:ACCESS IDirectInputDevice8W;HINST:WIN32.WINDEF.hinstance;dw:DWORD;iid:win32.objbase.REFGUID);
   pragma convention(STDCALL,af_IDirectInputDevice8W_Initialize);
    
   ---IDirectInputDevice2A methods---
   type af_IDirectInputDevice8W_CreateEffect is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      IID:WIN32.OBJBASE.REFGUID;
      EF:LPCDIEFFECT;
      PPIE:ACCESS LPDIRECTINPUTEFFECT;
      IU:ACCESS WIN32.OBJBASE.IUNKNOWN     --?POINTER OR A IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_CreateEffect);
    
   type af_IDirectInputDevice8W_EnumEffects is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      ecb:LPDIENUMEFFECTSCALLBACKW;
      addr:LPVOID;
      dw:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_EnumEffects);
    
   type af_IDirectInputDevice8W_GetEffectInfo is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      EI:LPDIEFFECTINFOW;
      IID:WIN32.OBJBASE.REFGUID
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_GetEffectInfo);
    
   type af_IDirectInputDevice8W_GetForceFeedbackState is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      pdw:LPDWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_GetForceFeedbackState);
    
   type af_IDirectInputDevice8W_SendForceFeedbackCommand is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      dw:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_SendForceFeedbackCommand);
    
   type af_IDirectInputDevice8W_EnumCreatedEffectObjects is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      EEOCB:LPDIENUMCREATEDEFFECTOBJECTSCALLBACK;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_EnumCreatedEffectObjects);
    
   type af_IDirectInputDevice8W_Escape IS access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      EE:LPDIEFFESCAPE
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_Escape);
    
   type af_IDirectInputDevice8W_Poll IS ACCESS PROCEDURE
     (THIS:ACCESS IDirectInputDevice8W);
   pragma convention(STDCALL,af_IDirectInputDevice8W_Poll);
    
   type af_IDirectInputDevice8W_SendDeviceData IS ACCESS PROCEDURE
     (THIS:ACCESS IDirectInputDevice8W;
      dw:DWORD;
      DOD:LPCDIDEVICEOBJECTDATA; 
      PDW:LPDWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_SendDeviceData);
    
   -- IDirectInputDevice7W methods --
   type af_IDirectInputDevice8W_EnumEffectsInFile is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      STR:LPCWSTR;
      EEIFCB:LPDIENUMEFFECTSINFILECALLBACK;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_EnumEffectsInFile);
    
   type af_IDirectInputDevice8W_WriteEffectToFile is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      STR :LPCWSTR;
      DW  :DWORD;
      FF  :LPDIFILEEFFECT;
      DW2 :DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_WriteEffectToFile);
    
   --IDirectInputDevice8W methods--
   type af_IDirectInputDevice8W_BuildActionMap is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      AF:LPDIACTIONFORMATW;
      STR:LPCWSTR;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_BuildActionMap);
    
   type af_IDirectInputDevice8W_SetActionMap is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      AF:LPDIACTIONFORMATW;
      STR:LPCWSTR;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_SetActionMap);
    
   type af_IDirectInputDevice8W_GetImageInfo is access procedure
     (THIS:ACCESS IDirectInputDevice8W;
      DIIH:LPDIDEVICEIMAGEINFOHEADERW
     );
   pragma convention(STDCALL,af_IDirectInputDevice8W_GetImageInfo);
    
   type IDirectInputDevice8W_vtbl is record
      --IUNKNOWN METHODS--
      QueryInterface :af_IDirectInputDevice8W_QueryInterface;
      AddRef         :af_IDirectInputDevice8W_AddRef;
      Release        :af_IDirectInputDevice8W_Release;
      --IDirectInputDeviceA methods--
      GetCapabilities:af_IDirectInputDevice8W_GetCapabilities;
      EnumObjects:af_IDirectInputDevice8W_EnumObjects;
      GetProperty:af_IDirectInputDevice8W_GetProperty;
      SetProperty:af_IDirectInputDevice8W_SetProperty;
      Acquire:af_IDirectInputDevice8W_Acquire;
      Unacquire:af_IDirectInputDevice8W_Unacquire;
      GetDeviceState:af_IDirectInputDevice8W_GetDeviceState;
      GetDeviceData:af_IDirectInputDevice8W_GetDeviceData;
      SetDataFormat:af_IDirectInputDevice8W_SetDataFormat;
      SetEventNotification:af_IDirectInputDevice8W_SetEventNotification;
      SetCooperativeLevel:af_IDirectInputDevice8W_SetCooperativeLevel;
      GetObjectInfo:af_IDirectInputDevice8W_GetObjectInfo;
      GetDeviceInfo:af_IDirectInputDevice8W_GetDeviceInfo;
      RunControlPanel:af_IDirectInputDevice8W_RunControlPanel;
      Initialize:af_IDirectInputDevice8W_Initialize;
      --IDirectInputDevice2A methods--
      CreateEffect:af_IDirectInputDevice8W_CreateEffect;
      EnumEffects:af_IDirectInputDevice8W_EnumEffects;
      GetEffectInfo:af_IDirectInputDevice8W_GetEffectInfo;
      GetForceFeedbackState:af_IDirectInputDevice8W_GetForceFeedbackState;
      SendForceFeedbackCommand:af_IDirectInputDevice8W_SendForceFeedbackCommand;
      EnumCreatedEffectObjects:af_IDirectInputDevice8W_EnumCreatedEffectObjects;
      Escape:af_IDirectInputDevice8W_Escape;
      Poll:af_IDirectInputDevice8W_Poll;
      SendDeviceData:af_IDirectInputDevice8W_SendDeviceData;
      --IDirectInputDevice7W methods--
      EnumEffectsInFile:af_IDirectInputDevice8W_EnumEffectsInFile;
      WriteEffectToFile:af_IDirectInputDevice8W_WriteEffectToFile;
      --IDirectInputDevice8W methods--
      BuildActionMap:af_IDirectInputDevice8W_BuildActionMap;
      SetActionMap:af_IDirectInputDevice8W_SetActionMap;
      GetImageInfo : af_IDirectInputDevice8W_GetImageInfo;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDevice8W_vtbl);
    
   type LPIDirectInputDevice8W_vtbl is access all IDirectInputDevice8W_vtbl;
    
   type IDirectInputDevice8W is record
      lpvtbl:LPIDirectInputDevice8W_vtbl;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDevice8W);
    
   type LPIDirectInputDevice8W is access all IDirectInputDevice8W;
   type LPCIDirectInputDevice8W is access constant IDirectInputDevice8W;
   subtype LPDirectInputDevice8W is LPIDirectInputDevice8W;
   subtype LPCDirectInputDevice8W is LPCIDirectInputDevice8W;
    
    
   ----------------------------------
   --INTERFACE IDirectInputDevice8A--
   ----------------------------------
    
   type IDirectInputDevice8A;
    
    
   --  IUNKNOWN METHODS  --
   type af_IDirectInputDevice8A_QueryInterface is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      IID :WIN32.OBJBASE.REFGUID;
      ppVObj:access LPVOID
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_QueryInterface);
    
   type af_IDirectInputDevice8A_AddRef is access function
     (THIS:ACCESS IDirectInputDevice8A)RETURN ULONG;
   pragma convention(STDCALL,af_IDirectInputDevice8A_AddRef);
    
   type af_IDirectInputDevice8A_Release is access function
     (THIS:ACCESS IDirectInputDevice8A)RETURN ULONG;
   pragma convention(STDCALL,af_IDirectInputDevice8A_Release);
    
   --IDirectInputDeviceA methods--
   type af_IDirectInputDevice8A_GetCapabilities is access procedure
     (THIS:access IDirectInputDevice8A;
      pDIDevCaps:LPDIDEVCAPS);
   pragma convention(STDCALL,af_IDirectInputDevice8A_GetCapabilities);
    
   type af_IDirectInputDevice8A_EnumObjects is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      EDCB:LPDIENUMDEVICEOBJECTSCALLBACKA;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_EnumObjects);
    
   type af_IDirectInputDevice8A_GetProperty is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      IID:WIN32.OBJBASE.REFGUID;
      PH:LPDIPROPHEADER);
   pragma convention(STDCALL,af_IDirectInputDevice8A_GetProperty);
    
   type af_IDirectInputDevice8A_SetProperty is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      iid:WIN32.OBJBASE.REFGUID;
      PH:LPDIPROPHEADER
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_SetProperty);
    
   type af_IDirectInputDevice8A_Acquire is access procedure
     (THIS:ACCESS IDirectInputDevice8A);
   pragma convention(STDCALL,af_IDirectInputDevice8A_Acquire);
    
   type af_IDirectInputDevice8A_Unacquire is access procedure
     (THIS:ACCESS IDirectInputDevice8A);
   pragma convention(STDCALL,af_IDirectInputDevice8A_Unacquire);
    
   type af_IDirectInputDevice8A_GetDeviceState is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      DW:DWORD;
      ADDR:LPVOID
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_GetDeviceState);
    
   type af_IDirectInputDevice8A_GetDeviceData is access procedure
     (THIS:access IDirectInputDevice8A;
      DW:DWORD;
      DOD:LPDIDEVICEOBJECTDATA;
      PDW:LPDWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_GetDeviceData);
    
   type af_IDirectInputDevice8A_SetDataFormat is access procedure
     (THIS:ACCESS IDirectInputDevice8A;DF:LPCDIDATAFORMAT);
   pragma convention(STDCALL,af_IDirectInputDevice8A_SetDataFormat);
    
   type af_IDirectInputDevice8A_SetEventNotification is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      H:WIN32.WINNT.Handle
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_SetEventNotification);
    
   type af_IDirectInputDevice8A_SetCooperativeLevel is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      hw:win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_SetCooperativeLevel);
    
   type af_IDirectInputDevice8A_GetObjectInfo is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      DOI:LPDIDEVICEOBJECTINSTANCEA;
      DW:DWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_GetObjectInfo);
    
   type af_IDirectInputDevice8A_GetDeviceInfo is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      DI:LPDIDEVICEINSTANCEA
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_GetDeviceInfo);
    
   type af_IDirectInputDevice8A_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInputDevice8A;HW:win32.windef.HWND;DW:DWORD);
   pragma convention(STDCALL,af_IDirectInputDevice8A_RunControlPanel);
    
   type af_IDirectInputDevice8A_Initialize is access procedure
     (THIS:ACCESS IDirectInputDevice8A;HINST:WIN32.WINDEF.hinstance;dw:DWORD;iid:win32.objbase.REFGUID);
   pragma convention(STDCALL,af_IDirectInputDevice8A_Initialize);
    
   ---IDirectInputDevice2A methods---
   type af_IDirectInputDevice8A_CreateEffect is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      IID:WIN32.OBJBASE.REFGUID;
      EF:LPCDIEFFECT;
      PPIE:ACCESS LPDIRECTINPUTEFFECT;
      IU:ACCESS WIN32.OBJBASE.IUNKNOWN     --?POINTER OR A IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_CreateEffect);
    
   type af_IDirectInputDevice8A_EnumEffects is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      ecb:LPDIENUMEFFECTSCALLBACKA;
      addr:LPVOID;
      dw:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_EnumEffects);
    
   type af_IDirectInputDevice8A_GetEffectInfo is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      EI:LPDIEFFECTINFOA;
      IID:WIN32.OBJBASE.REFGUID
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_GetEffectInfo);
    
   type af_IDirectInputDevice8A_GetForceFeedbackState is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      pdw:LPDWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_GetForceFeedbackState);
    
   type af_IDirectInputDevice8A_SendForceFeedbackCommand is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      dw:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_SendForceFeedbackCommand);
    
   type af_IDirectInputDevice8A_EnumCreatedEffectObjects is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      EEOCB:LPDIENUMCREATEDEFFECTOBJECTSCALLBACK;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_EnumCreatedEffectObjects);
    
   type af_IDirectInputDevice8A_Escape IS access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      EE:LPDIEFFESCAPE
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_Escape);
    
   type af_IDirectInputDevice8A_Poll IS ACCESS PROCEDURE
     (THIS:ACCESS IDirectInputDevice8A);
   pragma convention(STDCALL,af_IDirectInputDevice8A_Poll);
    
   type af_IDirectInputDevice8A_SendDeviceData IS ACCESS PROCEDURE
     (THIS:ACCESS IDirectInputDevice8A;
      dw:DWORD;
      DOD:LPCDIDEVICEOBJECTDATA; 
      PDW:LPDWORD;
      DW2:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_SendDeviceData);
    
   -- IDirectInputDevice7W methods --
   type af_IDirectInputDevice8A_EnumEffectsInFile is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      STR:LPCSTR;
      EEIFCB:LPDIENUMEFFECTSINFILECALLBACK;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_EnumEffectsInFile);
    
   type af_IDirectInputDevice8A_WriteEffectToFile is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      STR :LPCSTR;
      DW  :DWORD;
      FF  :LPDIFILEEFFECT;
      DW2 :DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_WriteEffectToFile);
    
   --IDirectInputDevice8A methods--
   type af_IDirectInputDevice8A_BuildActionMap is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      AF:LPDIACTIONFORMATA;
      STR:LPCSTR;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_BuildActionMap);
    
   type af_IDirectInputDevice8A_SetActionMap is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      AF:LPDIACTIONFORMATA;
      STR:LPCSTR;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_SetActionMap);
    
   type af_IDirectInputDevice8A_GetImageInfo is access procedure
     (THIS:ACCESS IDirectInputDevice8A;
      DIIH:LPDIDEVICEIMAGEINFOHEADERA
     );
   pragma convention(STDCALL,af_IDirectInputDevice8A_GetImageInfo);
    
   type IDirectInputDevice8A_vtbl is record
      --IUNKNOWN METHODS--
      QueryInterface :af_IDirectInputDevice8A_QueryInterface;
      AddRef         :af_IDirectInputDevice8A_AddRef;
      Release        :af_IDirectInputDevice8A_Release;
      --IDirectInputDeviceA methods--
      GetCapabilities:af_IDirectInputDevice8A_GetCapabilities;
      EnumObjects:af_IDirectInputDevice8A_EnumObjects;
      GetProperty:af_IDirectInputDevice8A_GetProperty;
      SetProperty:af_IDirectInputDevice8A_SetProperty;
      Acquire:af_IDirectInputDevice8A_Acquire;
      Unacquire:af_IDirectInputDevice8A_Unacquire;
      GetDeviceState:af_IDirectInputDevice8A_GetDeviceState;
      GetDeviceData:af_IDirectInputDevice8A_GetDeviceData;
      SetDataFormat:af_IDirectInputDevice8A_SetDataFormat;
      SetEventNotification:af_IDirectInputDevice8A_SetEventNotification;
      SetCooperativeLevel:af_IDirectInputDevice8A_SetCooperativeLevel;
      GetObjectInfo:af_IDirectInputDevice8A_GetObjectInfo;
      GetDeviceInfo:af_IDirectInputDevice8A_GetDeviceInfo;
      RunControlPanel:af_IDirectInputDevice8A_RunControlPanel;
      Initialize:af_IDirectInputDevice8A_Initialize;
      --IDirectInputDevice2A methods--
      CreateEffect:af_IDirectInputDevice8A_CreateEffect;
      EnumEffects:af_IDirectInputDevice8A_EnumEffects;
      GetEffectInfo:af_IDirectInputDevice8A_GetEffectInfo;
      GetForceFeedbackState:af_IDirectInputDevice8A_GetForceFeedbackState;
      SendForceFeedbackCommand:af_IDirectInputDevice8A_SendForceFeedbackCommand;
      EnumCreatedEffectObjects:af_IDirectInputDevice8A_EnumCreatedEffectObjects;
      Escape:af_IDirectInputDevice8A_Escape;
      Poll:af_IDirectInputDevice8A_Poll;
      SendDeviceData:af_IDirectInputDevice8A_SendDeviceData;
      --IDirectInputDevice7A methods--
      EnumEffectsInFile:af_IDirectInputDevice8A_EnumEffectsInFile;
      WriteEffectToFile:af_IDirectInputDevice8A_WriteEffectToFile;
      --IDirectInputDevice8A methods--
      BuildActionMap:af_IDirectInputDevice8A_BuildActionMap;
      SetActionMap:af_IDirectInputDevice8A_SetActionMap;
      GetImageInfo : af_IDirectInputDevice8A_GetImageInfo;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDevice8A_vtbl);
    
   type LPIDirectInputDevice8A_vtbl is access all IDirectInputDevice8A_vtbl;
    
   type IDirectInputDevice8A is record
      lpvtbl:LPIDirectInputDevice8A_vtbl;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputDevice8A);
    
   type LPIDirectInputDevice8A is access all IDirectInputDevice8A;
   type LPCIDirectInputDevice8A is access constant IDirectInputDevice8A;
   subtype LPDirectInputDevice8A is LPIDirectInputDevice8A;
   subtype LPCDirectInputDevice8A is LPCIDirectInputDevice8A;
   subtype IDirectInputDevice8 is IDirectInputDevice8A;
   subtype LPIDirectInputDevice8 is LPIDirectInputDevice8A;
   subtype LPDirectInputDevice8 is LPIDirectInputDevice8A;
   subtype LPCDirectInputDevice8 is LPCIDirectInputDevice8A;
    
    
   --------------------------------
   --****************************--
   --            Mouse           --
   --****************************--
   --------------------------------
    
   --Line:1987
   type DIMOUSESTATE is record
      lx:Long;
      ly:Long;
      lz:Long;
      rgbButtons:BYTE_ARRAY(0..3);
   end record;
   PRAGMA CONVENTION(C_PASS_BY_COPY,DIMOUSESTATE);
    
   --Line:1995
   type DIMOUSESTATE2 is record
      lx:Long;
      ly:Long;
      lz:Long;
      rgbButtons:BYTE_ARRAY(0..7);
   end record;
   PRAGMA CONVENTION(C_PASS_BY_COPY,DIMOUSESTATE2);
    
   --Line:2311..2312
   DIENUM_STOP    :constant:=0;
   DIENUM_CONTINUE:constant:=1;
    
   --Line:2314..2315
   type LPDIENUMDEVICESCALLBACKA is access function
     (di:LPCDIDEVICEINSTANCEA;addr:LPVOID)return WIN32.BOOL;
   pragma convention(STDCALL,LPDIENUMDEVICESCALLBACKA);
    
   type LPDIENUMDEVICESCALLBACKW is access function
     (di:LPCDIDEVICEINSTANCEW;addr:LPVOID)return WIN32.BOOL;
   pragma convention(STDCALL,LPDIENUMDEVICESCALLBACKW);
    
   --Line:2321
   type LPDICONFIGUREDEVICESCALLBACK is access function
     (pIUNKNOWN:access win32.objbase.IUNKNOWN;ADDR:LPVOID)return win32.bool;
   pragma convention(STDCALL,LPDICONFIGUREDEVICESCALLBACK);
    
   --Line:2323..2333
   DIEDFL_ALLDEVICES     :constant:=16#00000000#;
   DIEDFL_ATTACHEDONLY   :constant:=16#00000001#;
    
   DIEDFL_FORCEFEEDBACK  :constant:=16#00000100#;
   DIEDFL_INCLUDEALIASES :constant:=16#00010000#;
    
   DIEDFL_INCLUDEPHANTOMS:constant:=16#00020000#;
   DIEDFL_INCLUDEHIDDEN  :constant:=16#00040000#;
    
   --Line:2338..2339
   type LPDIENUMDEVICESBYSEMANTICSCBA is access function
     (DI:LPCDIDEVICEINSTANCEA;
      id:LPDIRECTINPUTDEVICE8A;
      DW:DWORD;
      DW2:DWORD;
      ADDR:LPVOID
     )return win32.bool;
   pragma convention(STDCALL,LPDIENUMDEVICESBYSEMANTICSCBA);
    
   type LPDIENUMDEVICESBYSEMANTICSCBW is access function
     (DI  :LPCDIDEVICEINSTANCEW;
      id  :LPDIRECTINPUTDEVICE8W;
      DW  :DWORD;
      DW2 :DWORD;
      ADDR:LPVOID
     )return win32.bool;
   pragma convention(STDCALL,LPDIENUMDEVICESBYSEMANTICSCBW);
    
   --Line:2348..2361
   DIEDBS_MAPPEDPRI1           :constant:=16#00000001#;
   DIEDBS_MAPPEDPRI2           :constant:=16#00000002#;
   DIEDBS_RECENTDEVICE         :constant:=16#00000010#;
   DIEDBS_NEWDEVICE            :constant:=16#00000020#;

   DIEDBSFL_ATTACHEDONLY       :constant:=16#00000000#;
   DIEDBSFL_THISUSER           :constant:=16#00000010#;
   DIEDBSFL_FORCEFEEDBACK      :constant:=DIEDFL_FORCEFEEDBACK;
   DIEDBSFL_AVAILABLEDEVICES   :constant:=16#00001000#;
   DIEDBSFL_MULTIMICEKEYBOARDS :constant:=16#00002000#;
   DIEDBSFL_NONGAMINGDEVICES   :constant:=16#00004000#;
   DIEDBSFL_VALID              :constant:=16#00007110#;
    
    
   -----------------------------
   -- Interface IDirectInputW --
   -----------------------------
    
   type IDirectInputW;
    
   --IUNKNOWN METHODS--
   type af_IDirectInputW_QueryInterface is access procedure
     (THIS:ACCESS IDirectInputW;
      riid:win32.objbase.REFIID;
      ppvObj:access LPVOID
     );
   pragma convention(STDCALL,af_IDirectInputW_QueryInterface);
    
   type af_IDirectInputW_AddRef is access function
     (THIS:ACCESS IDirectInputW)return ULONG;
   pragma convention(STDCALL,af_IDirectInputW_AddRef);
    
   type af_IDirectInputW_Release is access function
     (THIS:ACCESS IDirectInputW)return Ulong;
   pragma convention(STDCALL,af_IDirectInputW_Release);
    
   --IDirectInputW Methods--
   type af_IDirectInputW_CreateDevice is access procedure
     (THIS:ACCESS IDirectInputW;
      guid:Win32.objbase.REFGUID;
      id  :ACCESS LPIDIRECTINPUTDEVICEW;
      PIK :ACCESS Win32.Objbase.IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInputW_CreateDevice);
    
   type af_IDirectInputW_EnumDevices is access procedure
     (THIS:ACCESS IDirectInputW;
      dw  :DWORD;
      edcb:LPDIENUMDEVICESCALLBACKW;
      addr:LPVOID;
      dw2 :DWORD
     );
   pragma convention(STDCALL,af_IDirectInputW_EnumDevices);
    
   type af_IDirectInputW_GetDeviceStatus is access procedure
     (THIS:ACCESS IDirectInputW;
      guid:Win32.Objbase.REFGUID
     );
   pragma convention(STDCALL,af_IDirectInputW_GetDeviceStatus);
    
   type af_IDirectInputW_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInputW;
      hw:Win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputW_RunControlPanel);
    
   type af_IDirectInputW_Initialize is access procedure
     (THIS:ACCESS IDirectInputW;
      HINST:Win32.windef.HINSTANCE;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputW_Initialize);
    
   --º¯Êý±í--
   type IDirectInputW_VTBL is record
      --IUNKNOWN METHODS--
      QueryInterface:af_IDirectInputW_QueryInterface;
      AddRef:af_IDirectInputW_AddRef;
      Release:af_IDirectInputW_Release;
      --IDirectInput Methods--
      CreateDevice:af_IDirectInputW_CreateDevice;
      EnumDevices:af_IDirectInputW_EnumDevices;
      GetDeviceStatus:af_IDirectInputW_GetDeviceStatus;
      RunControlPanel:af_IDirectInputW_RunControlPanel;
      Initialize:af_IDirectInputW_Initialize;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputW_VTBL);
    
   type LPIDirectInputW_VTBL is access all IDirectInputW_VTBL;
    
   type IDirectInputW is record
      lpvtbl:LPIDirectInputW_VTBL;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputW);
    
   type LPDirectInputW is access all IDirectInputW;
   type LPCDirectInputW is access constant IDirectInputW;
    
    
   -----------------------------
   -- Interface IDirectInputA --
   -----------------------------
    
   type IDirectInputA;
    
   --IUNKNOWN METHODS--
   type af_IDirectInputA_QueryInterface is access procedure
     (THIS:ACCESS IDirectInputA;
      riid:win32.objbase.REFIID;
      ppvObj:access LPVOID
     );
   pragma convention(STDCALL,af_IDirectInputA_QueryInterface);
    
   type af_IDirectInputA_AddRef is access function
     (THIS:ACCESS IDirectInputA)return ULONG;
   pragma convention(STDCALL,af_IDirectInputA_AddRef);
    
   type af_IDirectInputA_Release is access function
     (THIS:ACCESS IDirectInputA)return Ulong;
   pragma convention(STDCALL,af_IDirectInputA_Release);
    
   --IDirectInputA Methods--
   type af_IDirectInputA_CreateDevice is access procedure
     (THIS:ACCESS IDirectInputA;
      guid:Win32.objbase.REFGUID;
      id  :ACCESS LPIDIRECTINPUTDEVICEA;
      PIK :ACCESS Win32.Objbase.IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInputA_CreateDevice);
    
   type af_IDirectInputA_EnumDevices is access procedure
     (THIS:ACCESS IDirectInputA;
      dw  :DWORD;
      edcb:LPDIENUMDEVICESCALLBACKA;
      addr:LPVOID;
      dw2 :DWORD
     );
   pragma convention(STDCALL,af_IDirectInputA_EnumDevices);
    
   type af_IDirectInputA_GetDeviceStatus is access procedure
     (THIS:ACCESS IDirectInputA;
      guid:Win32.Objbase.REFGUID
     );
   pragma convention(STDCALL,af_IDirectInputA_GetDeviceStatus);
    
   type af_IDirectInputA_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInputA;
      hw:Win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputA_RunControlPanel);
    
   type af_IDirectInputA_Initialize is access procedure
     (THIS:ACCESS IDirectInputA;
      HINST:Win32.windef.HINSTANCE;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInputA_Initialize);
    
   --º¯Êý±í--
   type IDirectInputA_VTBL is record
      --IUNKNOWN METHODS--
      QueryInterface:af_IDirectInputA_QueryInterface;
      AddRef:af_IDirectInputA_AddRef;
      Release:af_IDirectInputA_Release;
      --IDirectInput Methods--
      CreateDevice:af_IDirectInputA_CreateDevice;
      EnumDevices:af_IDirectInputA_EnumDevices;
      GetDeviceStatus:af_IDirectInputA_GetDeviceStatus;
      RunControlPanel:af_IDirectInputA_RunControlPanel;
      Initialize:af_IDirectInputA_Initialize;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputA_VTBL);
    
   TYPE LPIDirectInputA_VTBL IS ACCESS ALL IDirectInputA_VTBL;
    
   type IDirectInputA is record
      lpvtbl:LPIDirectInputA_VTBL;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInputA);
    
   type LPDirectInputA is access all IDirectInputA;
   type LPCDirectInputA is access constant IDirectInputA;
    
   subtype IDirectInput is IDirectInputA;
   subtype LPDirectInput is LPDirectInputA;
   subtype LPCDirectInput is LPCDirectInputA;

   -----------------------------
   -- Interface IDirectInput2W --
   -----------------------------
    
   type IDirectInput2W;
    
   --IUNKNOWN METHODS--
   type af_IDirectInput2W_QueryInterface is access procedure
     (THIS:ACCESS IDirectInput2W;
      riid:win32.objbase.REFIID;
      ppvObj:access LPVOID
     );
   pragma convention(STDCALL,af_IDirectInput2W_QueryInterface);
    
   type af_IDirectInput2W_AddRef is access function
     (THIS:ACCESS IDirectInput2W)return ULONG;
   pragma convention(STDCALL,af_IDirectInput2W_AddRef);
    
   type af_IDirectInput2W_Release is access function
     (THIS:ACCESS IDirectInput2W)return Ulong;
   pragma convention(STDCALL,af_IDirectInput2W_Release);
    
   --IDirectInput2W Methods--
   type af_IDirectInput2W_CreateDevice is access procedure
     (THIS:ACCESS IDirectInput2W;
      guid:Win32.objbase.REFGUID;
      id  :ACCESS LPIDIRECTINPUTDEVICEW;
      PIK :ACCESS Win32.Objbase.IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInput2W_CreateDevice);
    
   type af_IDirectInput2W_EnumDevices is access procedure
     (THIS:ACCESS IDirectInput2W;
      dw  :DWORD;
      edcb:LPDIENUMDEVICESCALLBACKW;
      addr:LPVOID;
      dw2 :DWORD
     );
   pragma convention(STDCALL,af_IDirectInput2W_EnumDevices);
    
   type af_IDirectInput2W_GetDeviceStatus is access procedure
     (THIS:ACCESS IDirectInput2W;
      guid:Win32.Objbase.REFGUID
     );
   pragma convention(STDCALL,af_IDirectInput2W_GetDeviceStatus);
    
   type af_IDirectInput2W_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInput2W;
      hw:Win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInput2W_RunControlPanel);
    
   type af_IDirectInput2W_Initialize is access procedure
     (THIS:ACCESS IDirectInput2W;
      HINST:Win32.windef.HINSTANCE;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInput2W_Initialize);
    
   --IDirectInput2 Methods--
   type af_IDirectInput2W_FindDevice is access procedure
     (THIS:ACCESS IDirectInput2W;
      guid:win32.objbase.REFGUID;
      str:LPCWSTR;
      gid:win32.objbase.LPGUID
     );
    
   --º¯Êý±í--
   type IDirectInput2W_VTBL is record
      --IUNKNOWN METHODS--
      QueryInterface:af_IDirectInput2W_QueryInterface;
      AddRef:af_IDirectInput2W_AddRef;
      Release:af_IDirectInput2W_Release;
      --IDirectInput Methods--
      CreateDevice:af_IDirectInput2W_CreateDevice;
      EnumDevices:af_IDirectInput2W_EnumDevices;
      GetDeviceStatus:af_IDirectInput2W_GetDeviceStatus;
      RunControlPanel:af_IDirectInput2W_RunControlPanel;
      Initialize:af_IDirectInput2W_Initialize;
      --IDirectInput2 Methods--
      FindDevice:af_IDirectInput2W_FindDevice;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInput2W_VTBL);
    
   type LPIDirectInput2W_VTBL is access all IDirectInput2W_VTBL;
    
   type IDirectInput2W is record
      lpvtbl:LPIDirectInput2W_VTBL;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInput2W);
    
   type LPDirectInput2W is access all IDirectInput2W;
   type LPCDirectInput2W is access constant IDirectInput2W;
    
    
   ------------------------------
   -- Interface IDirectInput2A --
   ------------------------------
    
   type IDirectInput2A;
    
   --IUNKNOWN METHODS--
   type af_IDirectInput2A_QueryInterface is access procedure
     (THIS:ACCESS IDirectInput2A;
      riid:win32.objbase.REFIID;
      ppvObj:access LPVOID
     );
   pragma convention(STDCALL,af_IDirectInput2A_QueryInterface);
    
   type af_IDirectInput2A_AddRef is access function
     (THIS:ACCESS IDirectInput2A)return ULONG;
   pragma convention(STDCALL,af_IDirectInput2A_AddRef);
    
   type af_IDirectInput2A_Release is access function
     (THIS:ACCESS IDirectInput2A)return Ulong;
   pragma convention(STDCALL,af_IDirectInput2A_Release);
    
   --IDirectInput2A Methods--
   type af_IDirectInput2A_CreateDevice is access procedure
     (THIS:ACCESS IDirectInput2A;
      guid:Win32.objbase.REFGUID;
      id  :ACCESS LPIDIRECTINPUTDEVICEA;
      PIK :ACCESS Win32.Objbase.IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInput2A_CreateDevice);
    
   type af_IDirectInput2A_EnumDevices is access procedure
     (THIS:ACCESS IDirectInput2A;
      dw  :DWORD;
      edcb:LPDIENUMDEVICESCALLBACKA;
      addr:LPVOID;
      dw2 :DWORD
     );
   pragma convention(STDCALL,af_IDirectInput2A_EnumDevices);
    
   type af_IDirectInput2A_GetDeviceStatus is access procedure
     (THIS:ACCESS IDirectInput2A;
      guid:Win32.Objbase.REFGUID
     );
   pragma convention(STDCALL,af_IDirectInput2A_GetDeviceStatus);
    
   type af_IDirectInput2A_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInput2A;
      hw:Win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInput2A_RunControlPanel);
    
   type af_IDirectInput2A_Initialize is access procedure
     (THIS:ACCESS IDirectInput2A;
      HINST:Win32.windef.HINSTANCE;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInput2A_Initialize);
    
   --IDirectInput2 Methods--
   type af_IDirectInput2A_FindDevice is access procedure
     (THIS:ACCESS IDirectInput2A;
      guid:win32.objbase.REFGUID;
      str:LPCSTR;
      gid:win32.objbase.LPGUID
     );
    
   --º¯Êý±í--
   type IDirectInput2A_VTBL is record
      --IUNKNOWN METHODS--
      QueryInterface:af_IDirectInput2A_QueryInterface;
      AddRef:af_IDirectInput2A_AddRef;
      Release:af_IDirectInput2A_Release;
      --IDirectInput Methods--
      CreateDevice:af_IDirectInput2A_CreateDevice;
      EnumDevices:af_IDirectInput2A_EnumDevices;
      GetDeviceStatus:af_IDirectInput2A_GetDeviceStatus;
      RunControlPanel:af_IDirectInput2A_RunControlPanel;
      Initialize:af_IDirectInput2A_Initialize;
      --IDirectInput2 Methods--
      FindDevice:af_IDirectInput2A_FindDevice;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInput2A_VTBL);
    
   type LPIDirectInput2A_VTBL is access all IDirectInput2A_VTBL;
    
   type IDirectInput2A is record
      lpvtbl:LPIDirectInput2A_VTBL;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInput2A);
    
   type LPDirectInput2A  is access all IDirectInput2A;
   type LPCDirectInput2A is access constant IDirectInput2A;
    
   subtype IDirectInput2   is IDirectInput2A;
   subtype LPDirectInput2  is LPDirectInputA;
   subtype LPCDirectInput2 is LPCDirectInputA;
    
   -----------------------------
   -- Interface IDirectInput7W --
   -----------------------------
    
   type IDirectInput7W;
    
   --IUNKNOWN METHODS--
   type af_IDirectInput7W_QueryInterface is access procedure
     (THIS:ACCESS IDirectInput7W;
      riid:win32.objbase.REFIID;
      ppvObj:access LPVOID
     );
   pragma convention(STDCALL,af_IDirectInput7W_QueryInterface);
    
   type af_IDirectInput7W_AddRef is access function
     (THIS:ACCESS IDirectInput7W)return ULONG;
   pragma convention(STDCALL,af_IDirectInput7W_AddRef);
    
   type af_IDirectInput7W_Release is access function
     (THIS:ACCESS IDirectInput7W)return Ulong;
   pragma convention(STDCALL,af_IDirectInput7W_Release);
    
   --IDirectInput7W Methods--
   type af_IDirectInput7W_CreateDevice is access procedure
     (THIS:ACCESS IDirectInput7W;
      guid:Win32.objbase.REFGUID;
      id  :ACCESS LPIDIRECTINPUTDEVICEW;
      PIK :ACCESS Win32.Objbase.IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInput7W_CreateDevice);
    
   type af_IDirectInput7W_EnumDevices is access procedure
     (THIS:ACCESS IDirectInput7W;
      dw  :DWORD;
      edcb:LPDIENUMDEVICESCALLBACKW;
      addr:LPVOID;
      dw2 :DWORD
     );
   pragma convention(STDCALL,af_IDirectInput7W_EnumDevices);
    
   type af_IDirectInput7W_GetDeviceStatus is access procedure
     (THIS:ACCESS IDirectInput7W;
      guid:Win32.Objbase.REFGUID
     );
   pragma convention(STDCALL,af_IDirectInput7W_GetDeviceStatus);
    
   type af_IDirectInput7W_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInput7W;
      hw:Win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInput7W_RunControlPanel);
    
   type af_IDirectInput7W_Initialize is access procedure
     (THIS:ACCESS IDirectInput7W;
      HINST:Win32.windef.HINSTANCE;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInput7W_Initialize);
    
   --IDirectInput2 Methods--
   type af_IDirectInput7W_FindDevice is access procedure
     (THIS:ACCESS IDirectInput7W;
      guid:win32.objbase.REFGUID;
      str:LPCWSTR;
      gid:win32.objbase.LPGUID
     );
   pragma convention(STDCALL,af_IDirectInput7W_FindDevice); 
    
   --IDirectInput7 Methods--
   type af_IDirectInput7W_CreateDeviceEx is access procedure
     (THIS:ACCESS IDirectInput7W;
      GUID:WIN32.OBJBASE.REFGUID;
      IID:WIN32.OBJBASE.REFIID;
      PADDR:ACCESS LPVOID;
      pIK:access win32.objbase.IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInput7W_CreateDeviceEx);
    
   --º¯Êý±í--
   type IDirectInput7W_VTBL is record
      --IUNKNOWN METHODS--
      QueryInterface:af_IDirectInput7W_QueryInterface;
      AddRef:af_IDirectInput7W_AddRef;
      Release:af_IDirectInput7W_Release;
      --IDirectInput Methods--
      CreateDevice:af_IDirectInput7W_CreateDevice;
      EnumDevices:af_IDirectInput7W_EnumDevices;
      GetDeviceStatus:af_IDirectInput7W_GetDeviceStatus;
      RunControlPanel:af_IDirectInput7W_RunControlPanel;
      Initialize:af_IDirectInput7W_Initialize;
      --IDirectInput2 Methods--
      FindDevice:af_IDirectInput7W_FindDevice;
      --IDirectInput7 Methods--
      CreateDeviceEx:af_IDirectInput7W_CreateDeviceEx;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInput7W_VTBL);
    
   TYPE LPIDirectInput7W_VTBL is access all IDirectInput7W_VTBL;
    
   type IDirectInput7W is record
      lpvtbl:LPIDirectInput7W_VTBL;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInput7W);
    
   type LPDirectInput7W  is access all IDirectInput7W;
   type LPCDirectInput7W is access constant IDirectInput7W;
    
    
   ------------------------------
   -- Interface IDirectInput7A --
   ------------------------------
    
   type IDirectInput7A;
    
   --IUNKNOWN METHODS--
   type af_IDirectInput7A_QueryInterface is access procedure
     (THIS:ACCESS IDirectInput7A;
      riid:win32.objbase.REFIID;
      ppvObj:access LPVOID
     );
   pragma convention(STDCALL,af_IDirectInput7A_QueryInterface);
    
   type af_IDirectInput7A_AddRef is access function
     (THIS:ACCESS IDirectInput7A)return ULONG;
   pragma convention(STDCALL,af_IDirectInput7A_AddRef);
    
   type af_IDirectInput7A_Release is access function
     (THIS:ACCESS IDirectInput7A)return Ulong;
   pragma convention(STDCALL,af_IDirectInput7A_Release);
    
   --IDirectInput7A Methods--
   type af_IDirectInput7A_CreateDevice is access procedure
     (THIS:ACCESS IDirectInput7A;
      guid:Win32.objbase.REFGUID;
      id  :ACCESS LPIDIRECTINPUTDEVICEA;
      PIK :ACCESS Win32.Objbase.IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInput7A_CreateDevice);
    
   type af_IDirectInput7A_EnumDevices is access procedure
     (THIS:ACCESS IDirectInput7A;
      dw  :DWORD;
      edcb:LPDIENUMDEVICESCALLBACKA;
      addr:LPVOID;
      dw2 :DWORD
     );
   pragma convention(STDCALL,af_IDirectInput7A_EnumDevices);
    
   type af_IDirectInput7A_GetDeviceStatus is access procedure
     (THIS:ACCESS IDirectInput7A;
      guid:Win32.Objbase.REFGUID
     );
   pragma convention(STDCALL,af_IDirectInput7A_GetDeviceStatus);
    
   type af_IDirectInput7A_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInput7A;
      hw:Win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInput7A_RunControlPanel);
    
   type af_IDirectInput7A_Initialize is access procedure
     (THIS:ACCESS IDirectInput7A;
      HINST:Win32.windef.HINSTANCE;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInput7A_Initialize);
    
   --IDirectInput2 Methods--
   type af_IDirectInput7A_FindDevice is access procedure
     (THIS:ACCESS IDirectInput7A;
      guid:win32.objbase.REFGUID;
      str:LPCSTR;
      gid:win32.objbase.LPGUID
     );
        
   --IDirectInput7 Methods--
   type af_IDirectInput7A_CreateDeviceEx is access procedure
     (THIS:ACCESS IDirectInput7A;
      GUID:WIN32.OBJBASE.REFGUID;
      IID:WIN32.OBJBASE.REFIID;
      PADDR:ACCESS LPVOID;
      pIK:access win32.objbase.IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInput7A_CreateDeviceEx);
    
   --º¯Êý±í--
   type IDirectInput7A_VTBL is record
      --IUNKNOWN METHODS--
      QueryInterface:af_IDirectInput7A_QueryInterface;
      AddRef:af_IDirectInput7A_AddRef;
      Release:af_IDirectInput7A_Release;
      --IDirectInput Methods--
      CreateDevice:af_IDirectInput7A_CreateDevice;
      EnumDevices:af_IDirectInput7A_EnumDevices;
      GetDeviceStatus:af_IDirectInput7A_GetDeviceStatus;
      RunControlPanel:af_IDirectInput7A_RunControlPanel;
      Initialize:af_IDirectInput7A_Initialize;
      --IDirectInput2 Methods--
      FindDevice:af_IDirectInput7A_FindDevice;
      --IDirectInput7 Methods--
      CreateDeviceEx:af_IDirectInput7A_CreateDeviceEx;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInput7A_VTBL);
    
   type LPIDirectInput7A_VTBL is access all IDirectInput7A_VTBL;
    
   type IDirectInput7A is record
      lpvtbl:LPIDirectInput7A_VTBL;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInput7A);
    
   type LPDirectInput7A is access all IDirectInput7A;
   type LPCDirectInput7A is access constant IDirectInput7A;
    
   subtype IDirectInput7 is IDirectInput7A;
   subtype LPDirectInput7 is LPDirectInputA;
   subtype LPCDirectInput7 is LPCDirectInputA;
    
    
   -----------------------------
   -- Interface IDirectInput8W --
   -----------------------------
    
   type IDirectInput8W;
    
   --IUNKNOWN METHODS--
   type af_IDirectInput8W_QueryInterface is access procedure
     (THIS:ACCESS IDirectInput8W;
      riid:win32.objbase.REFIID;
      ppvObj:access LPVOID
     );
   pragma convention(STDCALL,af_IDirectInput8W_QueryInterface);
    
   type af_IDirectInput8W_AddRef is access function
     (THIS:ACCESS IDirectInput8W)return ULONG;
   pragma convention(STDCALL,af_IDirectInput8W_AddRef);
    
   type af_IDirectInput8W_Release is access function
     (THIS:ACCESS IDirectInput8W)return Ulong;
   pragma convention(STDCALL,af_IDirectInput8W_Release);
    
   --IDirectInput8W Methods--
   type af_IDirectInput8W_CreateDevice is access procedure
     (THIS:ACCESS IDirectInput8W;
      guid:Win32.objbase.REFGUID;
      id  :ACCESS LPIDIRECTINPUTDEVICEW;
      PIK :ACCESS Win32.Objbase.IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInput8W_CreateDevice);
    
   type af_IDirectInput8W_EnumDevices is access procedure
     (THIS:ACCESS IDirectInput8W;
      dw  :DWORD;
      edcb:LPDIENUMDEVICESCALLBACKW;
      addr:LPVOID;
      dw2 :DWORD
     );
   pragma convention(STDCALL,af_IDirectInput8W_EnumDevices);
    
   type af_IDirectInput8W_GetDeviceStatus is access procedure
     (THIS:ACCESS IDirectInput8W;
      guid:Win32.Objbase.REFGUID
     );
   pragma convention(STDCALL,af_IDirectInput8W_GetDeviceStatus);
    
   type af_IDirectInput8W_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInput8W;
      hw:Win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInput8W_RunControlPanel);
    
   type af_IDirectInput8W_Initialize is access procedure
     (THIS:ACCESS IDirectInput8W;
      HINST:Win32.windef.HINSTANCE;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInput8W_Initialize);
    
   --IDirectInput2 Methods--
   type af_IDirectInput8W_FindDevice is access procedure
     (THIS:ACCESS IDirectInput8W;
      guid:win32.objbase.REFGUID;
      str:LPCWSTR;
      gid:win32.objbase.LPGUID
     );
    
   --IDirectInput8 Methods--
   type af_IDirectInput8W_EnumDevicesBySemantics is access procedure
     (THIS:ACCESS IDirectInput8W;
      STR:LPCWSTR;
      AF:LPDIACTIONFORMATW;
      EDS:LPDIENUMDEVICESBYSEMANTICSCBW;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInput8W_EnumDevicesBySemantics);
    
   type af_IDirectInput8W_ConfigureDevices is access procedure
     (THIS:ACCESS IDirectInput8W;
      CDCB:LPDICONFIGUREDEVICESCALLBACK;
      CDS:LPDICONFIGUREDEVICESPARAMSW;
      DW:DWORD;
      ADDR:LPVOID
     );
   PRAGMA CONVENTION(STDCALL,af_IDirectInput8W_ConfigureDevices);
    
   --º¯Êý±í--
   type IDirectInput8W_VTBL is record
      --IUNKNOWN METHODS--
      QueryInterface:af_IDirectInput8W_QueryInterface;
      AddRef:af_IDirectInput8W_AddRef;
      Release:af_IDirectInput8W_Release;
      --IDirectInput Methods--
      CreateDevice:af_IDirectInput8W_CreateDevice;
      EnumDevices:af_IDirectInput8W_EnumDevices;
      GetDeviceStatus:af_IDirectInput8W_GetDeviceStatus;
      RunControlPanel:af_IDirectInput8W_RunControlPanel;
      Initialize:af_IDirectInput8W_Initialize;
      --IDirectInput2 Methods--
      FindDevice:af_IDirectInput8W_FindDevice;
      --IDirectInput8 Methods--
      EnumDevicesBySemantics:af_IDirectInput8W_EnumDevicesBySemantics;
      ConfigureDevices:af_IDirectInput8W_ConfigureDevices;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInput8W_VTBL);
    
   type LPIDirectInput8W_VTBL is access all IDirectInput8W_VTBL;
    
   type IDirectInput8W is record
      lpvtbl:LPIDirectInput8W_VTBL;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInput8W);
   type LPDirectInput8W is access all IDirectInput8W;
   type LPCDirectInput8W is access constant IDirectInput8W;
    
    
   ------------------------------
   -- Interface IDirectInput8A --
   ------------------------------
    
   type IDirectInput8A;
    
   --IUNKNOWN METHODS--
   type af_IDirectInput8A_QueryInterface is access procedure
     (THIS:ACCESS IDirectInput8A;
      riid:win32.objbase.REFIID;
      ppvObj:access LPVOID
     );
   pragma convention(STDCALL,af_IDirectInput8A_QueryInterface);
    
   type af_IDirectInput8A_AddRef is access function
     (THIS:ACCESS IDirectInput8A)return ULONG;
   pragma convention(STDCALL,af_IDirectInput8A_AddRef);
    
   type af_IDirectInput8A_Release is access function
     (THIS:ACCESS IDirectInput8A)return Ulong;
   pragma convention(STDCALL,af_IDirectInput8A_Release);
    
   --IDirectInput8A Methods--
   type af_IDirectInput8A_CreateDevice is access procedure
     (THIS:ACCESS IDirectInput8A;
      guid:Win32.objbase.REFGUID;
      id  :ACCESS LPIDIRECTINPUTDEVICEA;
      PIK :ACCESS Win32.Objbase.IUNKNOWN
     );
   pragma convention(STDCALL,af_IDirectInput8A_CreateDevice);
    
   type af_IDirectInput8A_EnumDevices is access procedure
     (THIS:ACCESS IDirectInput8A;
      dw  :DWORD;
      edcb:LPDIENUMDEVICESCALLBACKA;
      addr:LPVOID;
      dw2 :DWORD
     );
   pragma convention(STDCALL,af_IDirectInput8A_EnumDevices);
    
   type af_IDirectInput8A_GetDeviceStatus is access procedure
     (THIS:ACCESS IDirectInput8A;
      guid:Win32.Objbase.REFGUID
     );
   pragma convention(STDCALL,af_IDirectInput8A_GetDeviceStatus);
    
   type af_IDirectInput8A_RunControlPanel is access procedure
     (THIS:ACCESS IDirectInput8A;
      hw:Win32.windef.HWND;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInput8A_RunControlPanel);
    
   type af_IDirectInput8A_Initialize is access procedure
     (THIS:ACCESS IDirectInput8A;
      HINST:Win32.windef.HINSTANCE;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInput8A_Initialize);
    
   --IDirectInput2 Methods--
   type af_IDirectInput8A_FindDevice is access procedure
     (THIS:ACCESS IDirectInput8A;
      guid:win32.objbase.REFGUID;
      str:LPCSTR;
      gid:win32.objbase.LPGUID
     );
        
   --IDirectInput8 Methods--
   type af_IDirectInput8A_EnumDevicesBySemantics is access procedure
     (THIS:ACCESS IDirectInput8A;
      STR:LPCSTR;
      AF:LPDIACTIONFORMATA;
      EDS:LPDIENUMDEVICESBYSEMANTICSCBA;
      ADDR:LPVOID;
      DW:DWORD
     );
   pragma convention(STDCALL,af_IDirectInput8A_EnumDevicesBySemantics);
    
   type af_IDirectInput8A_ConfigureDevices is access procedure
     (THIS:ACCESS IDirectInput8A;
      CDCB:LPDICONFIGUREDEVICESCALLBACK;
      CDS:LPDICONFIGUREDEVICESPARAMSA;
      DW:DWORD;
      ADDR:LPVOID
     );
   PRAGMA CONVENTION(STDCALL,af_IDirectInput8A_ConfigureDevices);
    
   --º¯Êý±í--
   type IDirectInput8A_VTBL is record
      --IUNKNOWN METHODS--
      QueryInterface:af_IDirectInput8A_QueryInterface;
      AddRef:af_IDirectInput8A_AddRef;
      Release:af_IDirectInput8A_Release;
      --IDirectInput Methods--
      CreateDevice:af_IDirectInput8A_CreateDevice;
      EnumDevices:af_IDirectInput8A_EnumDevices;
      GetDeviceStatus:af_IDirectInput8A_GetDeviceStatus;
      RunControlPanel:af_IDirectInput8A_RunControlPanel;
      Initialize:af_IDirectInput8A_Initialize;
      --IDirectInput2 Methods--
      FindDevice:af_IDirectInput8A_FindDevice;
      --IDirectInput8 Methods--
      EnumDevicesBySemantics:af_IDirectInput8A_EnumDevicesBySemantics;
      ConfigureDevices:af_IDirectInput8A_ConfigureDevices;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInput8A_VTBL);
    
   type LPIDirectInput8A_VTBL is access all IDirectInput8A_VTBL;
    
   type IDirectInput8A is record
      lpvtbl:LPIDirectInput8A_VTBL;
   end record;
   pragma convention(C_PASS_BY_COPY,IDirectInput8A);
    
   type    LPDirectInput8A  is access all IDirectInput8A;
   type    LPCDirectInput8A is access constant IDirectInput8A;
    
   subtype IDirectInput8    is IDirectInput8A;
   subtype LPDirectInput8   is LPDirectInputA;
   subtype LPCDirectInput8  is LPCDirectInputA;
    
   --Line:2685
   --KEY API:
   FUNCTION DirectInput8Create(hinst:WIN32.WINDEF.HINSTANCE;
                               dwVersion:DWORD;
                               riidltf:WIN32.OBJBASE.REFIID;
                               ppvOut:access LPVOID;
                               punkOuter:access WIN32.OBJBASE.IUNKNOWN
                              ) RETURN WIN32.OBJBASE.HRESULT;
   pragma import(C,DirectInput8Create,"DirectInput8Create");
    
   --Line:2688..2689
   FUNCTION DirectInputCreateA(hinst:WIN32.WINDEF.HINSTANCE;
                               dwVersion:DWORD;
                               ppDI:access LPDIRECTINPUTA;
                               punkOuter:access win32.objbase.IUNKNOWN
                              ) return WIN32.OBJBASE.HRESULT;
    
   pragma import(C,DirectInputCreateA,"DirectInputCreateA");
    
   FUNCTION DirectInputCreateW(hinst:WIN32.WINDEF.HINSTANCE;
                               dwVersion:DWORD;
                               ppDI:access LPDIRECTINPUTW;
                               punkOuter:access win32.objbase.IUNKNOWN
                              ) return WIN32.OBJBASE.HRESULT;
    
   pragma import(C,DirectInputCreateW,"DirectInputCreateW");
    
    
   --Line:2696
   FUNCTION DirectInputCreateEx(hinst:WIN32.WINDEF.HINSTANCE;
                                dwVersion:DWORD;
                                riidltf:WIN32.OBJBASE.REFIID;
                                ppvOut:access LPVOID;
                                punkOuter:access WIN32.OBJBASE.IUNKNOWN
                               ) RETURN WIN32.OBJBASE.HRESULT;
   pragma import(C,DirectInputCreateEx,"DirectInputCreateEx");
    
   --Line:2693
   FUNCTION DirectInputCreate(hinst:WIN32.WINDEF.HINSTANCE;
                              dwVersion:DWORD;
                              ppDI:access LPDIRECTINPUTA;
                              punkOuter:access win32.objbase.IUNKNOWN
                             ) return WIN32.OBJBASE.HRESULT renames DirectInputCreateA;
    
   -------------------------------------
   --Keyboard Physical Keyboard Device--
   -------------------------------------
    
   --Line:2985..3128
   DIKEYBOARD_ESCAPE                       :constant:=16#81000401#;
   DIKEYBOARD_1                            :constant:=16#81000402#;
   DIKEYBOARD_2                            :constant:=16#81000403#;
   DIKEYBOARD_3                            :constant:=16#81000404#;
   DIKEYBOARD_4                            :constant:=16#81000405#;
   DIKEYBOARD_5                            :constant:=16#81000406#;
   DIKEYBOARD_6                            :constant:=16#81000407#;
   DIKEYBOARD_7                            :constant:=16#81000408#;
   DIKEYBOARD_8                            :constant:=16#81000409#;
   DIKEYBOARD_9                            :constant:=16#8100040A#;
   DIKEYBOARD_0                            :constant:=16#8100040B#;
   DIKEYBOARD_MINUS                        :constant:=16#8100040C#;    -- - on main keyboard --
   DIKEYBOARD_EQUALS                       :constant:=16#8100040D#;
   DIKEYBOARD_BACK                         :constant:=16#8100040E#;    -- backspace --
   DIKEYBOARD_TAB                          :constant:=16#8100040F#;
   DIKEYBOARD_Q                            :constant:=16#81000410#;
   DIKEYBOARD_W                            :constant:=16#81000411#;
   DIKEYBOARD_E                            :constant:=16#81000412#;
   DIKEYBOARD_R                            :constant:=16#81000413#;
   DIKEYBOARD_T                            :constant:=16#81000414#;
   DIKEYBOARD_Y                            :constant:=16#81000415#;
   DIKEYBOARD_U                            :constant:=16#81000416#;
   DIKEYBOARD_I                            :constant:=16#81000417#;
   DIKEYBOARD_O                            :constant:=16#81000418#;
   DIKEYBOARD_P                            :constant:=16#81000419#;
   DIKEYBOARD_LBRACKET                     :constant:=16#8100041A#;
   DIKEYBOARD_RBRACKET                     :constant:=16#8100041B#;
   DIKEYBOARD_RETURN                       :constant:=16#8100041C#;    -- Enter on main keyboard --
   DIKEYBOARD_LCONTROL                     :constant:=16#8100041D#;
   DIKEYBOARD_A                            :constant:=16#8100041E#;
   DIKEYBOARD_S                            :constant:=16#8100041F#;
   DIKEYBOARD_D                            :constant:=16#81000420#;
   DIKEYBOARD_F                            :constant:=16#81000421#;
   DIKEYBOARD_G                            :constant:=16#81000422#;
   DIKEYBOARD_H                            :constant:=16#81000423#;
   DIKEYBOARD_J                            :constant:=16#81000424#;
   DIKEYBOARD_K                            :constant:=16#81000425#;
   DIKEYBOARD_L                            :constant:=16#81000426#;
   DIKEYBOARD_SEMICOLON                    :constant:=16#81000427#;
   DIKEYBOARD_APOSTROPHE                   :constant:=16#81000428#;
   DIKEYBOARD_GRAVE                        :constant:=16#81000429#;   -- accent grave --
   DIKEYBOARD_LSHIFT                       :constant:=16#8100042A#;
   DIKEYBOARD_BACKSLASH                    :constant:=16#8100042B#;
   DIKEYBOARD_Z                            :constant:=16#8100042C#;
   DIKEYBOARD_X                            :constant:=16#8100042D#;
   DIKEYBOARD_C                            :constant:=16#8100042E#;
   DIKEYBOARD_V                            :constant:=16#8100042F#;
   DIKEYBOARD_B                            :constant:=16#81000430#;
   DIKEYBOARD_N                            :constant:=16#81000431#;
   DIKEYBOARD_M                            :constant:=16#81000432#;
   DIKEYBOARD_COMMA                        :constant:=16#81000433#;
   DIKEYBOARD_PERIOD                       :constant:=16#81000434#;   -- . on main keyboard --
   DIKEYBOARD_SLASH                        :constant:=16#81000435#;    -- / on main keyboard --
   DIKEYBOARD_RSHIFT                       :constant:=16#81000436#;
   DIKEYBOARD_MULTIPLY                     :constant:=16#81000437#;    -- * on numeric keypad --
   DIKEYBOARD_LMENU                        :constant:=16#81000438#;    -- left Alt --
   DIKEYBOARD_SPACE                        :constant:=16#81000439#;
   DIKEYBOARD_CAPITAL                      :constant:=16#8100043A#;
   DIKEYBOARD_F1                           :constant:=16#8100043B#;
   DIKEYBOARD_F2                           :constant:=16#8100043C#;
   DIKEYBOARD_F3                           :constant:=16#8100043D#;
   DIKEYBOARD_F4                           :constant:=16#8100043E#;
   DIKEYBOARD_F5                           :constant:=16#8100043F#;
   DIKEYBOARD_F6                           :constant:=16#81000440#;
   DIKEYBOARD_F7                           :constant:=16#81000441#;
   DIKEYBOARD_F8                           :constant:=16#81000442#;
   DIKEYBOARD_F9                           :constant:=16#81000443#;
   DIKEYBOARD_F10                          :constant:=16#81000444#;
   DIKEYBOARD_NUMLOCK                      :constant:=16#81000445#;
   DIKEYBOARD_SCROLL                       :constant:=16#81000446#;    -- Scroll Lock --
   DIKEYBOARD_NUMPAD7                      :constant:=16#81000447#;
   DIKEYBOARD_NUMPAD8                      :constant:=16#81000448#;
   DIKEYBOARD_NUMPAD9                      :constant:=16#81000449#;
   DIKEYBOARD_SUBTRACT                     :constant:=16#8100044A#;   -- - on numeric keypad --
   DIKEYBOARD_NUMPAD4                      :constant:=16#8100044B#;
   DIKEYBOARD_NUMPAD5                      :constant:=16#8100044C#;
   DIKEYBOARD_NUMPAD6                      :constant:=16#8100044D#;
   DIKEYBOARD_ADD                          :constant:=16#8100044E#;    -- + on numeric keypad --
   DIKEYBOARD_NUMPAD1                      :constant:=16#8100044F#;
   DIKEYBOARD_NUMPAD2                      :constant:=16#81000450#;
   DIKEYBOARD_NUMPAD3                      :constant:=16#81000451#;
   DIKEYBOARD_NUMPAD0                      :constant:=16#81000452#;
   DIKEYBOARD_DECIMAL                      :constant:=16#81000453#;    -- . on numeric keypad --
   DIKEYBOARD_OEM_102                      :constant:=16#81000456#;    -- <> or \# or  on RT 102-key keyboard (Non-U.S.) --
   DIKEYBOARD_F11                          :constant:=16#81000457#;
   DIKEYBOARD_F12                          :constant:=16#81000458#;
   DIKEYBOARD_F13                          :constant:=16#81000464#;    --                     (NEC PC98) --
   DIKEYBOARD_F14                          :constant:=16#81000465#;    --                     (NEC PC98) --
   DIKEYBOARD_F15                          :constant:=16#81000466#;    --                     (NEC PC98) --
   DIKEYBOARD_KANA                         :constant:=16#81000470#;    -- (Japanese keyboard)            --
   DIKEYBOARD_ABNT_C1                      :constant:=16#81000473#;    -- /? on Brazilian keyboard --
   DIKEYBOARD_CONVERT                      :constant:=16#81000479#;    -- (Japanese keyboard)            --
   DIKEYBOARD_NOCONVERT                    :constant:=16#8100047B#;    -- (Japanese keyboard)            --
   DIKEYBOARD_YEN                          :constant:=16#8100047D#;    -- (Japanese keyboard)            --
   DIKEYBOARD_ABNT_C2                      :constant:=16#8100047E#;    -- Numpad . on Brazilian keyboard --
   DIKEYBOARD_NUMPADEQUALS                 :constant:=16#8100048D#;    -- = on numeric keypad (NEC PC98) --
   DIKEYBOARD_PREVTRACK                    :constant:=16#81000490#;    -- Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) --
   DIKEYBOARD_AT                           :constant:=16#81000491#;    --                     (NEC PC98) --
   DIKEYBOARD_COLON                        :constant:=16#81000492#;    --                     (NEC PC98) --
   DIKEYBOARD_UNDERLINE                    :constant:=16#81000493#;    --                     (NEC PC98) --
   DIKEYBOARD_KANJI                        :constant:=16#81000494#;    -- (Japanese keyboard)            --
   DIKEYBOARD_STOP                         :constant:=16#81000495#;    --                     (NEC PC98) --
   DIKEYBOARD_AX                           :constant:=16#81000496#;    --                     (Japan AX) --
   DIKEYBOARD_UNLABELED                    :constant:=16#81000497#;    --                        (J3100) --
   DIKEYBOARD_NEXTTRACK                    :constant:=16#81000499#;    -- Next Track --
   DIKEYBOARD_NUMPADENTER                  :constant:=16#8100049C#;    -- Enter on numeric keypad --
   DIKEYBOARD_RCONTROL                     :constant:=16#8100049D#;
   DIKEYBOARD_MUTE                         :constant:=16#810004A0#;    -- Mute --
   DIKEYBOARD_CALCULATOR                   :constant:=16#810004A1#;    -- Calculator --
   DIKEYBOARD_PLAYPAUSE                    :constant:=16#810004A2#;    -- Play / Pause --
   DIKEYBOARD_MEDIASTOP                    :constant:=16#810004A4#;    -- Media Stop --
   DIKEYBOARD_VOLUMEDOWN                   :constant:=16#810004AE#;    -- Volume - --
   DIKEYBOARD_VOLUMEUP                     :constant:=16#810004B0#;    -- Volume + --
   DIKEYBOARD_WEBHOME                      :constant:=16#810004B2#;    -- Web home --
   DIKEYBOARD_NUMPADCOMMA                  :constant:=16#810004B3#;    -- , on numeric keypad (NEC PC98) --
   DIKEYBOARD_DIVIDE                       :constant:=16#810004B5#;    -- / on numeric keypad --
   DIKEYBOARD_SYSRQ                        :constant:=16#810004B7#;
   DIKEYBOARD_RMENU                        :constant:=16#810004B8#;    -- right Alt --
   DIKEYBOARD_PAUSE                        :constant:=16#810004C5#;    -- Pause --
   DIKEYBOARD_HOME                         :constant:=16#810004C7#;    -- Home on arrow keypad --
   DIKEYBOARD_UP                           :constant:=16#810004C8#;    -- UpArrow on arrow keypad --
   DIKEYBOARD_PRIOR                        :constant:=16#810004C9#;    -- PgUp on arrow keypad --
   DIKEYBOARD_LEFT                         :constant:=16#810004CB#;    -- LeftArrow on arrow keypad --
   DIKEYBOARD_RIGHT                        :constant:=16#810004CD#;    -- RightArrow on arrow keypad --
   DIKEYBOARD_END                          :constant:=16#810004CF#;    -- End on arrow keypad --
   DIKEYBOARD_DOWN                         :constant:=16#810004D0#;    -- DownArrow on arrow keypad --
   DIKEYBOARD_NEXT                         :constant:=16#810004D1#;    -- PgDn on arrow keypad --
   DIKEYBOARD_INSERT                       :constant:=16#810004D2#;    -- Insert on arrow keypad --
   DIKEYBOARD_DELETE                       :constant:=16#810004D3#;    -- Delete on arrow keypad --
   DIKEYBOARD_LWIN                         :constant:=16#810004DB#;    -- Left Windows key --
   DIKEYBOARD_RWIN                         :constant:=16#810004DC#;    -- Right Windows key --
   DIKEYBOARD_APPS                         :constant:=16#810004DD#;    -- AppMenu key --
   DIKEYBOARD_POWER                        :constant:=16#810004DE#;    -- System Power --
   DIKEYBOARD_SLEEP                        :constant:=16#810004DF#;    -- System Sleep --
   DIKEYBOARD_WAKE                         :constant:=16#810004E3#;    -- System Wake --
   DIKEYBOARD_WEBSEARCH                    :constant:=16#810004E5#;    -- Web Search --
   DIKEYBOARD_WEBFAVORITES                 :constant:=16#810004E6#;    -- Web Favorites --
   DIKEYBOARD_WEBREFRESH                   :constant:=16#810004E7#;    -- Web Refresh --
   DIKEYBOARD_WEBSTOP                      :constant:=16#810004E8#;    -- Web Stop --
   DIKEYBOARD_WEBFORWARD                   :constant:=16#810004E9#;    -- Web Forward --
   DIKEYBOARD_WEBBACK                      :constant:=16#810004EA#;    -- Web Back --
   DIKEYBOARD_MYCOMPUTER                   :constant:=16#810004EB#;    -- My Computer --
   DIKEYBOARD_MAIL                         :constant:=16#810004EC#;    -- Mail --
   DIKEYBOARD_MEDIASELECT                  :constant:=16#810004ED#;    -- Media Select --
  
   -------------------------------
   --MOUSE Physical Mouse Device--
   -------------------------------
    
    
   ------------------
   -- Return Codes --
   ------------------
   DI_OK              :CONSTANT:=0;
   DI_NOTATTACHED     :CONSTANT:=1;
   DI_BUFFEROVERFLOW  :CONSTANT:=1;
   DI_PROPNOEFFECT    :CONSTANT:=1;
   DI_NOEFFECT        :CONSTANT:=1;
    
   DI_POLLEDDEVICE               :CONSTANT :=16#00000002#;
   DI_DOWNLOADSKIPPED            :CONSTANT :=16#00000003#;
   DI_EFFECTRESTARTED            :CONSTANT :=16#00000004#;
   DI_TRUNCATED                  :CONSTANT :=16#00000008#;
   DI_SETTINGSNOTSAVED           :CONSTANT :=16#0000000B#;
   DI_TRUNCATEDANDRESTARTED      :constant :=16#0000000C#;
   DI_WRITEPROTECT               :constant :=16#00000013#;
    
    
    
   FUNCTION MAKE_HRESULT(sev, fac, code : WORD) RETURN WIN32.OBJBASE.HRESULT;
   FUNCTION MAKE_HRESULT(sev, fac, code : DWORD) RETURN WIN32.OBJBASE.HRESULT;
    
   DIERR_OLDDIRECTINPUTVERSION   :constant :=-2147_0237_46;
   --MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, 1150); --ERROR_OLD_WIN_VERSION
        
   DIERR_BETADIRECTINPUTVERSION  :constant :=-2147_0237_43;
   --MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, 1153); --ERROR_RMODE_APP

   DIERR_BADDRIVERVER            :constant :=-2147_0247_77;
   --MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL);

   DIERR_DEVICENOTREG            :constant :=-2147_2211_64; --REGDB_E_CLASSNOTREG;

   DIERR_NOTFOUND                :constant :=-2147_0248_94;
   --MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND);

   DIERR_OBJECTNOTFOUND          :constant :=-2147_0248_94;
   --MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND);

   DIERR_INVALIDPARAM            :constant :=-2147_0248_09;

   DIERR_NOINTERFACE             :constant :=-2147_4672_62;

   DIERR_GENERIC                 :constant :=-2147_4672_59;

   DIERR_OUTOFMEMORY             :constant :=-2147_0248_82;

   DIERR_UNSUPPORTED             :constant :=-2147_4672_63;

   DIERR_NOTINITIALIZED          :constant :=-2147_0248_75;
   --MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY);

   DIERR_ALREADYINITIALIZED      :constant :=-2147_0236_49;
   --MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, 1247);

   DIERR_NOAGGREGATION           :constant :=-2147_2212_32;

   DIERR_OTHERAPPHASPRIO         :constant :=-2147_0248_91;

   DIERR_INPUTLOST               :constant :=-2147_0248_66;
   --MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT);

   DIERR_ACQUIRED                :constant :=-2147_0247_26;
   --MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY);

   DIERR_NOTACQUIRED             :constant :=-2147_0248_84;
   --MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS);

   DIERR_READONLY               :constant :=-2147_0248_91;

   DIERR_HANDLEEXISTS           :constant :=-2147_0248_91;

   E_PENDING                    :constant :=    16#8000000A#;

   DIERR_INSUFFICIENTPRIVS      :constant :=    16#80040200#;

   DIERR_DEVICEFULL             :constant :=    16#80040201#;

   DIERR_MOREDATA               :constant :=    16#80040202#;

   DIERR_NOTDOWNLOADED          :constant :=    16#80040203#;

   DIERR_HASEFFECTS             :constant :=    16#80040204#;

   DIERR_NOTEXCLUSIVEACQUIRED   :constant :=    16#80040205#;

   DIERR_INCOMPLETEEFFECT       :constant :=    16#80040206#;

   DIERR_NOTBUFFERED            :constant :=    16#80040207#;

   DIERR_EFFECTPLAYING          :constant :=    16#80040208#;

   DIERR_UNPLUGGED              :constant :=    16#80040209#;

   DIERR_REPORTFULL             :constant :=    16#8004020A#;

   DIERR_MAPFILEFAIL            :constant :=    16#8004020B#;



   DIMOUSE_XAXISAB    :constant WIN32.DWORD:=(16#82000200# or 0 );      -- X Axis-absolute: Some mice natively report absolute coor   DInates       -- 
   DIMOUSE_YAXISAB    :constant WIN32.DWORD:=(16#82000200# or 4 );      -- Y Axis-absolute: Some mice natively report absolute coor   DInates      --
   DIMOUSE_XAXIS      :constant WIN32.DWORD:=(16#82000300# or 0 );      -- X Axis      --
   DIMOUSE_YAXIS      :constant WIN32.DWORD:=(16#82000300# or 4 );      -- Y Axis      --
   DIMOUSE_WHEEL      :constant WIN32.DWORD:=(16#82000300# or 8 );      -- Z Axis      --
   DIMOUSE_BUTTON0    :constant WIN32.DWORD:=(16#82000400# or 12);      -- Button 0      --
   DIMOUSE_BUTTON1    :constant WIN32.DWORD:=(16#82000400# or 13);      -- Button 1      --
   DIMOUSE_BUTTON2    :constant WIN32.DWORD:=(16#82000400# or 14);      -- Button 2      --
   DIMOUSE_BUTTON3    :constant WIN32.DWORD:=(16#82000400# or 15);      -- Button 3      --
   DIMOUSE_BUTTON4    :constant WIN32.DWORD:=(16#82000400# or 16);      -- Button 4      --
   DIMOUSE_BUTTON5    :constant WIN32.DWORD:=(16#82000400# or 17);      -- Button 5      --
   DIMOUSE_BUTTON6    :constant WIN32.DWORD:=(16#82000400# or 18);      -- Button 6      --
   DIMOUSE_BUTTON7    :constant WIN32.DWORD:=(16#82000400# or 19);      -- Button 7      --



   DIVOICE_CHANNEL1    :constant:=                    16#83000401#;
   DIVOICE_CHANNEL2      :constant:=                  16#83000402#;
   DIVOICE_CHANNEL3     :constant:=                   16#83000403#;
   DIVOICE_CHANNEL4      :constant:=                  16#83000404#;
   DIVOICE_CHANNEL5      :constant:=                  16#83000405#;
   DIVOICE_CHANNEL6      :constant:=                  16#83000406#;
   DIVOICE_CHANNEL7      :constant:=                  16#83000407#;
   DIVOICE_CHANNEL8      :constant:=                  16#83000408#;
   DIVOICE_TEAM          :constant:=                  16#83000409#;
   DIVOICE_ALL          :constant:=                   16#8300040A#;
   DIVOICE_RECORDMUTE    :constant:=                  16#8300040B#;
   DIVOICE_PLAYBACKMUTE   :constant:=                 16#8300040C#;
   DIVOICE_TRANSMIT        :constant:=                16#8300040D#;

   DIVOICE_VOICECOMMAND     :constant:=               16#83000410#;


   DIVIRTUAL_DRIVING_RACE   :constant:=               16#01000000#;
   DIAXIS_DRIVINGR_STEER      :constant:=             16#01008A01#;  -- Steering      --
   DIAXIS_DRIVINGR_ACCELERATE :constant:=             16#01039202#;  -- Accelerate      --
   DIAXIS_DRIVINGR_BRAKE      :constant:=             16#01041203#;  -- Brake-Axis      --
   DIBUTTON_DRIVINGR_SHIFTUP  :constant:=             16#01000C01#;  -- Shift to next higher gear      --
   DIBUTTON_DRIVINGR_SHIFTDOWN  :constant:=           16#01000C02#;  -- Shift to next lower gear      --
   DIBUTTON_DRIVINGR_VIEW     :constant:=             16#01001C03#;  -- Cycle through view options      --
   DIBUTTON_DRIVINGR_MENU    :constant:=              16#010004FD#;  -- Show menu options      --


   DIAXIS_DRIVINGR_ACCEL_AND_BRAKE :constant:=        16#01014A04#;  -- Some devices combine accelerate and brake in a single axis      --
   DIHATSWITCH_DRIVINGR_GLANCE   :constant:=          16#01004601#;  -- Look around      --
   DIBUTTON_DRIVINGR_BRAKE     :constant:=            16#01004C04#;  -- Brake-button      --
   DIBUTTON_DRIVINGR_DASHBOARD  :constant:=           16#01004405#;  -- Select next dashboard option      --
   DIBUTTON_DRIVINGR_AIDS    :constant:=              16#01004406#;  -- Driver correction aids      --
   DIBUTTON_DRIVINGR_MAP       :constant:=            16#01004407#;  --    DIsplay Driving Map      --
   DIBUTTON_DRIVINGR_BOOST     :constant:=            16#01004408#;  -- Turbo Boost      --
   DIBUTTON_DRIVINGR_PIT      :constant:=             16#01004409#;  -- Pit stop notification      --
   DIBUTTON_DRIVINGR_ACCELERATE_LINK :constant:=      16#0103D4E0#;  -- Fallback Accelerate button      --
   DIBUTTON_DRIVINGR_STEER_LEFT_LINK  :constant:=     16#0100CCE4#;  -- Fallback Steer Left button      --
   DIBUTTON_DRIVINGR_STEER_RIGHT_LINK :constant:=     16#0100CCEC#;  -- Fallback Steer Right button      --
   DIBUTTON_DRIVINGR_GLANCE_LEFT_LINK :constant:=     16#0107C4E4#;  -- Fallback Glance Left button      --
   DIBUTTON_DRIVINGR_GLANCE_RIGHT_LINK :constant:=    16#0107C4EC#;  -- Fallback Glance Right button      --
   DIBUTTON_DRIVINGR_DEVICE       :constant:=         16#010044FE#;  -- Show input device and controls      --
   DIBUTTON_DRIVINGR_PAUSE       :constant:=          16#010044FC#;  -- Start / Pause / Restart game      --


   DIVIRTUAL_DRIVING_COMBAT  :constant:=              16#02000000#;
   DIAXIS_DRIVINGC_STEER       :constant:=            16#02008A01#;  -- Steering       --
   DIAXIS_DRIVINGC_ACCELERATE  :constant:=            16#02039202#;  -- Accelerate      --
   DIAXIS_DRIVINGC_BRAKE      :constant:=             16#02041203#;  -- Brake-axis      --
   DIBUTTON_DRIVINGC_FIRE     :constant:=             16#02000C01#;  -- Fire      --
   DIBUTTON_DRIVINGC_WEAPONS  :constant:=             16#02000C02#;  -- Select next weapon      --
   DIBUTTON_DRIVINGC_TARGET   :constant:=             16#02000C03#;  -- Select next available target      --
   DIBUTTON_DRIVINGC_MENU     :constant:=             16#020004FD#;  -- Show menu options      --


   DIAXIS_DRIVINGC_ACCEL_AND_BRAKE  :constant:=       16#02014A04#;  -- Some devices combine accelerate and brake in a single axis      --
   DIHATSWITCH_DRIVINGC_GLANCE    :constant:=         16#02004601#;  -- Look around      --
   DIBUTTON_DRIVINGC_SHIFTUP      :constant:=         16#02004C04#;  -- Shift to next higher gear      --
 

   DIBUTTON_DRIVINGC_SHIFTDOWN             :constant:=16#02004C05#;  -- Shift to next lower gear #  --
   DIBUTTON_DRIVINGC_DASHBOARD             :constant:=16#02004406#;  -- Select next dashboard option #  --
   DIBUTTON_DRIVINGC_AIDS                  :constant:=16#02004407#;  -- Driver correction aids #  --
   DIBUTTON_DRIVINGC_BRAKE                 :constant:=16#02004C08#;  -- Brake-button #  --
   DIBUTTON_DRIVINGC_FIRESECONDARY         :constant:=16#02004C09#;  -- Alternative fire button #  --
   DIBUTTON_DRIVINGC_ACCELERATE_LINK       :constant:=16#0203D4E0#;  -- Fallback Accelerate button #  --
   DIBUTTON_DRIVINGC_STEER_LEFT_LINK       :constant:=16#0200CCE4#;  -- Fallback Steer Left button #  --
   DIBUTTON_DRIVINGC_STEER_RIGHT_LINK      :constant:=16#0200CCEC#;  -- Fallback Steer Right button #  --
   DIBUTTON_DRIVINGC_GLANCE_LEFT_LINK      :constant:=16#0207C4E4#;  -- Fallback Glance Left button #  --
   DIBUTTON_DRIVINGC_GLANCE_RIGHT_LINK     :constant:=16#0207C4EC#;  -- Fallback Glance Right button #  --
   DIBUTTON_DRIVINGC_DEVICE                :constant:=16#020044FE#;  -- Show input device and controls #  --
   DIBUTTON_DRIVINGC_PAUSE                 :constant:=16#020044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_DRIVING_TANK                  :constant:=16#03000000#;
   DIAXIS_DRIVINGT_STEER                   :constant:=16#03008A01#;  -- Turn tank left / right #  --
   DIAXIS_DRIVINGT_BARREL                  :constant:=16#03010202#;  -- Raise / lower barrel #  --
   DIAXIS_DRIVINGT_ACCELERATE              :constant:=16#03039203#;  -- AcceleratE#;  --
   DIAXIS_DRIVINGT_ROTATE                  :constant:=16#03020204#;  -- Turn barrel left / right #  --
   DIBUTTON_DRIVINGT_FIRE                  :constant:=16#03000C01#;  -- FirE#;  --
   DIBUTTON_DRIVINGT_WEAPONS               :constant:=16#03000C02#;  -- Select next weapon #  --
   DIBUTTON_DRIVINGT_TARGET                :constant:=16#03000C03#;  -- Selects next available target #  --
   DIBUTTON_DRIVINGT_MENU                  :constant:=16#030004FD#;  -- Show menu options #  --


   DIHATSWITCH_DRIVINGT_GLANCE             :constant:=16#03004601#;  -- Look arounD#;  --
   DIAXIS_DRIVINGT_BRAKE                   :constant:=16#03045205#;  -- Brake-axis #  --
   DIAXIS_DRIVINGT_ACCEL_AND_BRAKE         :constant:=16#03014A06#;  -- Some devices combine accelerate and brake in a single axis #  --
   DIBUTTON_DRIVINGT_VIEW                  :constant:=16#03005C04#;  -- Cycle through view options #  --
   DIBUTTON_DRIVINGT_DASHBOARD             :constant:=16#03005C05#;  -- Select next dashboard option #  --
   DIBUTTON_DRIVINGT_BRAKE                 :constant:=16#03004C06#;  -- Brake-button #  --
   DIBUTTON_DRIVINGT_FIRESECONDARY         :constant:=16#03004C07#;  -- Alternative fire button #  --
   DIBUTTON_DRIVINGT_ACCELERATE_LINK       :constant:=16#0303D4E0#;  -- Fallback Accelerate button #  --
   DIBUTTON_DRIVINGT_STEER_LEFT_LINK       :constant:=16#0300CCE4#;  -- Fallback Steer Left button #  --
   DIBUTTON_DRIVINGT_STEER_RIGHT_LINK      :constant:=16#0300CCEC#;  -- Fallback Steer Right button #  --
   DIBUTTON_DRIVINGT_BARREL_UP_LINK        :constant:=16#030144E0#;  -- Fallback Barrel up button #  --
   DIBUTTON_DRIVINGT_BARREL_DOWN_LINK      :constant:=16#030144E8#;  -- Fallback Barrel down button #  --
   DIBUTTON_DRIVINGT_ROTATE_LEFT_LINK      :constant:=16#030244E4#;  -- Fallback Rotate left button #  --
   DIBUTTON_DRIVINGT_ROTATE_RIGHT_LINK     :constant:=16#030244EC#;  -- Fallback Rotate right button #  --
   DIBUTTON_DRIVINGT_GLANCE_LEFT_LINK      :constant:=16#0307C4E4#;  -- Fallback Glance Left button #  --
   DIBUTTON_DRIVINGT_GLANCE_RIGHT_LINK     :constant:=16#0307C4EC#;  -- Fallback Glance Right button #  --
   DIBUTTON_DRIVINGT_DEVICE                :constant:=16#030044FE#;  -- Show input device and controls #  --
   DIBUTTON_DRIVINGT_PAUSE                 :constant:=16#030044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_FLYING_CIVILIAN               :constant:=16#04000000#;
   DIAXIS_FLYINGC_BANK                     :constant:=16#04008A01#;  -- Roll ship left / right #  --
   DIAXIS_FLYINGC_PITCH                    :constant:=16#04010A02#;  -- Nose up / down #  --
   DIAXIS_FLYINGC_THROTTLE                 :constant:=16#04039203#;  -- ThrottlE#;  --
   DIBUTTON_FLYINGC_VIEW                   :constant:=16#04002401#;  -- Cycle through view options #  --
   DIBUTTON_FLYINGC_DISPLAY                :constant:=16#04002402#;  -- Select next dashboard / heads up     DIsplay option #  --
   DIBUTTON_FLYINGC_GEAR                   :constant:=16#04002C03#;  -- Gear up / down #  --
   DIBUTTON_FLYINGC_MENU                   :constant:=16#040004FD#;  -- Show menu options #  --


   DIHATSWITCH_FLYINGC_GLANCE              :constant:=16#04004601#;  -- Look arounD#;  --
   DIAXIS_FLYINGC_BRAKE                    :constant:=16#04046A04#;  -- Apply BrakE#;  --
   DIAXIS_FLYINGC_RUDDER                   :constant:=16#04025205#;  -- Yaw ship left/right #  --
   DIAXIS_FLYINGC_FLAPS                    :constant:=16#04055A06#;  -- Flaps #  --
   DIBUTTON_FLYINGC_FLAPSUP                :constant:=16#04006404#;  -- Increment stepping up until fully retracteD#;  --
   DIBUTTON_FLYINGC_FLAPSDOWN              :constant:=16#04006405#;  -- Decrement stepping down until fully extendeD#;  --
   DIBUTTON_FLYINGC_BRAKE_LINK             :constant:=16#04046CE0#;  -- Fallback brake button #  --
   DIBUTTON_FLYINGC_FASTER_LINK            :constant:=16#0403D4E0#;  -- Fallback throttle up button #  --
   DIBUTTON_FLYINGC_SLOWER_LINK            :constant:=16#0403D4E8#;  -- Fallback throttle down button #  --
   DIBUTTON_FLYINGC_GLANCE_LEFT_LINK       :constant:=16#0407C4E4#;  -- Fallback Glance Left button #  --
   DIBUTTON_FLYINGC_GLANCE_RIGHT_LINK      :constant:=16#0407C4EC#;  -- Fallback Glance Right button #  --
   DIBUTTON_FLYINGC_GLANCE_UP_LINK         :constant:=16#0407C4E0#;  -- Fallback Glance Up button #  --
   DIBUTTON_FLYINGC_GLANCE_DOWN_LINK       :constant:=16#0407C4E8#;  -- Fallback Glance Down button #  --
   DIBUTTON_FLYINGC_DEVICE                 :constant:=16#040044FE#;  -- Show input device and controls #  --
   DIBUTTON_FLYINGC_PAUSE                  :constant:=16#040044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_FLYING_MILITARY               :constant:=16#05000000#;
   DIAXIS_FLYINGM_BANK                     :constant:=16#05008A01#;  -- Bank - Roll ship left / right #  --
   DIAXIS_FLYINGM_PITCH                    :constant:=16#05010A02#;  -- Pitch - Nose up / down #  --
   DIAXIS_FLYINGM_THROTTLE                 :constant:=16#05039203#;  -- Throttle - faster / slower #  --
   DIBUTTON_FLYINGM_FIRE                   :constant:=16#05000C01#;  -- FirE#;  --
   DIBUTTON_FLYINGM_WEAPONS                :constant:=16#05000C02#;  -- Select next weapon #  --
   DIBUTTON_FLYINGM_TARGET                 :constant:=16#05000C03#;  -- Selects next available target #  --
   DIBUTTON_FLYINGM_MENU                   :constant:=16#050004FD#;  -- Show menu options #  --


   DIHATSWITCH_FLYINGM_GLANCE              :constant:=16#05004601#;  -- Look arounD#;  --
   DIBUTTON_FLYINGM_COUNTER                :constant:=16#05005C04#;  -- Activate counter measures #  --
   DIAXIS_FLYINGM_RUDDER                   :constant:=16#05024A04#;  -- Rudder - Yaw ship left/right #  --
   DIAXIS_FLYINGM_BRAKE                    :constant:=16#05046205#;  -- Brake-axis #  --
   DIBUTTON_FLYINGM_VIEW                   :constant:=16#05006405#;  -- Cycle through view options #  --
   DIBUTTON_FLYINGM_DISPLAY                :constant:=16#05006406#;  -- Select next dashboard option #  --
   DIAXIS_FLYINGM_FLAPS                    :constant:=16#05055206#;  -- Flaps #  --
   DIBUTTON_FLYINGM_FLAPSUP                :constant:=16#05005407#;  -- Increment stepping up until fully retracteD#;  --
   DIBUTTON_FLYINGM_FLAPSDOWN              :constant:=16#05005408#;  -- Decrement stepping down until fully extendeD#;  --
   DIBUTTON_FLYINGM_FIRESECONDARY          :constant:=16#05004C09#;  -- Alternative fire button #  --
   DIBUTTON_FLYINGM_GEAR                   :constant:=16#0500640A#;  -- Gear up / down #  --
   DIBUTTON_FLYINGM_BRAKE_LINK             :constant:=16#050464E0#;  -- Fallback brake button #  --
   DIBUTTON_FLYINGM_FASTER_LINK            :constant:=16#0503D4E0#;  -- Fallback throttle up button #  --
   DIBUTTON_FLYINGM_SLOWER_LINK            :constant:=16#0503D4E8#;  -- Fallback throttle down button #  --
   DIBUTTON_FLYINGM_GLANCE_LEFT_LINK       :constant:=16#0507C4E4#;  -- Fallback Glance Left button #  --
   DIBUTTON_FLYINGM_GLANCE_RIGHT_LINK      :constant:=16#0507C4EC#;  -- Fallback Glance Right button #  --
   DIBUTTON_FLYINGM_GLANCE_UP_LINK         :constant:=16#0507C4E0#;  -- Fallback Glance Up button #  --
   DIBUTTON_FLYINGM_GLANCE_DOWN_LINK       :constant:=16#0507C4E8#;  -- Fallback Glance Down button #  --
   DIBUTTON_FLYINGM_DEVICE                 :constant:=16#050044FE#;  -- Show input device and controls #  --
   DIBUTTON_FLYINGM_PAUSE                  :constant:=16#050044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_FLYING_HELICOPTER             :constant:=16#06000000#;
   DIAXIS_FLYINGH_BANK                     :constant:=16#06008A01#;  -- Bank - Roll ship left / right #  --
   DIAXIS_FLYINGH_PITCH                    :constant:=16#06010A02#;  -- Pitch - Nose up / down #  --
   DIAXIS_FLYINGH_COLLECTIVE               :constant:=16#06018A03#;  -- Collective - Blade pitch/power #  --
   DIBUTTON_FLYINGH_FIRE                   :constant:=16#06001401#;  -- FirE#;  --
   DIBUTTON_FLYINGH_WEAPONS                :constant:=16#06001402#;  -- Select next weapon #  --
   DIBUTTON_FLYINGH_TARGET                 :constant:=16#06001403#;  -- Selects next available target #  --
   DIBUTTON_FLYINGH_MENU                   :constant:=16#060004FD#;  -- Show menu options #  --


   DIHATSWITCH_FLYINGH_GLANCE              :constant:=16#06004601#;  -- Look arounD#;  --
   DIAXIS_FLYINGH_TORQUE                   :constant:=16#06025A04#;  -- Torque - Rotate ship around left / right axis #  --
   DIAXIS_FLYINGH_THROTTLE                 :constant:=16#0603DA05#;  -- ThrottlE#;  --
   DIBUTTON_FLYINGH_COUNTER                :constant:=16#06005404#;  -- Activate counter measures #  --
   DIBUTTON_FLYINGH_VIEW                   :constant:=16#06006405#;  -- Cycle through view options #  --
   DIBUTTON_FLYINGH_GEAR                   :constant:=16#06006406#;  -- Gear up / down #  --
   DIBUTTON_FLYINGH_FIRESECONDARY          :constant:=16#06004C07#;  -- Alternative fire button #  --
   DIBUTTON_FLYINGH_FASTER_LINK            :constant:=16#0603DCE0#;  -- Fallback throttle up button #  --
   DIBUTTON_FLYINGH_SLOWER_LINK            :constant:=16#0603DCE8#;  -- Fallback throttle down button #  --
   DIBUTTON_FLYINGH_GLANCE_LEFT_LINK       :constant:=16#0607C4E4#;  -- Fallback Glance Left button #  --
   DIBUTTON_FLYINGH_GLANCE_RIGHT_LINK      :constant:=16#0607C4EC#;  -- Fallback Glance Right button #  --
   DIBUTTON_FLYINGH_GLANCE_UP_LINK         :constant:=16#0607C4E0#;  -- Fallback Glance Up button #  --
   DIBUTTON_FLYINGH_GLANCE_DOWN_LINK       :constant:=16#0607C4E8#;  -- Fallback Glance Down button #  --
   DIBUTTON_FLYINGH_DEVICE                 :constant:=16#060044FE#;  -- Show input device and controls #  --
   DIBUTTON_FLYINGH_PAUSE                  :constant:=16#060044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPACESIM                      :constant:=16#07000000#;
   DIAXIS_SPACESIM_LATERAL                 :constant:=16#07008201#;  -- Move ship left / right #  --
   DIAXIS_SPACESIM_MOVE                    :constant:=16#07010202#;  -- Move ship forward/backwarD#;  --
   DIAXIS_SPACESIM_THROTTLE                :constant:=16#07038203#;  -- Throttle - Engine speeD#;  --
   DIBUTTON_SPACESIM_FIRE                  :constant:=16#07000401#;  -- FirE#;  --
   DIBUTTON_SPACESIM_WEAPONS               :constant:=16#07000402#;  -- Select next weapon #  --
   DIBUTTON_SPACESIM_TARGET                :constant:=16#07000403#;  -- Selects next available target #  --
   DIBUTTON_SPACESIM_MENU                  :constant:=16#070004FD#;  -- Show menu options #  --


   DIHATSWITCH_SPACESIM_GLANCE             :constant:=16#07004601#;  -- Look arounD#;  --
   DIAXIS_SPACESIM_CLIMB                   :constant:=16#0701C204#;  -- Climb - Pitch ship up/down #  --
   DIAXIS_SPACESIM_ROTATE                  :constant:=16#07024205#;  -- Rotate - Turn ship left/right #  --
   DIBUTTON_SPACESIM_VIEW                  :constant:=16#07004404#;  -- Cycle through view options #  --
   DIBUTTON_SPACESIM_DISPLAY               :constant:=16#07004405#;  -- Select next dashboard / heads up     DIsplay option #  --
   DIBUTTON_SPACESIM_RAISE                 :constant:=16#07004406#;  -- Raise ship while maintaining current pitch #  --
   DIBUTTON_SPACESIM_LOWER                 :constant:=16#07004407#;  -- Lower ship while maintaining current pitch #  --
   DIBUTTON_SPACESIM_GEAR                  :constant:=16#07004408#;  -- Gear up / down #  --
   DIBUTTON_SPACESIM_FIRESECONDARY         :constant:=16#07004409#;  -- Alternative fire button #  --
   DIBUTTON_SPACESIM_LEFT_LINK             :constant:=16#0700C4E4#;  -- Fallback move left button #  --
   DIBUTTON_SPACESIM_RIGHT_LINK            :constant:=16#0700C4EC#;  -- Fallback move right button #  --
   DIBUTTON_SPACESIM_FORWARD_LINK          :constant:=16#070144E0#;  -- Fallback move forward button #  --
   DIBUTTON_SPACESIM_BACKWARD_LINK         :constant:=16#070144E8#;  -- Fallback move backwards button #  --
   DIBUTTON_SPACESIM_FASTER_LINK           :constant:=16#0703C4E0#;  -- Fallback throttle up button #  --
   DIBUTTON_SPACESIM_SLOWER_LINK           :constant:=16#0703C4E8#;  -- Fallback throttle down button #  --
   DIBUTTON_SPACESIM_TURN_LEFT_LINK        :constant:=16#070244E4#;  -- Fallback turn left button #  --
   DIBUTTON_SPACESIM_TURN_RIGHT_LINK       :constant:=16#070244EC#;  -- Fallback turn right button #  --
   DIBUTTON_SPACESIM_GLANCE_LEFT_LINK      :constant:=16#0707C4E4#;  -- Fallback Glance Left button #  --
   DIBUTTON_SPACESIM_GLANCE_RIGHT_LINK     :constant:=16#0707C4EC#;  -- Fallback Glance Right button #  --
   DIBUTTON_SPACESIM_GLANCE_UP_LINK        :constant:=16#0707C4E0#;  -- Fallback Glance Up button #  --
   DIBUTTON_SPACESIM_GLANCE_DOWN_LINK      :constant:=16#0707C4E8#;  -- Fallback Glance Down button #  --
   DIBUTTON_SPACESIM_DEVICE                :constant:=16#070044FE#;  -- Show input device and controls #  --
   DIBUTTON_SPACESIM_PAUSE                 :constant:=16#070044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_FIGHTING_HAND2HAND            :constant:=16#08000000#;
   DIAXIS_FIGHTINGH_LATERAL                :constant:=16#08008201#;  -- Sidestep left/right #  --
   DIAXIS_FIGHTINGH_MOVE                   :constant:=16#08010202#;  -- Move forward/backwarD#;  --
   DIBUTTON_FIGHTINGH_PUNCH                :constant:=16#08000401#;  -- Punch #  --
   DIBUTTON_FIGHTINGH_KICK                 :constant:=16#08000402#;  -- Kick #  --
   DIBUTTON_FIGHTINGH_BLOCK                :constant:=16#08000403#;  -- Block #  --
   DIBUTTON_FIGHTINGH_CROUCH               :constant:=16#08000404#;  -- Crouch #  --
   DIBUTTON_FIGHTINGH_JUMP                 :constant:=16#08000405#;  -- Jump #  --
   DIBUTTON_FIGHTINGH_SPECIAL1             :constant:=16#08000406#;  -- Apply first special movE#;  --
   DIBUTTON_FIGHTINGH_SPECIAL2             :constant:=16#08000407#;  -- Apply second special movE#;  --
   DIBUTTON_FIGHTINGH_MENU                 :constant:=16#080004FD#;  -- Show menu options #  --


   DIBUTTON_FIGHTINGH_SELECT               :constant:=16#08004408#;  -- Select special movE#;  --
   DIHATSWITCH_FIGHTINGH_SLIDE             :constant:=16#08004601#;  -- Look arounD#;  --
   DIBUTTON_FIGHTINGH_DISPLAY              :constant:=16#08004409#;  -- Shows next on-screen     DIsplay option #  --
   DIAXIS_FIGHTINGH_ROTATE                 :constant:=16#08024203#;  -- Rotate - Turn body left/right #  --
   DIBUTTON_FIGHTINGH_DODGE                :constant:=16#0800440A#;  -- DodgE#;  --
   DIBUTTON_FIGHTINGH_LEFT_LINK            :constant:=16#0800C4E4#;  -- Fallback left sidestep button #  --
   DIBUTTON_FIGHTINGH_RIGHT_LINK           :constant:=16#0800C4EC#;  -- Fallback right sidestep button #  --
   DIBUTTON_FIGHTINGH_FORWARD_LINK         :constant:=16#080144E0#;  -- Fallback forward button #  --
   DIBUTTON_FIGHTINGH_BACKWARD_LINK        :constant:=16#080144E8#;  -- Fallback backward button #  --
   DIBUTTON_FIGHTINGH_DEVICE               :constant:=16#080044FE#;  -- Show input device and controls #  --
   DIBUTTON_FIGHTINGH_PAUSE                :constant:=16#080044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_FIGHTING_FPS                  :constant:=16#09000000#;
   DIAXIS_FPS_ROTATE                       :constant:=16#09008201#;  -- Rotate character left/right #  --
   DIAXIS_FPS_MOVE                         :constant:=16#09010202#;  -- Move forward/backwarD#;  --
   DIBUTTON_FPS_FIRE                       :constant:=16#09000401#;  -- FirE#;  --
   DIBUTTON_FPS_WEAPONS                    :constant:=16#09000402#;  -- Select next weapon #  --
   DIBUTTON_FPS_APPLY                      :constant:=16#09000403#;  -- Use item #  --
   DIBUTTON_FPS_SELECT                     :constant:=16#09000404#;  -- Select next inventory item #  --
   DIBUTTON_FPS_CROUCH                     :constant:=16#09000405#;  -- Crouch/ climb down/ swim down #  --
   DIBUTTON_FPS_JUMP                       :constant:=16#09000406#;  -- Jump/ climb up/ swim up #  --
   DIAXIS_FPS_LOOKUPDOWN                   :constant:=16#09018203#;  -- Look up / down  #  --
   DIBUTTON_FPS_STRAFE                     :constant:=16#09000407#;  -- Enable strafing while activE#;  --
   DIBUTTON_FPS_MENU                       :constant:=16#090004FD#;  -- Show menu options #  --


   DIHATSWITCH_FPS_GLANCE                  :constant:=16#09004601#;  -- Look arounD#;  --
   DIBUTTON_FPS_DISPLAY                    :constant:=16#09004408#;  -- Shows next on-screen     DIsplay option/ map #  --
   DIAXIS_FPS_SIDESTEP                     :constant:=16#09024204#;  -- Sidestep #  --
   DIBUTTON_FPS_DODGE                      :constant:=16#09004409#;  -- DodgE#;  --
   DIBUTTON_FPS_GLANCEL                    :constant:=16#0900440A#;  -- Glance Left #  --
   DIBUTTON_FPS_GLANCER                    :constant:=16#0900440B#;  -- Glance Right #  --
   DIBUTTON_FPS_FIRESECONDARY              :constant:=16#0900440C#;  -- Alternative fire button #  --
   DIBUTTON_FPS_ROTATE_LEFT_LINK           :constant:=16#0900C4E4#;  -- Fallback rotate left button #  --
   DIBUTTON_FPS_ROTATE_RIGHT_LINK          :constant:=16#0900C4EC#;  -- Fallback rotate right button #  --
   DIBUTTON_FPS_FORWARD_LINK               :constant:=16#090144E0#;  -- Fallback forward button #  --
   DIBUTTON_FPS_BACKWARD_LINK              :constant:=16#090144E8#;  -- Fallback backward button #  --
   DIBUTTON_FPS_GLANCE_UP_LINK             :constant:=16#0901C4E0#;  -- Fallback look up button #  --
   DIBUTTON_FPS_GLANCE_DOWN_LINK           :constant:=16#0901C4E8#;  -- Fallback look down button #  --
   DIBUTTON_FPS_STEP_LEFT_LINK             :constant:=16#090244E4#;  -- Fallback step left button #  --
   DIBUTTON_FPS_STEP_RIGHT_LINK            :constant:=16#090244EC#;  -- Fallback step right button #  --
   DIBUTTON_FPS_DEVICE                     :constant:=16#090044FE#;  -- Show input device and controls #  --
   DIBUTTON_FPS_PAUSE                      :constant:=16#090044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_FIGHTING_THIRDPERSON          :constant:=16#0A000000#;
   DIAXIS_TPS_TURN                         :constant:=16#0A020201#;  -- Turn left/right #  --
   DIAXIS_TPS_MOVE                         :constant:=16#0A010202#;  -- Move forward/backwarD#;  --
   DIBUTTON_TPS_RUN                        :constant:=16#0A000401#;  -- Run or walk toggle switch #  --
   DIBUTTON_TPS_ACTION                     :constant:=16#0A000402#;  -- Action Button #  --
   DIBUTTON_TPS_SELECT                     :constant:=16#0A000403#;  -- Select next weapon #  --
   DIBUTTON_TPS_USE                        :constant:=16#0A000404#;  -- Use inventory item currently selecteD#;  --
   DIBUTTON_TPS_JUMP                       :constant:=16#0A000405#;  -- Character Jumps #  --
   DIBUTTON_TPS_MENU                       :constant:=16#0A0004FD#;  -- Show menu options #  --


   DIHATSWITCH_TPS_GLANCE                  :constant:=16#0A004601#;  -- Look arounD#;  --
   DIBUTTON_TPS_VIEW                       :constant:=16#0A004406#;  -- Select camera view #  --
   DIBUTTON_TPS_STEPLEFT                   :constant:=16#0A004407#;  -- Character takes a left step #  --
   DIBUTTON_TPS_STEPRIGHT                  :constant:=16#0A004408#;  -- Character takes a right step #  --
   DIAXIS_TPS_STEP                         :constant:=16#0A00C203#;  -- Character steps left/right #  --
   DIBUTTON_TPS_DODGE                      :constant:=16#0A004409#;  -- Character dodges or ducks #  --
   DIBUTTON_TPS_INVENTORY                  :constant:=16#0A00440A#;  -- Cycle through inventory #  --
   DIBUTTON_TPS_TURN_LEFT_LINK             :constant:=16#0A0244E4#;  -- Fallback turn left button #  --
   DIBUTTON_TPS_TURN_RIGHT_LINK            :constant:=16#0A0244EC#;  -- Fallback turn right button #  --
   DIBUTTON_TPS_FORWARD_LINK               :constant:=16#0A0144E0#;  -- Fallback forward button #  --
   DIBUTTON_TPS_BACKWARD_LINK              :constant:=16#0A0144E8#;  -- Fallback backward button #  --
   DIBUTTON_TPS_GLANCE_UP_LINK             :constant:=16#0A07C4E0#;  -- Fallback look up button #  --
   DIBUTTON_TPS_GLANCE_DOWN_LINK           :constant:=16#0A07C4E8#;  -- Fallback look down button #  --
   DIBUTTON_TPS_GLANCE_LEFT_LINK           :constant:=16#0A07C4E4#;  -- Fallback glance up button #  --
   DIBUTTON_TPS_GLANCE_RIGHT_LINK          :constant:=16#0A07C4EC#;  -- Fallback glance right button #  --
   DIBUTTON_TPS_DEVICE                     :constant:=16#0A0044FE#;  -- Show input device and controls #  --
   DIBUTTON_TPS_PAUSE                      :constant:=16#0A0044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_STRATEGY_ROLEPLAYING          :constant:=16#0B000000#;
   DIAXIS_STRATEGYR_LATERAL                :constant:=16#0B008201#;  -- sidestep - left/right #  --
   DIAXIS_STRATEGYR_MOVE                   :constant:=16#0B010202#;  -- move forward/backwarD#;  --
   DIBUTTON_STRATEGYR_GET                  :constant:=16#0B000401#;  -- Acquire item #  --
   DIBUTTON_STRATEGYR_APPLY                :constant:=16#0B000402#;  -- Use selected item #  --
   DIBUTTON_STRATEGYR_SELECT               :constant:=16#0B000403#;  -- Select nextitem #  --
   DIBUTTON_STRATEGYR_ATTACK               :constant:=16#0B000404#;  -- Attack #  --
   DIBUTTON_STRATEGYR_CAST                 :constant:=16#0B000405#;  -- Cast Spell #  --
   DIBUTTON_STRATEGYR_CROUCH               :constant:=16#0B000406#;  -- Crouch #  --
   DIBUTTON_STRATEGYR_JUMP                 :constant:=16#0B000407#;  -- Jump #  --
   DIBUTTON_STRATEGYR_MENU                 :constant:=16#0B0004FD#;  -- Show menu options #  --


   DIHATSWITCH_STRATEGYR_GLANCE            :constant:=16#0B004601#;  -- Look arounD#;  --
   DIBUTTON_STRATEGYR_MAP                  :constant:=16#0B004408#;  -- Cycle through map options #  --
   DIBUTTON_STRATEGYR_DISPLAY              :constant:=16#0B004409#;  -- Shows next on-screen     DIsplay option #  --
   DIAXIS_STRATEGYR_ROTATE                 :constant:=16#0B024203#;  -- Turn body left/right #  --
   DIBUTTON_STRATEGYR_LEFT_LINK            :constant:=16#0B00C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_STRATEGYR_RIGHT_LINK           :constant:=16#0B00C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_STRATEGYR_FORWARD_LINK         :constant:=16#0B0144E0#;  -- Fallback move forward button #  --
   DIBUTTON_STRATEGYR_BACK_LINK            :constant:=16#0B0144E8#;  -- Fallback move backward button #  --
   DIBUTTON_STRATEGYR_ROTATE_LEFT_LINK     :constant:=16#0B0244E4#;  -- Fallback turn body left button #  --
   DIBUTTON_STRATEGYR_ROTATE_RIGHT_LINK    :constant:=16#0B0244EC#;  -- Fallback turn body right button #  --
   DIBUTTON_STRATEGYR_DEVICE               :constant:=16#0B0044FE#;  -- Show input device and controls #  --
   DIBUTTON_STRATEGYR_PAUSE                :constant:=16#0B0044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_STRATEGY_TURN                 :constant:=16#0C000000#;
   DIAXIS_STRATEGYT_LATERAL                :constant:=16#0C008201#;  -- Sidestep left/right #  --
   DIAXIS_STRATEGYT_MOVE                   :constant:=16#0C010202#;  -- Move forward/backwards #  --
   DIBUTTON_STRATEGYT_SELECT               :constant:=16#0C000401#;  -- Select unit or object #  --
   DIBUTTON_STRATEGYT_INSTRUCT             :constant:=16#0C000402#;  -- Cycle through instructions #  --
   DIBUTTON_STRATEGYT_APPLY                :constant:=16#0C000403#;  -- Apply selected instruction #  --
   DIBUTTON_STRATEGYT_TEAM                 :constant:=16#0C000404#;  -- Select next team / cycle through all #  --
   DIBUTTON_STRATEGYT_TURN                 :constant:=16#0C000405#;  -- In    DIcate turn over #  --
   DIBUTTON_STRATEGYT_MENU                 :constant:=16#0C0004FD#;  -- Show menu options #  --


   DIBUTTON_STRATEGYT_ZOOM                 :constant:=16#0C004406#;  -- Zoom - in / out #  --
   DIBUTTON_STRATEGYT_MAP                  :constant:=16#0C004407#;  -- cycle through map options #  --
   DIBUTTON_STRATEGYT_DISPLAY              :constant:=16#0C004408#;  -- shows next on-screen     DIsplay options #  --
   DIBUTTON_STRATEGYT_LEFT_LINK            :constant:=16#0C00C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_STRATEGYT_RIGHT_LINK           :constant:=16#0C00C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_STRATEGYT_FORWARD_LINK         :constant:=16#0C0144E0#;  -- Fallback move forward button #  --
   DIBUTTON_STRATEGYT_BACK_LINK            :constant:=16#0C0144E8#;  -- Fallback move back button #  --
   DIBUTTON_STRATEGYT_DEVICE               :constant:=16#0C0044FE#;  -- Show input device and controls #  --
   DIBUTTON_STRATEGYT_PAUSE                :constant:=16#0C0044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_HUNTING                :constant:=16#0D000000#;
   DIAXIS_HUNTING_LATERAL                  :constant:=16#0D008201#;  -- sidestep left/right #  --
   DIAXIS_HUNTING_MOVE                     :constant:=16#0D010202#;  -- move forward/backwards #  --
   DIBUTTON_HUNTING_FIRE                   :constant:=16#0D000401#;  -- Fire selected weapon #  --
   DIBUTTON_HUNTING_AIM                    :constant:=16#0D000402#;  -- Select aim/movE#;  --
   DIBUTTON_HUNTING_WEAPON                 :constant:=16#0D000403#;  -- Select next weapon #  --
   DIBUTTON_HUNTING_BINOCULAR              :constant:=16#0D000404#;  -- Look through Binoculars #  --
   DIBUTTON_HUNTING_CALL                   :constant:=16#0D000405#;  -- Make animal call #  --
   DIBUTTON_HUNTING_MAP                    :constant:=16#0D000406#;  -- View Map #  --
   DIBUTTON_HUNTING_SPECIAL                :constant:=16#0D000407#;  -- Special game operation #  --
   DIBUTTON_HUNTING_MENU                   :constant:=16#0D0004FD#;  -- Show menu options #  --


   DIHATSWITCH_HUNTING_GLANCE              :constant:=16#0D004601#;  -- Look arounD#;  --
   DIBUTTON_HUNTING_DISPLAY                :constant:=16#0D004408#;  -- show next on-screen     DIsplay option #  --
   DIAXIS_HUNTING_ROTATE                   :constant:=16#0D024203#;  -- Turn body left/right #  --
   DIBUTTON_HUNTING_CROUCH                 :constant:=16#0D004409#;  -- Crouch/ Climb / Swim down #  --
   DIBUTTON_HUNTING_JUMP                   :constant:=16#0D00440A#;  -- Jump/ Climb up / Swim up #  --
   DIBUTTON_HUNTING_FIRESECONDARY          :constant:=16#0D00440B#;  -- Alternative fire button #  --
   DIBUTTON_HUNTING_LEFT_LINK              :constant:=16#0D00C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_HUNTING_RIGHT_LINK             :constant:=16#0D00C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_HUNTING_FORWARD_LINK           :constant:=16#0D0144E0#;  -- Fallback move forward button #  --
   DIBUTTON_HUNTING_BACK_LINK              :constant:=16#0D0144E8#;  -- Fallback move back button #  --
   DIBUTTON_HUNTING_ROTATE_LEFT_LINK       :constant:=16#0D0244E4#;  -- Fallback turn body left button #  --
   DIBUTTON_HUNTING_ROTATE_RIGHT_LINK      :constant:=16#0D0244EC#;  -- Fallback turn body right button #  --
   DIBUTTON_HUNTING_DEVICE                 :constant:=16#0D0044FE#;  -- Show input device and controls #  --
   DIBUTTON_HUNTING_PAUSE                  :constant:=16#0D0044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_FISHING                :constant:=16#0E000000#;
   DIAXIS_FISHING_LATERAL                  :constant:=16#0E008201#;  -- sidestep left/right #  --
   DIAXIS_FISHING_MOVE                     :constant:=16#0E010202#;  -- move forward/backwards #  --
   DIBUTTON_FISHING_CAST                   :constant:=16#0E000401#;  -- Cast linE#;  --
   DIBUTTON_FISHING_TYPE                   :constant:=16#0E000402#;  -- Select cast typE#;  --
   DIBUTTON_FISHING_BINOCULAR              :constant:=16#0E000403#;  -- Look through Binocular #  --
   DIBUTTON_FISHING_BAIT                   :constant:=16#0E000404#;  -- Select type of Bait #  --
   DIBUTTON_FISHING_MAP                    :constant:=16#0E000405#;  -- View Map #  --
   DIBUTTON_FISHING_MENU                   :constant:=16#0E0004FD#;  -- Show menu options #  --


   DIHATSWITCH_FISHING_GLANCE              :constant:=16#0E004601#;  -- Look arounD#;  --
   DIBUTTON_FISHING_DISPLAY                :constant:=16#0E004406#;  -- Show next on-screen     DIsplay option #  --
   DIAXIS_FISHING_ROTATE                   :constant:=16#0E024203#;  -- Turn character left / right #  --
   DIBUTTON_FISHING_CROUCH                 :constant:=16#0E004407#;  -- Crouch/ Climb / Swim down #  --
   DIBUTTON_FISHING_JUMP                   :constant:=16#0E004408#;  -- Jump/ Climb up / Swim up #  --
   DIBUTTON_FISHING_LEFT_LINK              :constant:=16#0E00C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_FISHING_RIGHT_LINK             :constant:=16#0E00C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_FISHING_FORWARD_LINK           :constant:=16#0E0144E0#;  -- Fallback move forward button #  --
   DIBUTTON_FISHING_BACK_LINK              :constant:=16#0E0144E8#;  -- Fallback move back button #  --
   DIBUTTON_FISHING_ROTATE_LEFT_LINK       :constant:=16#0E0244E4#;  -- Fallback turn body left button #  --
   DIBUTTON_FISHING_ROTATE_RIGHT_LINK      :constant:=16#0E0244EC#;  -- Fallback turn body right button #  --
   DIBUTTON_FISHING_DEVICE                 :constant:=16#0E0044FE#;  -- Show input device and controls #  --
   DIBUTTON_FISHING_PAUSE                  :constant:=16#0E0044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_BASEBALL_BAT           :constant:=16#0F000000#;
   DIAXIS_BASEBALLB_LATERAL                :constant:=16#0F008201#;  -- Aim left / right #  --
   DIAXIS_BASEBALLB_MOVE                   :constant:=16#0F010202#;  -- Aim up / down #  --
   DIBUTTON_BASEBALLB_SELECT               :constant:=16#0F000401#;  -- cycle through swing options #  --
   DIBUTTON_BASEBALLB_NORMAL               :constant:=16#0F000402#;  -- normal swing #  --
   DIBUTTON_BASEBALLB_POWER                :constant:=16#0F000403#;  -- swing for the fencE#;  --
   DIBUTTON_BASEBALLB_BUNT                 :constant:=16#0F000404#;  -- bunt #  --
   DIBUTTON_BASEBALLB_STEAL                :constant:=16#0F000405#;  -- Base runner attempts to steal a basE#;  --
   DIBUTTON_BASEBALLB_BURST                :constant:=16#0F000406#;  -- Base runner invokes burst of speeD#;  --
   DIBUTTON_BASEBALLB_SLIDE                :constant:=16#0F000407#;  -- Base runner slides into basE#;  --
   DIBUTTON_BASEBALLB_CONTACT              :constant:=16#0F000408#;  -- Contact swing #  --
   DIBUTTON_BASEBALLB_MENU                 :constant:=16#0F0004FD#;  -- Show menu options #  --


   DIBUTTON_BASEBALLB_NOSTEAL              :constant:=16#0F004409#;  -- Base runner goes back to a basE#;  --
   DIBUTTON_BASEBALLB_BOX                  :constant:=16#0F00440A#;  -- Enter or exit batting box #  --
   DIBUTTON_BASEBALLB_LEFT_LINK            :constant:=16#0F00C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_BASEBALLB_RIGHT_LINK           :constant:=16#0F00C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_BASEBALLB_FORWARD_LINK         :constant:=16#0F0144E0#;  -- Fallback move forward button #  --
   DIBUTTON_BASEBALLB_BACK_LINK            :constant:=16#0F0144E8#;  -- Fallback move back button #  --
   DIBUTTON_BASEBALLB_DEVICE               :constant:=16#0F0044FE#;  -- Show input device and controls #  --
   DIBUTTON_BASEBALLB_PAUSE                :constant:=16#0F0044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_BASEBALL_PITCH         :constant:=16#10000000#;
   DIAXIS_BASEBALLP_LATERAL                :constant:=16#10008201#;  -- Aim left / right #  --
   DIAXIS_BASEBALLP_MOVE                   :constant:=16#10010202#;  -- Aim up / down #  --
   DIBUTTON_BASEBALLP_SELECT               :constant:=16#10000401#;  -- cycle through pitch selections #  --
   DIBUTTON_BASEBALLP_PITCH                :constant:=16#10000402#;  -- throw pitch #  --
   DIBUTTON_BASEBALLP_BASE                 :constant:=16#10000403#;  -- select base to throw to #  --
   DIBUTTON_BASEBALLP_THROW                :constant:=16#10000404#;  -- throw to basE#;  --
   DIBUTTON_BASEBALLP_FAKE                 :constant:=16#10000405#;  -- Fake a throw to a basE#;  --
   DIBUTTON_BASEBALLP_MENU                 :constant:=16#100004FD#;  -- Show menu options #  --


   DIBUTTON_BASEBALLP_WALK                 :constant:=16#10004406#;  -- Throw intentional walk / pitch out #  --
   DIBUTTON_BASEBALLP_LOOK                 :constant:=16#10004407#;  -- Look at runners on bases #  --
   DIBUTTON_BASEBALLP_LEFT_LINK            :constant:=16#1000C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_BASEBALLP_RIGHT_LINK           :constant:=16#1000C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_BASEBALLP_FORWARD_LINK         :constant:=16#100144E0#;  -- Fallback move forward button #  --
   DIBUTTON_BASEBALLP_BACK_LINK            :constant:=16#100144E8#;  -- Fallback move back button #  --
   DIBUTTON_BASEBALLP_DEVICE               :constant:=16#100044FE#;  -- Show input device and controls #  --
   DIBUTTON_BASEBALLP_PAUSE                :constant:=16#100044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_BASEBALL_FIELD         :constant:=16#11000000#;
   DIAXIS_BASEBALLF_LATERAL                :constant:=16#11008201#;  -- Aim left / right #  --
   DIAXIS_BASEBALLF_MOVE                   :constant:=16#11010202#;  -- Aim up / down #  --
   DIBUTTON_BASEBALLF_NEAREST              :constant:=16#11000401#;  -- Switch to fielder nearest to the ball #  --
   DIBUTTON_BASEBALLF_THROW1               :constant:=16#11000402#;  -- Make conservative throw #  --
   DIBUTTON_BASEBALLF_THROW2               :constant:=16#11000403#;  -- Make aggressive throw #  --
   DIBUTTON_BASEBALLF_BURST                :constant:=16#11000404#;  -- Invoke burst of speeD#;  --
   DIBUTTON_BASEBALLF_JUMP                 :constant:=16#11000405#;  -- Jump to catch ball #  --
   DIBUTTON_BASEBALLF_DIVE                 :constant:=16#11000406#;  --     DIve to catch ball #  --
   DIBUTTON_BASEBALLF_MENU                 :constant:=16#110004FD#;  -- Show menu options #  --


   DIBUTTON_BASEBALLF_SHIFTIN              :constant:=16#11004407#;  -- Shift the infield positioning #  --
   DIBUTTON_BASEBALLF_SHIFTOUT             :constant:=16#11004408#;  -- Shift the outfield positioning #  --
   DIBUTTON_BASEBALLF_AIM_LEFT_LINK        :constant:=16#1100C4E4#;  -- Fallback aim left button #  --
   DIBUTTON_BASEBALLF_AIM_RIGHT_LINK       :constant:=16#1100C4EC#;  -- Fallback aim right button #  --
   DIBUTTON_BASEBALLF_FORWARD_LINK         :constant:=16#110144E0#;  -- Fallback move forward button #  --
   DIBUTTON_BASEBALLF_BACK_LINK            :constant:=16#110144E8#;  -- Fallback move back button #  --
   DIBUTTON_BASEBALLF_DEVICE               :constant:=16#110044FE#;  -- Show input device and controls #  --
   DIBUTTON_BASEBALLF_PAUSE                :constant:=16#110044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_BASKETBALL_OFFENSE     :constant:=16#12000000#;
   DIAXIS_BBALLO_LATERAL                   :constant:=16#12008201#;  -- left / right #  --
   DIAXIS_BBALLO_MOVE                      :constant:=16#12010202#;  -- up / down #  --
   DIBUTTON_BBALLO_SHOOT                   :constant:=16#12000401#;  -- shoot basket #  --
   DIBUTTON_BBALLO_DUNK                    :constant:=16#12000402#;  -- dunk basket #  --
   DIBUTTON_BBALLO_PASS                    :constant:=16#12000403#;  -- throw pass #  --
   DIBUTTON_BBALLO_FAKE                    :constant:=16#12000404#;  -- fake shot or pass #  --
   DIBUTTON_BBALLO_SPECIAL                 :constant:=16#12000405#;  -- apply special movE#;  --
   DIBUTTON_BBALLO_PLAYER                  :constant:=16#12000406#;  -- select next player #  --
   DIBUTTON_BBALLO_BURST                   :constant:=16#12000407#;  -- invoke burst #  --
   DIBUTTON_BBALLO_CALL                    :constant:=16#12000408#;  -- call for ball / pass to mE#;  --
   DIBUTTON_BBALLO_MENU                    :constant:=16#120004FD#;  -- Show menu options #  --


   DIHATSWITCH_BBALLO_GLANCE               :constant:=16#12004601#;  -- scroll view #  --
   DIBUTTON_BBALLO_SCREEN                  :constant:=16#12004409#;  -- Call for screen #  --
   DIBUTTON_BBALLO_PLAY                    :constant:=16#1200440A#;  -- Call for specific offensive play #  --
   DIBUTTON_BBALLO_JAB                     :constant:=16#1200440B#;  -- Initiate fake drive to basket #  --
   DIBUTTON_BBALLO_POST                    :constant:=16#1200440C#;  -- Perform post movE#;  --
   DIBUTTON_BBALLO_TIMEOUT                 :constant:=16#1200440D#;  -- Time Out #  --
   DIBUTTON_BBALLO_SUBSTITUTE              :constant:=16#1200440E#;  -- substitute one player for another #  --
   DIBUTTON_BBALLO_LEFT_LINK               :constant:=16#1200C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_BBALLO_RIGHT_LINK              :constant:=16#1200C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_BBALLO_FORWARD_LINK            :constant:=16#120144E0#;  -- Fallback move forward button #  --
   DIBUTTON_BBALLO_BACK_LINK               :constant:=16#120144E8#;  -- Fallback move back button #  --
   DIBUTTON_BBALLO_DEVICE                  :constant:=16#120044FE#;  -- Show input device and controls #  --
   DIBUTTON_BBALLO_PAUSE                   :constant:=16#120044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_BASKETBALL_DEFENSE     :constant:=16#13000000#;
   DIAXIS_BBALLD_LATERAL                   :constant:=16#13008201#;  -- left / right #  --
   DIAXIS_BBALLD_MOVE                      :constant:=16#13010202#;  -- up / down #  --
   DIBUTTON_BBALLD_JUMP                    :constant:=16#13000401#;  -- jump to block shot #  --
   DIBUTTON_BBALLD_STEAL                   :constant:=16#13000402#;  -- attempt to steal ball #  --
   DIBUTTON_BBALLD_FAKE                    :constant:=16#13000403#;  -- fake block or steal #  --
   DIBUTTON_BBALLD_SPECIAL                 :constant:=16#13000404#;  -- apply special movE#;  --
   DIBUTTON_BBALLD_PLAYER                  :constant:=16#13000405#;  -- select next player #  --
   DIBUTTON_BBALLD_BURST                   :constant:=16#13000406#;  -- invoke burst #  --
   DIBUTTON_BBALLD_PLAY                    :constant:=16#13000407#;  -- call for specific defensive play #  --
   DIBUTTON_BBALLD_MENU                    :constant:=16#130004FD#;  -- Show menu options #  --


   DIHATSWITCH_BBALLD_GLANCE               :constant:=16#13004601#;  -- scroll view #  --
   DIBUTTON_BBALLD_TIMEOUT                 :constant:=16#13004408#;  -- Time Out #  --
   DIBUTTON_BBALLD_SUBSTITUTE              :constant:=16#13004409#;  -- substitute one player for another #  --
   DIBUTTON_BBALLD_LEFT_LINK               :constant:=16#1300C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_BBALLD_RIGHT_LINK              :constant:=16#1300C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_BBALLD_FORWARD_LINK            :constant:=16#130144E0#;  -- Fallback move forward button #  --
   DIBUTTON_BBALLD_BACK_LINK               :constant:=16#130144E8#;  -- Fallback move back button #  --
   DIBUTTON_BBALLD_DEVICE                  :constant:=16#130044FE#;  -- Show input device and controls #  --
   DIBUTTON_BBALLD_PAUSE                   :constant:=16#130044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_FOOTBALL_FIELD         :constant:=16#14000000#;
   DIBUTTON_FOOTBALLP_PLAY                 :constant:=16#14000401#;  -- cycle through available plays #  --
   DIBUTTON_FOOTBALLP_SELECT               :constant:=16#14000402#;  -- select play #  --
   DIBUTTON_FOOTBALLP_HELP                 :constant:=16#14000403#;  -- Bring up pop-up help #  --
   DIBUTTON_FOOTBALLP_MENU                 :constant:=16#140004FD#;  -- Show menu options #  --


   DIBUTTON_FOOTBALLP_DEVICE               :constant:=16#140044FE#;  -- Show input device and controls #  --
   DIBUTTON_FOOTBALLP_PAUSE                :constant:=16#140044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_FOOTBALL_QBCK          :constant:=16#15000000#;
   DIAXIS_FOOTBALLQ_LATERAL                :constant:=16#15008201#;  -- Move / Aim: left / right #  --
   DIAXIS_FOOTBALLQ_MOVE                   :constant:=16#15010202#;  -- Move / Aim: up / down #  --
   DIBUTTON_FOOTBALLQ_SELECT               :constant:=16#15000401#;  -- Select #  --
   DIBUTTON_FOOTBALLQ_SNAP                 :constant:=16#15000402#;  -- snap ball - start play #  --
   DIBUTTON_FOOTBALLQ_JUMP                 :constant:=16#15000403#;  -- jump over defender #  --
   DIBUTTON_FOOTBALLQ_SLIDE                :constant:=16#15000404#;  --     DIve/SlidE#;  --
   DIBUTTON_FOOTBALLQ_PASS                 :constant:=16#15000405#;  -- throws pass to receiver #  --
   DIBUTTON_FOOTBALLQ_FAKE                 :constant:=16#15000406#;  -- pump fake pass or fake kick #  --
   DIBUTTON_FOOTBALLQ_MENU                 :constant:=16#150004FD#;  -- Show menu options #  --


   DIBUTTON_FOOTBALLQ_FAKESNAP             :constant:=16#15004407#;  -- Fake snap  #  --
   DIBUTTON_FOOTBALLQ_MOTION               :constant:=16#15004408#;  -- Send receivers in motion #  --
   DIBUTTON_FOOTBALLQ_AUDIBLE              :constant:=16#15004409#;  -- Change offensive play at line of scrimmagE#;  --
   DIBUTTON_FOOTBALLQ_LEFT_LINK            :constant:=16#1500C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_FOOTBALLQ_RIGHT_LINK           :constant:=16#1500C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_FOOTBALLQ_FORWARD_LINK         :constant:=16#150144E0#;  -- Fallback move forward button #  --
   DIBUTTON_FOOTBALLQ_BACK_LINK            :constant:=16#150144E8#;  -- Fallback move back button #  --
   DIBUTTON_FOOTBALLQ_DEVICE               :constant:=16#150044FE#;  -- Show input device and controls #  --
   DIBUTTON_FOOTBALLQ_PAUSE                :constant:=16#150044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_FOOTBALL_OFFENSE       :constant:=16#16000000#;
   DIAXIS_FOOTBALLO_LATERAL                :constant:=16#16008201#;  -- Move / Aim: left / right #  --
   DIAXIS_FOOTBALLO_MOVE                   :constant:=16#16010202#;  -- Move / Aim: up / down #  --
   DIBUTTON_FOOTBALLO_JUMP                 :constant:=16#16000401#;  -- jump or hurdle over defender #  --
   DIBUTTON_FOOTBALLO_LEFTARM              :constant:=16#16000402#;  -- holds out left arm #  --
   DIBUTTON_FOOTBALLO_RIGHTARM             :constant:=16#16000403#;  -- holds out right arm #  --
   DIBUTTON_FOOTBALLO_THROW                :constant:=16#16000404#;  -- throw pass or lateral ball to another runner #  --
   DIBUTTON_FOOTBALLO_SPIN                 :constant:=16#16000405#;  -- Spin to avoid defenders #  --
   DIBUTTON_FOOTBALLO_MENU                 :constant:=16#160004FD#;  -- Show menu options #  --


   DIBUTTON_FOOTBALLO_JUKE                 :constant:=16#16004406#;  -- Use special move to avoid defenders #  --
   DIBUTTON_FOOTBALLO_SHOULDER             :constant:=16#16004407#;  -- Lower shoulder to run over defenders #  --
   DIBUTTON_FOOTBALLO_TURBO                :constant:=16#16004408#;  -- Speed burst past defenders #  --
   DIBUTTON_FOOTBALLO_DIVE                 :constant:=16#16004409#;  --     DIve over defenders #  --
   DIBUTTON_FOOTBALLO_ZOOM                 :constant:=16#1600440A#;  -- Zoom view in / out #  --
   DIBUTTON_FOOTBALLO_SUBSTITUTE           :constant:=16#1600440B#;  -- substitute one player for another #  --
   DIBUTTON_FOOTBALLO_LEFT_LINK            :constant:=16#1600C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_FOOTBALLO_RIGHT_LINK           :constant:=16#1600C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_FOOTBALLO_FORWARD_LINK         :constant:=16#160144E0#;  -- Fallback move forward button #  --
   DIBUTTON_FOOTBALLO_BACK_LINK            :constant:=16#160144E8#;  -- Fallback move back button #  --
   DIBUTTON_FOOTBALLO_DEVICE               :constant:=16#160044FE#;  -- Show input device and controls #  --
   DIBUTTON_FOOTBALLO_PAUSE                :constant:=16#160044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_FOOTBALL_DEFENSE       :constant:=16#17000000#;
   DIAXIS_FOOTBALLD_LATERAL                :constant:=16#17008201#;  -- Move / Aim: left / right #  --
   DIAXIS_FOOTBALLD_MOVE                   :constant:=16#17010202#;  -- Move / Aim: up / down #  --
   DIBUTTON_FOOTBALLD_PLAY                 :constant:=16#17000401#;  -- cycle through available plays #  --
   DIBUTTON_FOOTBALLD_SELECT               :constant:=16#17000402#;  -- select player closest to the ball #  --
   DIBUTTON_FOOTBALLD_JUMP                 :constant:=16#17000403#;  -- jump to intercept or block #  --
   DIBUTTON_FOOTBALLD_TACKLE               :constant:=16#17000404#;  -- tackler runner #  --
   DIBUTTON_FOOTBALLD_FAKE                 :constant:=16#17000405#;  -- hold down to fake tackle or intercept #  --
   DIBUTTON_FOOTBALLD_SUPERTACKLE          :constant:=16#17000406#;  -- Initiate special tacklE#;  --
   DIBUTTON_FOOTBALLD_MENU                 :constant:=16#170004FD#;  -- Show menu options #  --


   DIBUTTON_FOOTBALLD_SPIN                 :constant:=16#17004407#;  -- Spin to beat offensive linE#;  --
   DIBUTTON_FOOTBALLD_SWIM                 :constant:=16#17004408#;  -- Swim to beat the offensive linE#;  --
   DIBUTTON_FOOTBALLD_BULLRUSH             :constant:=16#17004409#;  -- Bull rush the offensive linE#;  --
   DIBUTTON_FOOTBALLD_RIP                  :constant:=16#1700440A#;  -- Rip the offensive linE#;  --
   DIBUTTON_FOOTBALLD_AUDIBLE              :constant:=16#1700440B#;  -- Change defensive play at the line of scrimmagE#;  --
   DIBUTTON_FOOTBALLD_ZOOM                 :constant:=16#1700440C#;  -- Zoom view in / out #  --
   DIBUTTON_FOOTBALLD_SUBSTITUTE           :constant:=16#1700440D#;  -- substitute one player for another #  --
   DIBUTTON_FOOTBALLD_LEFT_LINK            :constant:=16#1700C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_FOOTBALLD_RIGHT_LINK           :constant:=16#1700C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_FOOTBALLD_FORWARD_LINK         :constant:=16#170144E0#;  -- Fallback move forward button #  --
   DIBUTTON_FOOTBALLD_BACK_LINK            :constant:=16#170144E8#;  -- Fallback move back button #  --
   DIBUTTON_FOOTBALLD_DEVICE               :constant:=16#170044FE#;  -- Show input device and controls #  --
   DIBUTTON_FOOTBALLD_PAUSE                :constant:=16#170044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_GOLF                   :constant:=16#18000000#;
   DIAXIS_GOLF_LATERAL                     :constant:=16#18008201#;  -- Move / Aim: left / right #  --
   DIAXIS_GOLF_MOVE                        :constant:=16#18010202#;  -- Move / Aim: up / down #  --
   DIBUTTON_GOLF_SWING                     :constant:=16#18000401#;  -- swing cluB#;  --
   DIBUTTON_GOLF_SELECT                    :constant:=16#18000402#;  -- cycle between: club / swing strength / ball arc / ball spin #  --
   DIBUTTON_GOLF_UP                        :constant:=16#18000403#;  -- increase selection #  --
   DIBUTTON_GOLF_DOWN                      :constant:=16#18000404#;  -- decrease selection #  --
   DIBUTTON_GOLF_TERRAIN                   :constant:=16#18000405#;  -- shows terrain detail #  --
   DIBUTTON_GOLF_FLYBY                     :constant:=16#18000406#;  -- view the hole via a flyby #  --
   DIBUTTON_GOLF_MENU                      :constant:=16#180004FD#;  -- Show menu options #  --


   DIHATSWITCH_GOLF_SCROLL                 :constant:=16#18004601#;  -- scroll view #  --
   DIBUTTON_GOLF_ZOOM                      :constant:=16#18004407#;  -- Zoom view in / out #  --
   DIBUTTON_GOLF_TIMEOUT                   :constant:=16#18004408#;  -- Call for time out #  --
   DIBUTTON_GOLF_SUBSTITUTE                :constant:=16#18004409#;  -- substitute one player for another #  --
   DIBUTTON_GOLF_LEFT_LINK                 :constant:=16#1800C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_GOLF_RIGHT_LINK                :constant:=16#1800C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_GOLF_FORWARD_LINK              :constant:=16#180144E0#;  -- Fallback move forward button #  --
   DIBUTTON_GOLF_BACK_LINK                 :constant:=16#180144E8#;  -- Fallback move back button #  --
   DIBUTTON_GOLF_DEVICE                    :constant:=16#180044FE#;  -- Show input device and controls #  --
   DIBUTTON_GOLF_PAUSE                     :constant:=16#180044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_HOCKEY_OFFENSE         :constant:=16#19000000#;
   DIAXIS_HOCKEYO_LATERAL                  :constant:=16#19008201#;  -- Move / Aim: left / right #  --
   DIAXIS_HOCKEYO_MOVE                     :constant:=16#19010202#;  -- Move / Aim: up / down #  --
   DIBUTTON_HOCKEYO_SHOOT                  :constant:=16#19000401#;  -- Shoot #  --
   DIBUTTON_HOCKEYO_PASS                   :constant:=16#19000402#;  -- pass the puck #  --
   DIBUTTON_HOCKEYO_BURST                  :constant:=16#19000403#;  -- invoke speed burst #  --
   DIBUTTON_HOCKEYO_SPECIAL                :constant:=16#19000404#;  -- invoke special movE#;  --
   DIBUTTON_HOCKEYO_FAKE                   :constant:=16#19000405#;  -- hold down to fake pass or kick #  --
   DIBUTTON_HOCKEYO_MENU                   :constant:=16#190004FD#;  -- Show menu options #  --


   DIHATSWITCH_HOCKEYO_SCROLL              :constant:=16#19004601#;  -- scroll view #  --
   DIBUTTON_HOCKEYO_ZOOM                   :constant:=16#19004406#;  -- Zoom view in / out #  --
   DIBUTTON_HOCKEYO_STRATEGY               :constant:=16#19004407#;  -- Invoke coaching menu for strategy help #  --
   DIBUTTON_HOCKEYO_TIMEOUT                :constant:=16#19004408#;  -- Call for time out #  --
   DIBUTTON_HOCKEYO_SUBSTITUTE             :constant:=16#19004409#;  -- substitute one player for another #  --
   DIBUTTON_HOCKEYO_LEFT_LINK              :constant:=16#1900C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_HOCKEYO_RIGHT_LINK             :constant:=16#1900C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_HOCKEYO_FORWARD_LINK           :constant:=16#190144E0#;  -- Fallback move forward button #  --
   DIBUTTON_HOCKEYO_BACK_LINK              :constant:=16#190144E8#;  -- Fallback move back button #  --
   DIBUTTON_HOCKEYO_DEVICE                 :constant:=16#190044FE#;  -- Show input device and controls #  --
   DIBUTTON_HOCKEYO_PAUSE                  :constant:=16#190044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_HOCKEY_DEFENSE         :constant:=16#1A000000#;
   DIAXIS_HOCKEYD_LATERAL                  :constant:=16#1A008201#;  -- Move / Aim: left / right #  --
   DIAXIS_HOCKEYD_MOVE                     :constant:=16#1A010202#;  -- Move / Aim: up / down #  --
   DIBUTTON_HOCKEYD_PLAYER                 :constant:=16#1A000401#;  -- control player closest to the puck #  --
   DIBUTTON_HOCKEYD_STEAL                  :constant:=16#1A000402#;  -- attempt steal #  --
   DIBUTTON_HOCKEYD_BURST                  :constant:=16#1A000403#;  -- speed burst or body check #  --
   DIBUTTON_HOCKEYD_BLOCK                  :constant:=16#1A000404#;  -- block puck #  --
   DIBUTTON_HOCKEYD_FAKE                   :constant:=16#1A000405#;  -- hold down to fake tackle or intercept #  --
   DIBUTTON_HOCKEYD_MENU                   :constant:=16#1A0004FD#;  -- Show menu options #  --


   DIHATSWITCH_HOCKEYD_SCROLL              :constant:=16#1A004601#;  -- scroll view #  --
   DIBUTTON_HOCKEYD_ZOOM                   :constant:=16#1A004406#;  -- Zoom view in / out #  --
   DIBUTTON_HOCKEYD_STRATEGY               :constant:=16#1A004407#;  -- Invoke coaching menu for strategy help #  --
   DIBUTTON_HOCKEYD_TIMEOUT                :constant:=16#1A004408#;  -- Call for time out #  --
   DIBUTTON_HOCKEYD_SUBSTITUTE             :constant:=16#1A004409#;  -- substitute one player for another #  --
   DIBUTTON_HOCKEYD_LEFT_LINK              :constant:=16#1A00C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_HOCKEYD_RIGHT_LINK             :constant:=16#1A00C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_HOCKEYD_FORWARD_LINK           :constant:=16#1A0144E0#;  -- Fallback move forward button #  --
   DIBUTTON_HOCKEYD_BACK_LINK              :constant:=16#1A0144E8#;  -- Fallback move back button #  --
   DIBUTTON_HOCKEYD_DEVICE                 :constant:=16#1A0044FE#;  -- Show input device and controls #  --
   DIBUTTON_HOCKEYD_PAUSE                  :constant:=16#1A0044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_HOCKEY_GOALIE          :constant:=16#1B000000#;
   DIAXIS_HOCKEYG_LATERAL                  :constant:=16#1B008201#;  -- Move / Aim: left / right #  --
   DIAXIS_HOCKEYG_MOVE                     :constant:=16#1B010202#;  -- Move / Aim: up / down #  --
   DIBUTTON_HOCKEYG_PASS                   :constant:=16#1B000401#;  -- pass puck #  --
   DIBUTTON_HOCKEYG_POKE                   :constant:=16#1B000402#;  -- poke / check / hack #  --
   DIBUTTON_HOCKEYG_STEAL                  :constant:=16#1B000403#;  -- attempt steal #  --
   DIBUTTON_HOCKEYG_BLOCK                  :constant:=16#1B000404#;  -- block puck #  --
   DIBUTTON_HOCKEYG_MENU                   :constant:=16#1B0004FD#;  -- Show menu options #  --


   DIHATSWITCH_HOCKEYG_SCROLL              :constant:=16#1B004601#;  -- scroll view #  --
   DIBUTTON_HOCKEYG_ZOOM                   :constant:=16#1B004405#;  -- Zoom view in / out #  --
   DIBUTTON_HOCKEYG_STRATEGY               :constant:=16#1B004406#;  -- Invoke coaching menu for strategy help #  --
   DIBUTTON_HOCKEYG_TIMEOUT                :constant:=16#1B004407#;  -- Call for time out #  --
   DIBUTTON_HOCKEYG_SUBSTITUTE             :constant:=16#1B004408#;  -- substitute one player for another #  --
   DIBUTTON_HOCKEYG_LEFT_LINK              :constant:=16#1B00C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_HOCKEYG_RIGHT_LINK             :constant:=16#1B00C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_HOCKEYG_FORWARD_LINK           :constant:=16#1B0144E0#;  -- Fallback move forward button #  --
   DIBUTTON_HOCKEYG_BACK_LINK              :constant:=16#1B0144E8#;  -- Fallback move back button #  --
   DIBUTTON_HOCKEYG_DEVICE                 :constant:=16#1B0044FE#;  -- Show input device and controls #  --
   DIBUTTON_HOCKEYG_PAUSE                  :constant:=16#1B0044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_BIKING_MOUNTAIN        :constant:=16#1C000000#;
   DIAXIS_BIKINGM_TURN                     :constant:=16#1C008201#;  -- left / right #  --
   DIAXIS_BIKINGM_PEDAL                    :constant:=16#1C010202#;  -- Pedal faster / slower / brakE#;  --
   DIBUTTON_BIKINGM_JUMP                   :constant:=16#1C000401#;  -- jump over obstaclE#;  --
   DIBUTTON_BIKINGM_CAMERA                 :constant:=16#1C000402#;  -- switch camera view #  --
   DIBUTTON_BIKINGM_SPECIAL1               :constant:=16#1C000403#;  -- perform first special movE#;  --
   DIBUTTON_BIKINGM_SELECT                 :constant:=16#1C000404#;  -- Select #  --
   DIBUTTON_BIKINGM_SPECIAL2               :constant:=16#1C000405#;  -- perform second special movE#;  --
   DIBUTTON_BIKINGM_MENU                   :constant:=16#1C0004FD#;  -- Show menu options #  --


   DIHATSWITCH_BIKINGM_SCROLL              :constant:=16#1C004601#;  -- scroll view #  --
   DIBUTTON_BIKINGM_ZOOM                   :constant:=16#1C004406#;  -- Zoom view in / out #  --
   DIAXIS_BIKINGM_BRAKE                    :constant:=16#1C044203#;  -- Brake axis  #  --
   DIBUTTON_BIKINGM_LEFT_LINK              :constant:=16#1C00C4E4#;  -- Fallback turn left button #  --
   DIBUTTON_BIKINGM_RIGHT_LINK             :constant:=16#1C00C4EC#;  -- Fallback turn right button #  --
   DIBUTTON_BIKINGM_FASTER_LINK            :constant:=16#1C0144E0#;  -- Fallback pedal faster button #  --
   DIBUTTON_BIKINGM_SLOWER_LINK            :constant:=16#1C0144E8#;  -- Fallback pedal slower button #  --
   DIBUTTON_BIKINGM_BRAKE_BUTTON_LINK      :constant:=16#1C0444E8#;  -- Fallback brake button #  --
   DIBUTTON_BIKINGM_DEVICE                 :constant:=16#1C0044FE#;  -- Show input device and controls #  --
   DIBUTTON_BIKINGM_PAUSE                  :constant:=16#1C0044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_SKIING                 :constant:=16#1D000000#;
   DIAXIS_SKIING_TURN                      :constant:=16#1D008201#;  -- left / right #  --
   DIAXIS_SKIING_SPEED                     :constant:=16#1D010202#;  -- faster / slower #  --
   DIBUTTON_SKIING_JUMP                    :constant:=16#1D000401#;  -- Jump #  --
   DIBUTTON_SKIING_CROUCH                  :constant:=16#1D000402#;  -- crouch down #  --
   DIBUTTON_SKIING_CAMERA                  :constant:=16#1D000403#;  -- switch camera view #  --
   DIBUTTON_SKIING_SPECIAL1                :constant:=16#1D000404#;  -- perform first special movE#;  --
   DIBUTTON_SKIING_SELECT                  :constant:=16#1D000405#;  -- Select #  --
   DIBUTTON_SKIING_SPECIAL2                :constant:=16#1D000406#;  -- perform second special movE#;  --
   DIBUTTON_SKIING_MENU                    :constant:=16#1D0004FD#;  -- Show menu options #  --


   DIHATSWITCH_SKIING_GLANCE               :constant:=16#1D004601#;  -- scroll view #  --
   DIBUTTON_SKIING_ZOOM                    :constant:=16#1D004407#;  -- Zoom view in / out #  --
   DIBUTTON_SKIING_LEFT_LINK               :constant:=16#1D00C4E4#;  -- Fallback turn left button #  --
   DIBUTTON_SKIING_RIGHT_LINK              :constant:=16#1D00C4EC#;  -- Fallback turn right button #  --
   DIBUTTON_SKIING_FASTER_LINK             :constant:=16#1D0144E0#;  -- Fallback increase speed button #  --
   DIBUTTON_SKIING_SLOWER_LINK             :constant:=16#1D0144E8#;  -- Fallback decrease speed button #  --
   DIBUTTON_SKIING_DEVICE                  :constant:=16#1D0044FE#;  -- Show input device and controls #  --
   DIBUTTON_SKIING_PAUSE                   :constant:=16#1D0044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_SOCCER_OFFENSE         :constant:=16#1E000000#;
   DIAXIS_SOCCERO_LATERAL                  :constant:=16#1E008201#;  -- Move / Aim: left / right #  --
   DIAXIS_SOCCERO_MOVE                     :constant:=16#1E010202#;  -- Move / Aim: up / down #  --
   DIAXIS_SOCCERO_BEND                     :constant:=16#1E018203#;  -- Bend to soccer shot/pass #  --
   DIBUTTON_SOCCERO_SHOOT                  :constant:=16#1E000401#;  -- Shoot the ball #  --
   DIBUTTON_SOCCERO_PASS                   :constant:=16#1E000402#;  -- Pass  #  --
   DIBUTTON_SOCCERO_FAKE                   :constant:=16#1E000403#;  -- FakE#;  --
   DIBUTTON_SOCCERO_PLAYER                 :constant:=16#1E000404#;  -- Select next player #  --
   DIBUTTON_SOCCERO_SPECIAL1               :constant:=16#1E000405#;  -- Apply special movE#;  --
   DIBUTTON_SOCCERO_SELECT                 :constant:=16#1E000406#;  -- Select special movE#;  --
   DIBUTTON_SOCCERO_MENU                   :constant:=16#1E0004FD#;  -- Show menu options #  --


   DIHATSWITCH_SOCCERO_GLANCE              :constant:=16#1E004601#;  -- scroll view #  --
   DIBUTTON_SOCCERO_SUBSTITUTE             :constant:=16#1E004407#;  -- Substitute one player for another #  --
   DIBUTTON_SOCCERO_SHOOTLOW               :constant:=16#1E004408#;  -- Shoot the ball low #  --
   DIBUTTON_SOCCERO_SHOOTHIGH              :constant:=16#1E004409#;  -- Shoot the ball high #  --
   DIBUTTON_SOCCERO_PASSTHRU               :constant:=16#1E00440A#;  -- Make a thru pass #  --
   DIBUTTON_SOCCERO_SPRINT                 :constant:=16#1E00440B#;  -- Sprint / turbo boost #  --
   DIBUTTON_SOCCERO_CONTROL                :constant:=16#1E00440C#;  -- Obtain control of the ball #  --
   DIBUTTON_SOCCERO_HEAD                   :constant:=16#1E00440D#;  -- Attempt to head the ball #  --
   DIBUTTON_SOCCERO_LEFT_LINK              :constant:=16#1E00C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_SOCCERO_RIGHT_LINK             :constant:=16#1E00C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_SOCCERO_FORWARD_LINK           :constant:=16#1E0144E0#;  -- Fallback move forward button #  --
   DIBUTTON_SOCCERO_BACK_LINK              :constant:=16#1E0144E8#;  -- Fallback move back button #  --
   DIBUTTON_SOCCERO_DEVICE                 :constant:=16#1E0044FE#;  -- Show input device and controls #  --
   DIBUTTON_SOCCERO_PAUSE                  :constant:=16#1E0044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_SOCCER_DEFENSE         :constant:=16#1F000000#;
   DIAXIS_SOCCERD_LATERAL                  :constant:=16#1F008201#;  -- Move / Aim: left / right #  --
   DIAXIS_SOCCERD_MOVE                     :constant:=16#1F010202#;  -- Move / Aim: up / down #  --
   DIBUTTON_SOCCERD_BLOCK                  :constant:=16#1F000401#;  -- Attempt to block shot #  --
   DIBUTTON_SOCCERD_STEAL                  :constant:=16#1F000402#;  -- Attempt to steal ball #  --
   DIBUTTON_SOCCERD_FAKE                   :constant:=16#1F000403#;  -- Fake a block or a steal #  --
   DIBUTTON_SOCCERD_PLAYER                 :constant:=16#1F000404#;  -- Select next player #  --
   DIBUTTON_SOCCERD_SPECIAL                :constant:=16#1F000405#;  -- Apply special movE#;  --
   DIBUTTON_SOCCERD_SELECT                 :constant:=16#1F000406#;  -- Select special movE#;  --
   DIBUTTON_SOCCERD_SLIDE                  :constant:=16#1F000407#;  -- Attempt a slide tacklE#;  --
   DIBUTTON_SOCCERD_MENU                   :constant:=16#1F0004FD#;  -- Show menu options #  --


   DIHATSWITCH_SOCCERD_GLANCE              :constant:=16#1F004601#;  -- scroll view #  --
   DIBUTTON_SOCCERD_FOUL                   :constant:=16#1F004408#;  -- Initiate a foul / hard-foul #  --
   DIBUTTON_SOCCERD_HEAD                   :constant:=16#1F004409#;  -- Attempt a Header #  --
   DIBUTTON_SOCCERD_CLEAR                  :constant:=16#1F00440A#;  -- Attempt to clear the ball down the fielD#;  --
   DIBUTTON_SOCCERD_GOALIECHARGE           :constant:=16#1F00440B#;  -- Make the goalie charge out of the box #  --
   DIBUTTON_SOCCERD_SUBSTITUTE             :constant:=16#1F00440C#;  -- Substitute one player for another #  --
   DIBUTTON_SOCCERD_LEFT_LINK              :constant:=16#1F00C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_SOCCERD_RIGHT_LINK             :constant:=16#1F00C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_SOCCERD_FORWARD_LINK           :constant:=16#1F0144E0#;  -- Fallback move forward button #  --
   DIBUTTON_SOCCERD_BACK_LINK              :constant:=16#1F0144E8#;  -- Fallback move back button #  --
   DIBUTTON_SOCCERD_DEVICE                 :constant:=16#1F0044FE#;  -- Show input device and controls #  --
   DIBUTTON_SOCCERD_PAUSE                  :constant:=16#1F0044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_SPORTS_RACQUET                :constant:=16#20000000#;
   DIAXIS_RACQUET_LATERAL                  :constant:=16#20008201#;  -- Move / Aim: left / right #  --
   DIAXIS_RACQUET_MOVE                     :constant:=16#20010202#;  -- Move / Aim: up / down #  --
   DIBUTTON_RACQUET_SWING                  :constant:=16#20000401#;  -- Swing racquet #  --
   DIBUTTON_RACQUET_BACKSWING              :constant:=16#20000402#;  -- Swing backhanD#;  --
   DIBUTTON_RACQUET_SMASH                  :constant:=16#20000403#;  -- Smash shot #  --
   DIBUTTON_RACQUET_SPECIAL                :constant:=16#20000404#;  -- Special shot #  --
   DIBUTTON_RACQUET_SELECT                 :constant:=16#20000405#;  -- Select special shot #  --
   DIBUTTON_RACQUET_MENU                   :constant:=16#200004FD#;  -- Show menu options #  --


   DIHATSWITCH_RACQUET_GLANCE              :constant:=16#20004601#;  -- scroll view #  --
   DIBUTTON_RACQUET_TIMEOUT                :constant:=16#20004406#;  -- Call for time out #  --
   DIBUTTON_RACQUET_SUBSTITUTE             :constant:=16#20004407#;  -- Substitute one player for another #  --
   DIBUTTON_RACQUET_LEFT_LINK              :constant:=16#2000C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_RACQUET_RIGHT_LINK             :constant:=16#2000C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_RACQUET_FORWARD_LINK           :constant:=16#200144E0#;  -- Fallback move forward button #  --
   DIBUTTON_RACQUET_BACK_LINK              :constant:=16#200144E8#;  -- Fallback move back button #  --
   DIBUTTON_RACQUET_DEVICE                 :constant:=16#200044FE#;  -- Show input device and controls #  --
   DIBUTTON_RACQUET_PAUSE                  :constant:=16#200044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_ARCADE_SIDE2SIDE              :constant:=16#21000000#;
   DIAXIS_ARCADES_LATERAL                  :constant:=16#21008201#;  -- left / right #  --
   DIAXIS_ARCADES_MOVE                     :constant:=16#21010202#;  -- up / down #  --
   DIBUTTON_ARCADES_THROW                  :constant:=16#21000401#;  -- throw object #  --
   DIBUTTON_ARCADES_CARRY                  :constant:=16#21000402#;  -- carry object #  --
   DIBUTTON_ARCADES_ATTACK                 :constant:=16#21000403#;  -- attack #  --
   DIBUTTON_ARCADES_SPECIAL                :constant:=16#21000404#;  -- apply special movE#;  --
   DIBUTTON_ARCADES_SELECT                 :constant:=16#21000405#;  -- select special movE#;  --
   DIBUTTON_ARCADES_MENU                   :constant:=16#210004FD#;  -- Show menu options #  --


   DIHATSWITCH_ARCADES_VIEW                :constant:=16#21004601#;  -- scroll view left / right / up / down #  --
   DIBUTTON_ARCADES_LEFT_LINK              :constant:=16#2100C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_ARCADES_RIGHT_LINK             :constant:=16#2100C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_ARCADES_FORWARD_LINK           :constant:=16#210144E0#;  -- Fallback move forward button #  --
   DIBUTTON_ARCADES_BACK_LINK              :constant:=16#210144E8#;  -- Fallback move back button #  --
   DIBUTTON_ARCADES_VIEW_UP_LINK           :constant:=16#2107C4E0#;  -- Fallback scroll view up button #  --
   DIBUTTON_ARCADES_VIEW_DOWN_LINK         :constant:=16#2107C4E8#;  -- Fallback scroll view down button #  --
   DIBUTTON_ARCADES_VIEW_LEFT_LINK         :constant:=16#2107C4E4#;  -- Fallback scroll view left button #  --
   DIBUTTON_ARCADES_VIEW_RIGHT_LINK        :constant:=16#2107C4EC#;  -- Fallback scroll view right button #  --
   DIBUTTON_ARCADES_DEVICE                 :constant:=16#210044FE#;  -- Show input device and controls #  --
   DIBUTTON_ARCADES_PAUSE                  :constant:=16#210044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_ARCADE_PLATFORM               :constant:=16#22000000#;
   DIAXIS_ARCADEP_LATERAL                  :constant:=16#22008201#;  -- Left / right #  --
   DIAXIS_ARCADEP_MOVE                     :constant:=16#22010202#;  -- Up / down #  --
   DIBUTTON_ARCADEP_JUMP                   :constant:=16#22000401#;  -- Jump #  --
   DIBUTTON_ARCADEP_FIRE                   :constant:=16#22000402#;  -- FirE#;  --
   DIBUTTON_ARCADEP_CROUCH                 :constant:=16#22000403#;  -- Crouch #  --
   DIBUTTON_ARCADEP_SPECIAL                :constant:=16#22000404#;  -- Apply special movE#;  --
   DIBUTTON_ARCADEP_SELECT                 :constant:=16#22000405#;  -- Select special movE#;  --
   DIBUTTON_ARCADEP_MENU                   :constant:=16#220004FD#;  -- Show menu options #  --


   DIHATSWITCH_ARCADEP_VIEW                :constant:=16#22004601#;  -- Scroll view #  --
   DIBUTTON_ARCADEP_FIRESECONDARY          :constant:=16#22004406#;  -- Alternative fire button #  --
   DIBUTTON_ARCADEP_LEFT_LINK              :constant:=16#2200C4E4#;  -- Fallback sidestep left button #  --
   DIBUTTON_ARCADEP_RIGHT_LINK             :constant:=16#2200C4EC#;  -- Fallback sidestep right button #  --
   DIBUTTON_ARCADEP_FORWARD_LINK           :constant:=16#220144E0#;  -- Fallback move forward button #  --
   DIBUTTON_ARCADEP_BACK_LINK              :constant:=16#220144E8#;  -- Fallback move back button #  --
   DIBUTTON_ARCADEP_VIEW_UP_LINK           :constant:=16#2207C4E0#;  -- Fallback scroll view up button #  --
   DIBUTTON_ARCADEP_VIEW_DOWN_LINK         :constant:=16#2207C4E8#;  -- Fallback scroll view down button #  --
   DIBUTTON_ARCADEP_VIEW_LEFT_LINK         :constant:=16#2207C4E4#;  -- Fallback scroll view left button #  --
   DIBUTTON_ARCADEP_VIEW_RIGHT_LINK        :constant:=16#2207C4EC#;  -- Fallback scroll view right button #  --
   DIBUTTON_ARCADEP_DEVICE                 :constant:=16#220044FE#;  -- Show input device and controls #  --
   DIBUTTON_ARCADEP_PAUSE                  :constant:=16#220044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_CAD_2DCONTROL                 :constant:=16#23000000#;
   DIAXIS_2DCONTROL_LATERAL                :constant:=16#23008201#;  -- Move view left / right #  --
   DIAXIS_2DCONTROL_MOVE                   :constant:=16#23010202#;  -- Move view up / down #  --
   DIAXIS_2DCONTROL_INOUT                  :constant:=16#23018203#;  -- Zoom - in / out #  --
   DIBUTTON_2DCONTROL_SELECT               :constant:=16#23000401#;  -- Select Object #  --
   DIBUTTON_2DCONTROL_SPECIAL1             :constant:=16#23000402#;  -- Do first special operation #  --
   DIBUTTON_2DCONTROL_SPECIAL              :constant:=16#23000403#;  -- Select special operation #  --
   DIBUTTON_2DCONTROL_SPECIAL2             :constant:=16#23000404#;  -- Do second special operation #  --
   DIBUTTON_2DCONTROL_MENU                 :constant:=16#230004FD#;  -- Show menu options #  --


   DIHATSWITCH_2DCONTROL_HATSWITCH         :constant:=16#23004601#;  -- Hat switch #  --
   DIAXIS_2DCONTROL_ROTATEZ                :constant:=16#23024204#;  -- Rotate view clockwise / counterclockwisE#;  --
   DIBUTTON_2DCONTROL_DISPLAY              :constant:=16#23004405#;  -- Shows next on-screen     DIsplay options #  --
   DIBUTTON_2DCONTROL_DEVICE               :constant:=16#230044FE#;  -- Show input device and controls #  --
   DIBUTTON_2DCONTROL_PAUSE                :constant:=16#230044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_CAD_3DCONTROL                 :constant:=16#24000000#;
   DIAXIS_3DCONTROL_LATERAL                :constant:=16#24008201#;  -- Move view left / right #  --
   DIAXIS_3DCONTROL_MOVE                   :constant:=16#24010202#;  -- Move view up / down #  --
   DIAXIS_3DCONTROL_INOUT                  :constant:=16#24018203#;  -- Zoom - in / out #  --
   DIBUTTON_3DCONTROL_SELECT               :constant:=16#24000401#;  -- Select Object #  --
   DIBUTTON_3DCONTROL_SPECIAL1             :constant:=16#24000402#;  -- Do first special operation #  --
   DIBUTTON_3DCONTROL_SPECIAL              :constant:=16#24000403#;  -- Select special operation #  --
   DIBUTTON_3DCONTROL_SPECIAL2             :constant:=16#24000404#;  -- Do second special operation #  --
   DIBUTTON_3DCONTROL_MENU                 :constant:=16#240004FD#;  -- Show menu options #  --


   DIHATSWITCH_3DCONTROL_HATSWITCH         :constant:=16#24004601#;  -- Hat switch #  --
   DIAXIS_3DCONTROL_ROTATEX                :constant:=16#24034204#;  -- Rotate view forward or up / backward or down #  --
   DIAXIS_3DCONTROL_ROTATEY                :constant:=16#2402C205#;  -- Rotate view clockwise / counterclockwisE#;  --
   DIAXIS_3DCONTROL_ROTATEZ                :constant:=16#24024206#;  -- Rotate view left / right #  --
   DIBUTTON_3DCONTROL_DISPLAY              :constant:=16#24004405#;  -- Show next on-screen     DIsplay options #  --
   DIBUTTON_3DCONTROL_DEVICE               :constant:=16#240044FE#;  -- Show input device and controls #  --
   DIBUTTON_3DCONTROL_PAUSE                :constant:=16#240044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_CAD_FLYBY                     :constant:=16#25000000#;
   DIAXIS_CADF_LATERAL                     :constant:=16#25008201#;  -- move view left / right #  --
   DIAXIS_CADF_MOVE                        :constant:=16#25010202#;  -- move view up / down #  --
   DIAXIS_CADF_INOUT                       :constant:=16#25018203#;  -- in / out #  --
   DIBUTTON_CADF_SELECT                    :constant:=16#25000401#;  -- Select Object #  --
   DIBUTTON_CADF_SPECIAL1                  :constant:=16#25000402#;  -- do first special operation #  --
   DIBUTTON_CADF_SPECIAL                   :constant:=16#25000403#;  -- Select special operation #  --
   DIBUTTON_CADF_SPECIAL2                  :constant:=16#25000404#;  -- do second special operation #  --
   DIBUTTON_CADF_MENU                      :constant:=16#250004FD#;  -- Show menu options #  --


   DIHATSWITCH_CADF_HATSWITCH              :constant:=16#25004601#;  -- Hat switch #  --
   DIAXIS_CADF_ROTATEX                     :constant:=16#25034204#;  -- Rotate view forward or up / backward or down #  --
   DIAXIS_CADF_ROTATEY                     :constant:=16#2502C205#;  -- Rotate view clockwise / counterclockwisE#;  --
   DIAXIS_CADF_ROTATEZ                     :constant:=16#25024206#;  -- Rotate view left / right #  --
   DIBUTTON_CADF_DISPLAY                   :constant:=16#25004405#;  -- shows next on-screen     DIsplay options #  --
   DIBUTTON_CADF_DEVICE                    :constant:=16#250044FE#;  -- Show input device and controls #  --
   DIBUTTON_CADF_PAUSE                     :constant:=16#250044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_CAD_MODEL                     :constant:=16#26000000#;
   DIAXIS_CADM_LATERAL                     :constant:=16#26008201#;  -- move view left / right #  --
   DIAXIS_CADM_MOVE                        :constant:=16#26010202#;  -- move view up / down #  --
   DIAXIS_CADM_INOUT                       :constant:=16#26018203#;  -- in / out #  --
   DIBUTTON_CADM_SELECT                    :constant:=16#26000401#;  -- Select Object #  --
   DIBUTTON_CADM_SPECIAL1                  :constant:=16#26000402#;  -- do first special operation #  --
   DIBUTTON_CADM_SPECIAL                   :constant:=16#26000403#;  -- Select special operation #  --
   DIBUTTON_CADM_SPECIAL2                  :constant:=16#26000404#;  -- do second special operation #  --
   DIBUTTON_CADM_MENU                      :constant:=16#260004FD#;  -- Show menu options #  --


   DIHATSWITCH_CADM_HATSWITCH              :constant:=16#26004601#;  -- Hat switch #  --
   DIAXIS_CADM_ROTATEX                     :constant:=16#26034204#;  -- Rotate view forward or up / backward or down #  --
   DIAXIS_CADM_ROTATEY                     :constant:=16#2602C205#;  -- Rotate view clockwise / counterclockwisE#;  --
   DIAXIS_CADM_ROTATEZ                     :constant:=16#26024206#;  -- Rotate view left / right #  --
   DIBUTTON_CADM_DISPLAY                   :constant:=16#26004405#;  -- shows next on-screen     DIsplay options #  --
   DIBUTTON_CADM_DEVICE                    :constant:=16#260044FE#;  -- Show input device and controls #  --
   DIBUTTON_CADM_PAUSE                     :constant:=16#260044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_REMOTE_CONTROL                :constant:=16#27000000#;
   DIAXIS_REMOTE_SLIDER                    :constant:=16#27050201#;  -- Slider for adjustment: volume / color / bass / etC#;  --
   DIBUTTON_REMOTE_MUTE                    :constant:=16#27000401#;  -- Set volume on current device to zero #  --
   DIBUTTON_REMOTE_SELECT                  :constant:=16#27000402#;  -- Next/previous: channel/ track / chapter / picture / station #  --
   DIBUTTON_REMOTE_PLAY                    :constant:=16#27002403#;  -- Start or pause entertainment on current devicE#;  --
   DIBUTTON_REMOTE_CUE                     :constant:=16#27002404#;  -- Move through current me    DIA#;  --
   DIBUTTON_REMOTE_REVIEW                  :constant:=16#27002405#;  -- Move through current me    DIA#;  --
   DIBUTTON_REMOTE_CHANGE                  :constant:=16#27002406#;  -- Select next devicE#;  --
   DIBUTTON_REMOTE_RECORD                  :constant:=16#27002407#;  -- Start recor    DIng the current me    DIA#;  --
   DIBUTTON_REMOTE_MENU                    :constant:=16#270004FD#;  -- Show menu options #  --


   DIAXIS_REMOTE_SLIDER2                   :constant:=16#27054202#;  -- Slider for adjustment: volumE#;  --
   DIBUTTON_REMOTE_TV                      :constant:=16#27005C08#;  -- Select TV #  --
   DIBUTTON_REMOTE_CABLE                   :constant:=16#27005C09#;  -- Select cable box #  --
   DIBUTTON_REMOTE_CD                      :constant:=16#27005C0A#;  -- Select CD player #  --
   DIBUTTON_REMOTE_VCR                     :constant:=16#27005C0B#;  -- Select VCR #  --
   DIBUTTON_REMOTE_TUNER                   :constant:=16#27005C0C#;  -- Select tuner #  --
   DIBUTTON_REMOTE_DVD                     :constant:=16#27005C0D#;  -- Select DVD player #  --
   DIBUTTON_REMOTE_ADJUST                  :constant:=16#27005C0E#;  -- Enter device adjustment menu #  --
   DIBUTTON_REMOTE_DIGIT0                  :constant:=16#2700540F#;  --     DIgit 0#;  --
   DIBUTTON_REMOTE_DIGIT1                  :constant:=16#27005410#;  --     DIgit 1#;  --
   DIBUTTON_REMOTE_DIGIT2                  :constant:=16#27005411#;  --     DIgit 2#;  --
   DIBUTTON_REMOTE_DIGIT3                  :constant:=16#27005412#;  --     DIgit 3#;  --
   DIBUTTON_REMOTE_DIGIT4                  :constant:=16#27005413#;  --     DIgit 4#;  --
   DIBUTTON_REMOTE_DIGIT5                  :constant:=16#27005414#;  --     DIgit 5#;  --
   DIBUTTON_REMOTE_DIGIT6                  :constant:=16#27005415#;  --     DIgit 6#;  --
   DIBUTTON_REMOTE_DIGIT7                  :constant:=16#27005416#;  --     DIgit 7#;  --
   DIBUTTON_REMOTE_DIGIT8                  :constant:=16#27005417#;  --     DIgit 8#;  --
   DIBUTTON_REMOTE_DIGIT9                  :constant:=16#27005418#;  --     DIgit 9#;  --
   DIBUTTON_REMOTE_DEVICE                  :constant:=16#270044FE#;  -- Show input device and controls #  --
   DIBUTTON_REMOTE_PAUSE                   :constant:=16#270044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_BROWSER_CONTROL               :constant:=16#28000000#;
   DIAXIS_BROWSER_LATERAL                  :constant:=16#28008201#;  -- Move on screen pointer #  --
   DIAXIS_BROWSER_MOVE                     :constant:=16#28010202#;  -- Move on screen pointer #  --
   DIBUTTON_BROWSER_SELECT                 :constant:=16#28000401#;  -- Select current item #  --
   DIAXIS_BROWSER_VIEW                     :constant:=16#28018203#;  -- Move view up/down #  --
   DIBUTTON_BROWSER_REFRESH                :constant:=16#28000402#;  -- Refresh #  --
   DIBUTTON_BROWSER_MENU                   :constant:=16#280004FD#;  -- Show menu options #  --


   DIBUTTON_BROWSER_SEARCH                 :constant:=16#28004403#;  -- Use search tool #  --
   DIBUTTON_BROWSER_STOP                   :constant:=16#28004404#;  -- Cease current updatE#;  --
   DIBUTTON_BROWSER_HOME                   :constant:=16#28004405#;  -- Go     DIrectly to "home" location #  --
   DIBUTTON_BROWSER_FAVORITES              :constant:=16#28004406#;  -- Mark current site as favoritE#;  --
   DIBUTTON_BROWSER_NEXT                   :constant:=16#28004407#;  -- Select Next pagE#;  --
   DIBUTTON_BROWSER_PREVIOUS               :constant:=16#28004408#;  -- Select Previous pagE#;  --
   DIBUTTON_BROWSER_HISTORY                :constant:=16#28004409#;  -- Show/Hide History #  --
   DIBUTTON_BROWSER_PRINT                  :constant:=16#2800440A#;  -- Print current pagE#;  --
   DIBUTTON_BROWSER_DEVICE                 :constant:=16#280044FE#;  -- Show input device and controls #  --
   DIBUTTON_BROWSER_PAUSE                  :constant:=16#280044FC#;  -- Start / Pause / Restart gamE#;  --


   DIVIRTUAL_DRIVING_MECHA                 :constant:=16#29000000#;
   DIAXIS_MECHA_STEER                      :constant:=16#29008201#;  -- Turns mecha left/right #  --
   DIAXIS_MECHA_TORSO                      :constant:=16#29010202#;  -- Tilts torso forward/backwarD#;  --
   DIAXIS_MECHA_ROTATE                     :constant:=16#29020203#;  -- Turns torso left/right #  --
   DIAXIS_MECHA_THROTTLE                   :constant:=16#29038204#;  -- Engine SpeeD#;  --
   DIBUTTON_MECHA_FIRE                     :constant:=16#29000401#;  -- FirE#;  --
   DIBUTTON_MECHA_WEAPONS                  :constant:=16#29000402#;  -- Select next weapon group #  --
   DIBUTTON_MECHA_TARGET                   :constant:=16#29000403#;  -- Select closest enemy available target #  --
   DIBUTTON_MECHA_REVERSE                  :constant:=16#29000404#;  -- Toggles throttle in/out of reversE#;  --
   DIBUTTON_MECHA_ZOOM                     :constant:=16#29000405#;  -- Zoom in/out targeting reticulE#;  --
   DIBUTTON_MECHA_JUMP                     :constant:=16#29000406#;  -- Fires jump jets #  --
   DIBUTTON_MECHA_MENU                     :constant:=16#290004FD#;  -- Show menu options #  --


   DIBUTTON_MECHA_CENTER                   :constant:=16#29004407#;  -- Center torso to legs #  --
   DIHATSWITCH_MECHA_GLANCE                :constant:=16#29004601#;  -- Look arounD#;  --
   DIBUTTON_MECHA_VIEW                     :constant:=16#29004408#;  -- Cycle through view options #  --
   DIBUTTON_MECHA_FIRESECONDARY            :constant:=16#29004409#;  -- Alternative fire button #  --
   DIBUTTON_MECHA_LEFT_LINK                :constant:=16#2900C4E4#;  -- Fallback steer left button #  --
   DIBUTTON_MECHA_RIGHT_LINK               :constant:=16#2900C4EC#;  -- Fallback steer right button #  --
   DIBUTTON_MECHA_FORWARD_LINK             :constant:=16#290144E0#;  -- Fallback tilt torso forward button #  --
   DIBUTTON_MECHA_BACK_LINK                :constant:=16#290144E8#;  -- Fallback tilt toroso backward button #  --
   DIBUTTON_MECHA_ROTATE_LEFT_LINK         :constant:=16#290244E4#;  -- Fallback rotate toroso right button #  --
   DIBUTTON_MECHA_ROTATE_RIGHT_LINK        :constant:=16#290244EC#;  -- Fallback rotate torso left button #  --
   DIBUTTON_MECHA_FASTER_LINK              :constant:=16#2903C4E0#;  -- Fallback increase engine speeD#;  --
   DIBUTTON_MECHA_SLOWER_LINK              :constant:=16#2903C4E8#;  -- Fallback decrease engine speeD#;  --
   DIBUTTON_MECHA_DEVICE                   :constant:=16#290044FE#;  -- Show input device and controls #  --
   DIBUTTON_MECHA_PAUSE                    :constant:=16#290044FC#;  -- Start / Pause / Restart gamE#;  --


   DIAXIS_ANY_X_1                          :constant:=16#FF00C201#; 
   DIAXIS_ANY_X_2                          :constant:=16#FF00C202#; 
   DIAXIS_ANY_Y_1                          :constant:=16#FF014201#; 
   DIAXIS_ANY_Y_2                          :constant:=16#FF014202#; 
   DIAXIS_ANY_Z_1                          :constant:=16#FF01C201#; 
   DIAXIS_ANY_Z_2                          :constant:=16#FF01C202#; 
   DIAXIS_ANY_R_1                          :constant:=16#FF024201#; 
   DIAXIS_ANY_R_2                          :constant:=16#FF024202#; 
   DIAXIS_ANY_U_1                          :constant:=16#FF02C201#; 
   DIAXIS_ANY_U_2                          :constant:=16#FF02C202#; 
   DIAXIS_ANY_V_1                          :constant:=16#FF034201#; 
   DIAXIS_ANY_V_2                          :constant:=16#FF034202#; 
   DIAXIS_ANY_A_1                          :constant:=16#FF03C201#; 
   DIAXIS_ANY_A_2                          :constant:=16#FF03C202#; 
   DIAXIS_ANY_B_1                          :constant:=16#FF044201#; 
   DIAXIS_ANY_B_2                          :constant:=16#FF044202#; 
   DIAXIS_ANY_C_1                          :constant:=16#FF04C201#; 
   DIAXIS_ANY_C_2                          :constant:=16#FF04C202#; 
   DIAXIS_ANY_S_1                          :constant:=16#FF054201#; 
   DIAXIS_ANY_S_2                          :constant:=16#FF054202#; 

   DIAXIS_ANY_1                            :constant:=16#FF004201#; 
   DIAXIS_ANY_2                            :constant:=16#FF004202#; 
   DIAXIS_ANY_3                            :constant:=16#FF004203#; 
   DIAXIS_ANY_4                            :constant:=16#FF004204#; 

   DIPOV_ANY_1                             :constant:=16#FF004601#; 
   DIPOV_ANY_2                             :constant:=16#FF004602#; 
   DIPOV_ANY_3                             :constant:=16#FF004603#; 
   DIPOV_ANY_4                             :constant:=16#FF004604#; 

     
   function DIBUTTON_ANY(instance:win32.objbase.HRESULT) return win32.objbase.HRESULT;  
     
     
   JOY_PASSDRIVERDATA          :constant:=16#10000000#;

   function joyConfigChanged(dwFlags:DWORD) return win32.UINT;
   pragma import(C,joyConfigChanged,"joyConfigChanged");
    

   procedure ShowJoyCPL(HW:win32.windef.HWND);
   pragma import(C,ShowJoyCPL,"ShowJoyCPL");

   type LPFNSHOWJOYCPL is access procedure(HW:win32.windef.HWND);


   JOY_HWS_ISHEADTRACKER       :constant:=16#02000000#;
   JOY_HWS_ISGAMEPORTDRIVER    :constant:=16#04000000#;
   JOY_HWS_ISANALOGPORTDRIVER  :constant:=16#08000000#;
   JOY_HWS_AUTOLOAD            :constant:=16#10000000#;
   JOY_HWS_NODEVNODE           :constant:=16#20000000#;
   JOY_HWS_ISGAMEPORTBUS       :constant:=16#80000000#;
   JOY_HWS_GAMEPORTBUSBUSY     :constant:=16#00000001#;
   JOY_US_VOLATILE             :constant:=16#00000008#;
   JOY_OEMPOLL_PASSDRIVERDATA  :constant:=7;


PRIVATE
   PRAGMA LINKER_OPTIONS("C:\WINDOWS\system32\dinput8.dll");
   PRAGMA LINKER_OPTIONS("C:\WINDOWS\system32\dinput.dll");
   PRAGMA LINKER_OPTIONS("C:\WINDOWS\system32\joy.cpl");
    
   --THE STATIC LIBRARY YOU CAN FIND IN GPL--
   --pragma LINKER_OPTIONS("libdinput.a");
   --pragma LINKER_OPTIONS("libwinmm.a");
    
end dinput;

 

------------------------------------
-- DirectX for Ada:dinput package --
--   From Microsoft DirectX SDK   --
--      By Dongfeng.Gu,2008/5     --
------------------------------------
with interfaces.C;
with Ada.unchecked_conversion;
package body dinput is

   --Get Lower Byte of a word--
   function LOBYTE(W:Word) return Byte is
      use interfaces.c;
   begin
      return(BYTE'VALUE(word'image(2#0000_0000_1111_1111# and W)));
   end LOBYTE;
    
   --Get High Byte of a word--
   function HIBYTE(W:Word) return BYTE is
      use interfaces.c;
   begin
      return(BYTE'VALUE(word'image(2#1111_1111_0000_0000# and W)));
   end HIBYTE;

   function DIEFT_GETTYPE(w:word) return BYTE is
   begin
      return LOBYTE(w);
   end DIEFT_GETTYPE;
    
   function LOBYTE(DT:DWORD) return BYTE is
      use interfaces.c;
   begin
      return BYTE'VALUE(DWORD'image(2#0000_0000_0000_0000_0000_0000_1111_1111# and DT));
   end LOBYTE;
    
   function HIBYTE(DT:DWORD) return BYTE is
      use interfaces.c;
   begin
      return BYTE'VALUE(DWORD'IMAGE(2#0000_0000_0000_0000_1111_1111_0000_0000# and DT));
   end HIBYTE;
    
   function GET_DIDEVICE_TYPE   (DT:dwDevType) return BYTE is
   begin
      return LOBYTE(DT);
   end GET_DIDEVICE_TYPE;
    
   function GET_DIDEVICE_SUBTYPE(DT:dwDevType) return BYTE is
   begin
      return HIBYTE(DT);
   end GET_DIDEVICE_SUBTYPE;
    
   function DIDFT_MAKEINSTANCE(n:DWORD) return DWORD is
      use interfaces.C;
   begin
      return (16#0000_FFFF# and n)*2**8;
   end DIDFT_MAKEINSTANCE;
    
   function DIDFT_GETTYPE(n:DWORD) return BYTE is
   begin
      return LOBYTE(n);
   end DIDFT_GETTYPE;
    
   function DIDFT_GETINSTANCE(n:DWORD) return DWORD is
      use interfaces.C;
   begin
      return (16#0000_FFFF# and n)/2**8;
   end DIDFT_GETINSTANCE;
    
   function DIDFT_ENUMCOLLECTION(n:DWORD) return DWORD is
      use interfaces.C;
   begin
      return (16#0000_FFFF# and n)*2**8;
   end DIDFT_ENUMCOLLECTION;
    
   function DIMAKEUSAGEDWORD(UsagePage:WORD;Usage:WORD) return DWORD is
   begin
      return win32.windef.MAKELONG(Usage,UsagePage);
   end DIMAKEUSAGEDWORD;
    
   function MAKEDIPROP(prop:DWORD) return Win32.objbase.REFGUID is
      function UC is new Ada.unchecked_conversion(WIN32.DWORD,win32.objbase.REFGUID); 
   begin
      return uc(prop);
   end MAKEDIPROP;
    
   function DIBUTTON_ANY(instance:win32.objbase.HRESULT) return win32.objbase.HRESULT is
   begin
      return win32.objbase.HRESULT(DWORD(16#FF004400#) or  DWORD(instance));
   end DIBUTTON_ANY;
    
   FUNCTION MAKE_HRESULT(sev, fac, code : WORD) RETURN WIN32.OBJBASE.HRESULT is
      USE TYPE Interfaces.C.unsigned_short;
      type QWORD is mod 2**64;
      for QWORD'SIZE USE 64;
      pragma warnings(off);
      --LARGE SIZE TO SMALL SIZE,GET THE LOWER PART--
      FUNCTION UC IS NEW ADA.UNCHECKED_CONVERSION(QWORD,WIN32.OBJBASE.HRESULT);
      pragma warnings(off);
   begin
      RETURN UC(QWORD(sev)*2**31 OR QWORD(fac)*2**16 OR QWORD(code));  
   end MAKE_HRESULT;
    
   FUNCTION MAKE_HRESULT(sev, fac, code : DWORD) RETURN WIN32.OBJBASE.HRESULT is
      USE TYPE Interfaces.C.unsigned_short;
      type QWORD is mod 2**64;
      for QWORD'SIZE USE 64;
      pragma warnings(off);
      --LARGE SIZE TO SMALL SIZE,GET THE LOWER PART--
      FUNCTION UC IS NEW ADA.UNCHECKED_CONVERSION(QWORD,WIN32.OBJBASE.HRESULT);
      pragma warnings(off);
   begin
      RETURN UC(QWORD(sev)*2**31 OR QWORD(fac)*2**16 OR QWORD(code));  
   end MAKE_HRESULT;
    
   function DISEQUENCE_COMPARE(seq1:DWORD;oper:OPERATOR;seq2:DWORD) RETURN BOOL is
   begin
      case oper is
      when E =>
         if seq1=seq2 then
            return 1;
         else
            return 0;
         end if;
        
      when NE =>
         if seq1=seq2 then
            return 0;
         else 
            return 1;
         end if;
        
      when L =>
         if seq1>seq2 then
            return 1;
         else
            return 0;
         end if;
        
      when S=>
         if seq1<seq2 then
            return 1;
         else
            return 0;
         end if;
        
      when LE=>
         if seq1>=seq2 then
            return 1;
         else 
            return 0;
         end if;
        
      when SE=>
         if seq1<=seq2 then
            return 1;
         else 
            return 0;
         end if;
        
      end case;
   end DISEQUENCE_COMPARE;

end dinput;

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值