-
Notifications
You must be signed in to change notification settings - Fork 4
/
dinput.h
4421 lines (3923 loc) · 218 KB
/
dinput.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#ifndef DIRECTINPUT_VERSION
#define DIRECTINPUT_VERSION 0x0800
#endif
/****************************************************************************
*
* Copyright (C) 1996-2000 Microsoft Corporation. All Rights Reserved.
*
* File: dinput.h
* Content: DirectInput include file
*
****************************************************************************/
#ifndef __DINPUT_INCLUDED__
#define __DINPUT_INCLUDED__
#ifndef DIJ_RINGZERO
#ifdef _WIN32
#define COM_NO_WINDOWS_H
#include <objbase.h>
#endif
#endif /* DIJ_RINGZERO */
#ifdef __cplusplus
extern "C" {
#endif
/*
* To build applications for older versions of DirectInput
*
* #define DIRECTINPUT_VERSION [ 0x0300 | 0x0500 | 0x0700 ]
*
* before #include <dinput.h>. By default, #include <dinput.h>
* will produce a DirectX 8-compatible header file.
*
*/
#define DIRECTINPUT_HEADER_VERSION 0x0800
#ifndef DIRECTINPUT_VERSION
#define DIRECTINPUT_VERSION DIRECTINPUT_HEADER_VERSION
#pragma message(__FILE__ ": DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800")
#endif
#ifndef DIJ_RINGZERO
/****************************************************************************
*
* Class IDs
*
****************************************************************************/
DEFINE_GUID(CLSID_DirectInput, 0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(CLSID_DirectInputDevice, 0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(CLSID_DirectInput8, 0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(CLSID_DirectInputDevice8,0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
/****************************************************************************
*
* Interfaces
*
****************************************************************************/
DEFINE_GUID(IID_IDirectInputA, 0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInputW, 0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInput2A, 0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInput2W, 0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInput7A, 0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
DEFINE_GUID(IID_IDirectInput7W, 0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
DEFINE_GUID(IID_IDirectInput8A, 0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
DEFINE_GUID(IID_IDirectInput8W, 0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
DEFINE_GUID(IID_IDirectInputDeviceA, 0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInputDeviceW, 0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInputDevice2A,0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInputDevice2W,0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInputDevice7A,0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
DEFINE_GUID(IID_IDirectInputDevice7W,0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
DEFINE_GUID(IID_IDirectInputDevice8A,0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
DEFINE_GUID(IID_IDirectInputDevice8W,0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
DEFINE_GUID(IID_IDirectInputEffect, 0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
/****************************************************************************
*
* Predefined object types
*
****************************************************************************/
DEFINE_GUID(GUID_XAxis, 0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_YAxis, 0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_ZAxis, 0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_RxAxis, 0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_RyAxis, 0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_RzAxis, 0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_Slider, 0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_Button, 0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_Key, 0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_POV, 0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_Unknown, 0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
/****************************************************************************
*
* Predefined product GUIDs
*
****************************************************************************/
DEFINE_GUID(GUID_SysMouse, 0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_SysKeyboard,0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_Joystick ,0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_SysMouseEm, 0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_SysMouseEm2,0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_SysKeyboardEm, 0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_SysKeyboardEm2,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
/****************************************************************************
*
* Predefined force feedback effects
*
****************************************************************************/
DEFINE_GUID(GUID_ConstantForce, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_RampForce, 0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_Square, 0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_Sine, 0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_Triangle, 0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_SawtoothUp, 0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_SawtoothDown, 0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_Spring, 0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_Damper, 0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_Inertia, 0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_Friction, 0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_CustomForce, 0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
#endif /* DIJ_RINGZERO */
/****************************************************************************
*
* Interfaces and Structures...
*
****************************************************************************/
#if(DIRECTINPUT_VERSION >= 0x0500)
/****************************************************************************
*
* IDirectInputEffect
*
****************************************************************************/
#define DIEFT_ALL 0x00000000
#define DIEFT_CONSTANTFORCE 0x00000001
#define DIEFT_RAMPFORCE 0x00000002
#define DIEFT_PERIODIC 0x00000003
#define DIEFT_CONDITION 0x00000004
#define DIEFT_CUSTOMFORCE 0x00000005
#define DIEFT_HARDWARE 0x000000FF
#define DIEFT_FFATTACK 0x00000200
#define DIEFT_FFFADE 0x00000400
#define DIEFT_SATURATION 0x00000800
#define DIEFT_POSNEGCOEFFICIENTS 0x00001000
#define DIEFT_POSNEGSATURATION 0x00002000
#define DIEFT_DEADBAND 0x00004000
#define DIEFT_STARTDELAY 0x00008000
#define DIEFT_GETTYPE(n) LOBYTE(n)
#define DI_DEGREES 100
#define DI_FFNOMINALMAX 10000
#define DI_SECONDS 1000000
typedef struct DICONSTANTFORCE {
LONG lMagnitude;
} DICONSTANTFORCE, *LPDICONSTANTFORCE;
typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE;
typedef struct DIRAMPFORCE {
LONG lStart;
LONG lEnd;
} DIRAMPFORCE, *LPDIRAMPFORCE;
typedef const DIRAMPFORCE *LPCDIRAMPFORCE;
typedef struct DIPERIODIC {
DWORD dwMagnitude;
LONG lOffset;
DWORD dwPhase;
DWORD dwPeriod;
} DIPERIODIC, *LPDIPERIODIC;
typedef const DIPERIODIC *LPCDIPERIODIC;
typedef struct DICONDITION {
LONG lOffset;
LONG lPositiveCoefficient;
LONG lNegativeCoefficient;
DWORD dwPositiveSaturation;
DWORD dwNegativeSaturation;
LONG lDeadBand;
} DICONDITION, *LPDICONDITION;
typedef const DICONDITION *LPCDICONDITION;
typedef struct DICUSTOMFORCE {
DWORD cChannels;
DWORD dwSamplePeriod;
DWORD cSamples;
LPLONG rglForceData;
} DICUSTOMFORCE, *LPDICUSTOMFORCE;
typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE;
typedef struct DIENVELOPE {
DWORD dwSize; /* sizeof(DIENVELOPE) */
DWORD dwAttackLevel;
DWORD dwAttackTime; /* Microseconds */
DWORD dwFadeLevel;
DWORD dwFadeTime; /* Microseconds */
} DIENVELOPE, *LPDIENVELOPE;
typedef const DIENVELOPE *LPCDIENVELOPE;
/* This structure is defined for DirectX 5.0 compatibility */
typedef struct DIEFFECT_DX5 {
DWORD dwSize; /* sizeof(DIEFFECT_DX5) */
DWORD dwFlags; /* DIEFF_* */
DWORD dwDuration; /* Microseconds */
DWORD dwSamplePeriod; /* Microseconds */
DWORD dwGain;
DWORD dwTriggerButton; /* or DIEB_NOTRIGGER */
DWORD dwTriggerRepeatInterval; /* Microseconds */
DWORD cAxes; /* Number of axes */
LPDWORD rgdwAxes; /* Array of axes */
LPLONG rglDirection; /* Array of directions */
LPDIENVELOPE lpEnvelope; /* Optional */
DWORD cbTypeSpecificParams; /* Size of params */
LPVOID lpvTypeSpecificParams; /* Pointer to params */
} DIEFFECT_DX5, *LPDIEFFECT_DX5;
typedef const DIEFFECT_DX5 *LPCDIEFFECT_DX5;
typedef struct DIEFFECT {
DWORD dwSize; /* sizeof(DIEFFECT) */
DWORD dwFlags; /* DIEFF_* */
DWORD dwDuration; /* Microseconds */
DWORD dwSamplePeriod; /* Microseconds */
DWORD dwGain;
DWORD dwTriggerButton; /* or DIEB_NOTRIGGER */
DWORD dwTriggerRepeatInterval; /* Microseconds */
DWORD cAxes; /* Number of axes */
LPDWORD rgdwAxes; /* Array of axes */
LPLONG rglDirection; /* Array of directions */
LPDIENVELOPE lpEnvelope; /* Optional */
DWORD cbTypeSpecificParams; /* Size of params */
LPVOID lpvTypeSpecificParams; /* Pointer to params */
#if(DIRECTINPUT_VERSION >= 0x0600)
DWORD dwStartDelay; /* Microseconds */
#endif /* DIRECTINPUT_VERSION >= 0x0600 */
} DIEFFECT, *LPDIEFFECT;
typedef DIEFFECT DIEFFECT_DX6;
typedef LPDIEFFECT LPDIEFFECT_DX6;
typedef const DIEFFECT *LPCDIEFFECT;
#if(DIRECTINPUT_VERSION >= 0x0700)
#ifndef DIJ_RINGZERO
typedef struct DIFILEEFFECT{
DWORD dwSize;
GUID GuidEffect;
LPCDIEFFECT lpDiEffect;
CHAR szFriendlyName[MAX_PATH];
}DIFILEEFFECT, *LPDIFILEEFFECT;
typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
#endif /* DIJ_RINGZERO */
#endif /* DIRECTINPUT_VERSION >= 0x0700 */
#define DIEFF_OBJECTIDS 0x00000001
#define DIEFF_OBJECTOFFSETS 0x00000002
#define DIEFF_CARTESIAN 0x00000010
#define DIEFF_POLAR 0x00000020
#define DIEFF_SPHERICAL 0x00000040
#define DIEP_DURATION 0x00000001
#define DIEP_SAMPLEPERIOD 0x00000002
#define DIEP_GAIN 0x00000004
#define DIEP_TRIGGERBUTTON 0x00000008
#define DIEP_TRIGGERREPEATINTERVAL 0x00000010
#define DIEP_AXES 0x00000020
#define DIEP_DIRECTION 0x00000040
#define DIEP_ENVELOPE 0x00000080
#define DIEP_TYPESPECIFICPARAMS 0x00000100
#if(DIRECTINPUT_VERSION >= 0x0600)
#define DIEP_STARTDELAY 0x00000200
#define DIEP_ALLPARAMS_DX5 0x000001FF
#define DIEP_ALLPARAMS 0x000003FF
#else /* DIRECTINPUT_VERSION < 0x0600 */
#define DIEP_ALLPARAMS 0x000001FF
#endif /* DIRECTINPUT_VERSION < 0x0600 */
#define DIEP_START 0x20000000
#define DIEP_NORESTART 0x40000000
#define DIEP_NODOWNLOAD 0x80000000
#define DIEB_NOTRIGGER 0xFFFFFFFF
#define DIES_SOLO 0x00000001
#define DIES_NODOWNLOAD 0x80000000
#define DIEGES_PLAYING 0x00000001
#define DIEGES_EMULATED 0x00000002
typedef struct DIEFFESCAPE {
DWORD dwSize;
DWORD dwCommand;
LPVOID lpvInBuffer;
DWORD cbInBuffer;
LPVOID lpvOutBuffer;
DWORD cbOutBuffer;
} DIEFFESCAPE, *LPDIEFFESCAPE;
#ifndef DIJ_RINGZERO
#undef INTERFACE
#define INTERFACE IDirectInputEffect
DECLARE_INTERFACE_(IDirectInputEffect, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputEffect methods ***/
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE;
STDMETHOD(GetParameters)(THIS_ LPDIEFFECT,DWORD) PURE;
STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT,DWORD) PURE;
STDMETHOD(Start)(THIS_ DWORD,DWORD) PURE;
STDMETHOD(Stop)(THIS) PURE;
STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE;
STDMETHOD(Download)(THIS) PURE;
STDMETHOD(Unload)(THIS) PURE;
STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
};
typedef struct IDirectInputEffect *LPDIRECTINPUTEFFECT;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectInputEffect_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectInputEffect_Release(p) (p)->lpVtbl->Release(p)
#define IDirectInputEffect_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
#define IDirectInputEffect_GetEffectGuid(p,a) (p)->lpVtbl->GetEffectGuid(p,a)
#define IDirectInputEffect_GetParameters(p,a,b) (p)->lpVtbl->GetParameters(p,a,b)
#define IDirectInputEffect_SetParameters(p,a,b) (p)->lpVtbl->SetParameters(p,a,b)
#define IDirectInputEffect_Start(p,a,b) (p)->lpVtbl->Start(p,a,b)
#define IDirectInputEffect_Stop(p) (p)->lpVtbl->Stop(p)
#define IDirectInputEffect_GetEffectStatus(p,a) (p)->lpVtbl->GetEffectStatus(p,a)
#define IDirectInputEffect_Download(p) (p)->lpVtbl->Download(p)
#define IDirectInputEffect_Unload(p) (p)->lpVtbl->Unload(p)
#define IDirectInputEffect_Escape(p,a) (p)->lpVtbl->Escape(p,a)
#else
#define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectInputEffect_AddRef(p) (p)->AddRef()
#define IDirectInputEffect_Release(p) (p)->Release()
#define IDirectInputEffect_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
#define IDirectInputEffect_GetEffectGuid(p,a) (p)->GetEffectGuid(a)
#define IDirectInputEffect_GetParameters(p,a,b) (p)->GetParameters(a,b)
#define IDirectInputEffect_SetParameters(p,a,b) (p)->SetParameters(a,b)
#define IDirectInputEffect_Start(p,a,b) (p)->Start(a,b)
#define IDirectInputEffect_Stop(p) (p)->Stop()
#define IDirectInputEffect_GetEffectStatus(p,a) (p)->GetEffectStatus(a)
#define IDirectInputEffect_Download(p) (p)->Download()
#define IDirectInputEffect_Unload(p) (p)->Unload()
#define IDirectInputEffect_Escape(p,a) (p)->Escape(a)
#endif
#endif /* DIJ_RINGZERO */
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
/****************************************************************************
*
* IDirectInputDevice
*
****************************************************************************/
#if DIRECTINPUT_VERSION <= 0x700
#define DIDEVTYPE_DEVICE 1
#define DIDEVTYPE_MOUSE 2
#define DIDEVTYPE_KEYBOARD 3
#define DIDEVTYPE_JOYSTICK 4
#else
#define DI8DEVCLASS_ALL 0
#define DI8DEVCLASS_DEVICE 1
#define DI8DEVCLASS_POINTER 2
#define DI8DEVCLASS_KEYBOARD 3
#define DI8DEVCLASS_GAMECTRL 4
#define DI8DEVTYPE_DEVICE 0x11
#define DI8DEVTYPE_MOUSE 0x12
#define DI8DEVTYPE_KEYBOARD 0x13
#define DI8DEVTYPE_JOYSTICK 0x14
#define DI8DEVTYPE_GAMEPAD 0x15
#define DI8DEVTYPE_DRIVING 0x16
#define DI8DEVTYPE_FLIGHT 0x17
#define DI8DEVTYPE_1STPERSON 0x18
#define DI8DEVTYPE_DEVICECTRL 0x19
#define DI8DEVTYPE_SCREENPOINTER 0x1A
#define DI8DEVTYPE_REMOTE 0x1B
#define DI8DEVTYPE_SUPPLEMENTAL 0x1C
#endif /* DIRECTINPUT_VERSION <= 0x700 */
#define DIDEVTYPE_HID 0x00010000
#if DIRECTINPUT_VERSION <= 0x700
#define DIDEVTYPEMOUSE_UNKNOWN 1
#define DIDEVTYPEMOUSE_TRADITIONAL 2
#define DIDEVTYPEMOUSE_FINGERSTICK 3
#define DIDEVTYPEMOUSE_TOUCHPAD 4
#define DIDEVTYPEMOUSE_TRACKBALL 5
#define DIDEVTYPEKEYBOARD_UNKNOWN 0
#define DIDEVTYPEKEYBOARD_PCXT 1
#define DIDEVTYPEKEYBOARD_OLIVETTI 2
#define DIDEVTYPEKEYBOARD_PCAT 3
#define DIDEVTYPEKEYBOARD_PCENH 4
#define DIDEVTYPEKEYBOARD_NOKIA1050 5
#define DIDEVTYPEKEYBOARD_NOKIA9140 6
#define DIDEVTYPEKEYBOARD_NEC98 7
#define DIDEVTYPEKEYBOARD_NEC98LAPTOP 8
#define DIDEVTYPEKEYBOARD_NEC98106 9
#define DIDEVTYPEKEYBOARD_JAPAN106 10
#define DIDEVTYPEKEYBOARD_JAPANAX 11
#define DIDEVTYPEKEYBOARD_J3100 12
#define DIDEVTYPEJOYSTICK_UNKNOWN 1
#define DIDEVTYPEJOYSTICK_TRADITIONAL 2
#define DIDEVTYPEJOYSTICK_FLIGHTSTICK 3
#define DIDEVTYPEJOYSTICK_GAMEPAD 4
#define DIDEVTYPEJOYSTICK_RUDDER 5
#define DIDEVTYPEJOYSTICK_WHEEL 6
#define DIDEVTYPEJOYSTICK_HEADTRACKER 7
#else
#define DI8DEVTYPEMOUSE_UNKNOWN 1
#define DI8DEVTYPEMOUSE_TRADITIONAL 2
#define DI8DEVTYPEMOUSE_FINGERSTICK 3
#define DI8DEVTYPEMOUSE_TOUCHPAD 4
#define DI8DEVTYPEMOUSE_TRACKBALL 5
#define DI8DEVTYPEMOUSE_ABSOLUTE 6
#define DI8DEVTYPEKEYBOARD_UNKNOWN 0
#define DI8DEVTYPEKEYBOARD_PCXT 1
#define DI8DEVTYPEKEYBOARD_OLIVETTI 2
#define DI8DEVTYPEKEYBOARD_PCAT 3
#define DI8DEVTYPEKEYBOARD_PCENH 4
#define DI8DEVTYPEKEYBOARD_NOKIA1050 5
#define DI8DEVTYPEKEYBOARD_NOKIA9140 6
#define DI8DEVTYPEKEYBOARD_NEC98 7
#define DI8DEVTYPEKEYBOARD_NEC98LAPTOP 8
#define DI8DEVTYPEKEYBOARD_NEC98106 9
#define DI8DEVTYPEKEYBOARD_JAPAN106 10
#define DI8DEVTYPEKEYBOARD_JAPANAX 11
#define DI8DEVTYPEKEYBOARD_J3100 12
#define DI8DEVTYPE_LIMITEDGAMESUBTYPE 1
#define DI8DEVTYPEJOYSTICK_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
#define DI8DEVTYPEJOYSTICK_STANDARD 2
#define DI8DEVTYPEGAMEPAD_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
#define DI8DEVTYPEGAMEPAD_STANDARD 2
#define DI8DEVTYPEGAMEPAD_TILT 3
#define DI8DEVTYPEDRIVING_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
#define DI8DEVTYPEDRIVING_COMBINEDPEDALS 2
#define DI8DEVTYPEDRIVING_DUALPEDALS 3
#define DI8DEVTYPEDRIVING_THREEPEDALS 4
#define DI8DEVTYPEDRIVING_HANDHELD 5
#define DI8DEVTYPEFLIGHT_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
#define DI8DEVTYPEFLIGHT_STICK 2
#define DI8DEVTYPEFLIGHT_YOKE 3
#define DI8DEVTYPEFLIGHT_RC 4
#define DI8DEVTYPE1STPERSON_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
#define DI8DEVTYPE1STPERSON_UNKNOWN 2
#define DI8DEVTYPE1STPERSON_SIXDOF 3
#define DI8DEVTYPE1STPERSON_SHOOTER 4
#define DI8DEVTYPESCREENPTR_UNKNOWN 2
#define DI8DEVTYPESCREENPTR_LIGHTGUN 3
#define DI8DEVTYPESCREENPTR_LIGHTPEN 4
#define DI8DEVTYPESCREENPTR_TOUCH 5
#define DI8DEVTYPEREMOTE_UNKNOWN 2
#define DI8DEVTYPEDEVICECTRL_UNKNOWN 2
#define DI8DEVTYPEDEVICECTRL_COMMSSELECTION 3
#define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4
#define DI8DEVTYPESUPPLEMENTAL_UNKNOWN 2
#define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER 3
#define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER 4
#define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER 5
#define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE 6
#define DI8DEVTYPESUPPLEMENTAL_SHIFTER 7
#define DI8DEVTYPESUPPLEMENTAL_THROTTLE 8
#define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE 9
#define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS 10
#define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS 11
#define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS 12
#define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS 13
#endif /* DIRECTINPUT_VERSION <= 0x700 */
#define GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType)
#define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
#if(DIRECTINPUT_VERSION >= 0x0500)
/* This structure is defined for DirectX 3.0 compatibility */
typedef struct DIDEVCAPS_DX3 {
DWORD dwSize;
DWORD dwFlags;
DWORD dwDevType;
DWORD dwAxes;
DWORD dwButtons;
DWORD dwPOVs;
} DIDEVCAPS_DX3, *LPDIDEVCAPS_DX3;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
typedef struct DIDEVCAPS {
DWORD dwSize;
DWORD dwFlags;
DWORD dwDevType;
DWORD dwAxes;
DWORD dwButtons;
DWORD dwPOVs;
#if(DIRECTINPUT_VERSION >= 0x0500)
DWORD dwFFSamplePeriod;
DWORD dwFFMinTimeResolution;
DWORD dwFirmwareRevision;
DWORD dwHardwareRevision;
DWORD dwFFDriverVersion;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
} DIDEVCAPS, *LPDIDEVCAPS;
#define DIDC_ATTACHED 0x00000001
#define DIDC_POLLEDDEVICE 0x00000002
#define DIDC_EMULATED 0x00000004
#define DIDC_POLLEDDATAFORMAT 0x00000008
#if(DIRECTINPUT_VERSION >= 0x0500)
#define DIDC_FORCEFEEDBACK 0x00000100
#define DIDC_FFATTACK 0x00000200
#define DIDC_FFFADE 0x00000400
#define DIDC_SATURATION 0x00000800
#define DIDC_POSNEGCOEFFICIENTS 0x00001000
#define DIDC_POSNEGSATURATION 0x00002000
#define DIDC_DEADBAND 0x00004000
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
#define DIDC_STARTDELAY 0x00008000
#if(DIRECTINPUT_VERSION >= 0x050a)
#define DIDC_ALIAS 0x00010000
#define DIDC_PHANTOM 0x00020000
#endif /* DIRECTINPUT_VERSION >= 0x050a */
#if(DIRECTINPUT_VERSION >= 0x0800)
#define DIDC_HIDDEN 0x00040000
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
#define DIDFT_ALL 0x00000000
#define DIDFT_RELAXIS 0x00000001
#define DIDFT_ABSAXIS 0x00000002
#define DIDFT_AXIS 0x00000003
#define DIDFT_PSHBUTTON 0x00000004
#define DIDFT_TGLBUTTON 0x00000008
#define DIDFT_BUTTON 0x0000000C
#define DIDFT_POV 0x00000010
#define DIDFT_COLLECTION 0x00000040
#define DIDFT_NODATA 0x00000080
#define DIDFT_ANYINSTANCE 0x00FFFF00
#define DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE
#define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
#define DIDFT_GETTYPE(n) LOBYTE(n)
#define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
#define DIDFT_FFACTUATOR 0x01000000
#define DIDFT_FFEFFECTTRIGGER 0x02000000
#if(DIRECTINPUT_VERSION >= 0x050a)
#define DIDFT_OUTPUT 0x10000000
#define DIDFT_VENDORDEFINED 0x04000000
#define DIDFT_ALIAS 0x08000000
#endif /* DIRECTINPUT_VERSION >= 0x050a */
#ifndef DIDFT_OPTIONAL
#define DIDFT_OPTIONAL 0x80000000
#endif
#define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
#define DIDFT_NOCOLLECTION 0x00FFFF00
#ifndef DIJ_RINGZERO
typedef struct _DIOBJECTDATAFORMAT {
const GUID *pguid;
DWORD dwOfs;
DWORD dwType;
DWORD dwFlags;
} DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
typedef const DIOBJECTDATAFORMAT *LPCDIOBJECTDATAFORMAT;
typedef struct _DIDATAFORMAT {
DWORD dwSize;
DWORD dwObjSize;
DWORD dwFlags;
DWORD dwDataSize;
DWORD dwNumObjs;
LPDIOBJECTDATAFORMAT rgodf;
} DIDATAFORMAT, *LPDIDATAFORMAT;
typedef const DIDATAFORMAT *LPCDIDATAFORMAT;
#define DIDF_ABSAXIS 0x00000001
#define DIDF_RELAXIS 0x00000002
#ifdef __cplusplus
extern "C" {
#endif
extern const DIDATAFORMAT c_dfDIMouse;
#if(DIRECTINPUT_VERSION >= 0x0700)
extern const DIDATAFORMAT c_dfDIMouse2;
#endif /* DIRECTINPUT_VERSION >= 0x0700 */
extern const DIDATAFORMAT c_dfDIKeyboard;
#if(DIRECTINPUT_VERSION >= 0x0500)
extern const DIDATAFORMAT c_dfDIJoystick;
extern const DIDATAFORMAT c_dfDIJoystick2;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
#ifdef __cplusplus
};
#endif
#if DIRECTINPUT_VERSION > 0x0700
typedef struct _DIACTIONA {
UINT_PTR uAppData;
DWORD dwSemantic;
OPTIONAL DWORD dwFlags;
OPTIONAL union {
LPCSTR lptszActionName;
UINT uResIdString;
};
OPTIONAL GUID guidInstance;
OPTIONAL DWORD dwObjID;
OPTIONAL DWORD dwHow;
} DIACTIONA, *LPDIACTIONA ;
typedef struct _DIACTIONW {
UINT_PTR uAppData;
DWORD dwSemantic;
OPTIONAL DWORD dwFlags;
OPTIONAL union {
LPCWSTR lptszActionName;
UINT uResIdString;
};
OPTIONAL GUID guidInstance;
OPTIONAL DWORD dwObjID;
OPTIONAL DWORD dwHow;
} DIACTIONW, *LPDIACTIONW ;
#ifdef UNICODE
typedef DIACTIONW DIACTION;
typedef LPDIACTIONW LPDIACTION;
#else
typedef DIACTIONA DIACTION;
typedef LPDIACTIONA LPDIACTION;
#endif // UNICODE
typedef const DIACTIONA *LPCDIACTIONA;
typedef const DIACTIONW *LPCDIACTIONW;
#ifdef UNICODE
typedef DIACTIONW DIACTION;
typedef LPCDIACTIONW LPCDIACTION;
#else
typedef DIACTIONA DIACTION;
typedef LPCDIACTIONA LPCDIACTION;
#endif // UNICODE
typedef const DIACTION *LPCDIACTION;
#define DIA_FORCEFEEDBACK 0x00000001
#define DIA_APPMAPPED 0x00000002
#define DIA_APPNOMAP 0x00000004
#define DIA_NORANGE 0x00000008
#define DIA_APPFIXED 0x00000010
#define DIAH_UNMAPPED 0x00000000
#define DIAH_USERCONFIG 0x00000001
#define DIAH_APPREQUESTED 0x00000002
#define DIAH_HWAPP 0x00000004
#define DIAH_HWDEFAULT 0x00000008
#define DIAH_DEFAULT 0x00000020
#define DIAH_ERROR 0x80000000
typedef struct _DIACTIONFORMATA {
DWORD dwSize;
DWORD dwActionSize;
DWORD dwDataSize;
DWORD dwNumActions;
LPDIACTIONA rgoAction;
GUID guidActionMap;
DWORD dwGenre;
DWORD dwBufferSize;
OPTIONAL LONG lAxisMin;
OPTIONAL LONG lAxisMax;
OPTIONAL HINSTANCE hInstString;
FILETIME ftTimeStamp;
DWORD dwCRC;
CHAR tszActionMap[MAX_PATH];
} DIACTIONFORMATA, *LPDIACTIONFORMATA;
typedef struct _DIACTIONFORMATW {
DWORD dwSize;
DWORD dwActionSize;
DWORD dwDataSize;
DWORD dwNumActions;
LPDIACTIONW rgoAction;
GUID guidActionMap;
DWORD dwGenre;
DWORD dwBufferSize;
OPTIONAL LONG lAxisMin;
OPTIONAL LONG lAxisMax;
OPTIONAL HINSTANCE hInstString;
FILETIME ftTimeStamp;
DWORD dwCRC;
WCHAR tszActionMap[MAX_PATH];
} DIACTIONFORMATW, *LPDIACTIONFORMATW;
#ifdef UNICODE
typedef DIACTIONFORMATW DIACTIONFORMAT;
typedef LPDIACTIONFORMATW LPDIACTIONFORMAT;
#else
typedef DIACTIONFORMATA DIACTIONFORMAT;
typedef LPDIACTIONFORMATA LPDIACTIONFORMAT;
#endif // UNICODE
typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA;
typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW;
#ifdef UNICODE
typedef DIACTIONFORMATW DIACTIONFORMAT;
typedef LPCDIACTIONFORMATW LPCDIACTIONFORMAT;
#else
typedef DIACTIONFORMATA DIACTIONFORMAT;
typedef LPCDIACTIONFORMATA LPCDIACTIONFORMAT;
#endif // UNICODE
typedef const DIACTIONFORMAT *LPCDIACTIONFORMAT;
#define DIAFTS_NEWDEVICELOW 0xFFFFFFFF
#define DIAFTS_NEWDEVICEHIGH 0xFFFFFFFF
#define DIAFTS_UNUSEDDEVICELOW 0x00000000
#define DIAFTS_UNUSEDDEVICEHIGH 0x00000000
#define DIDBAM_DEFAULT 0x00000000
#define DIDBAM_PRESERVE 0x00000001
#define DIDBAM_INITIALIZE 0x00000002
#define DIDBAM_HWDEFAULTS 0x00000004
#define DIDSAM_DEFAULT 0x00000000
#define DIDSAM_NOUSER 0x00000001
#define DIDSAM_FORCESAVE 0x00000002
#define DICD_DEFAULT 0x00000000
#define DICD_EDIT 0x00000001
/*
* The following definition is normally defined in d3dtypes.h
*/
#ifndef D3DCOLOR_DEFINED
typedef DWORD D3DCOLOR;
#define D3DCOLOR_DEFINED
#endif
typedef struct _DICOLORSET{
DWORD dwSize;
D3DCOLOR cTextFore;
D3DCOLOR cTextHighlight;
D3DCOLOR cCalloutLine;
D3DCOLOR cCalloutHighlight;
D3DCOLOR cBorder;
D3DCOLOR cControlFill;
D3DCOLOR cHighlightFill;
D3DCOLOR cAreaFill;
} DICOLORSET, *LPDICOLORSET;
typedef const DICOLORSET *LPCDICOLORSET;
typedef struct _DICONFIGUREDEVICESPARAMSA{
DWORD dwSize;
DWORD dwcUsers;
LPSTR lptszUserNames;
DWORD dwcFormats;
LPDIACTIONFORMATA lprgFormats;
HWND hwnd;
DICOLORSET dics;
IUnknown FAR * lpUnkDDSTarget;
} DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA;
typedef struct _DICONFIGUREDEVICESPARAMSW{
DWORD dwSize;
DWORD dwcUsers;
LPWSTR lptszUserNames;
DWORD dwcFormats;
LPDIACTIONFORMATW lprgFormats;
HWND hwnd;
DICOLORSET dics;
IUnknown FAR * lpUnkDDSTarget;
} DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW;
#ifdef UNICODE
typedef DICONFIGUREDEVICESPARAMSW DICONFIGUREDEVICESPARAMS;
typedef LPDICONFIGUREDEVICESPARAMSW LPDICONFIGUREDEVICESPARAMS;
#else
typedef DICONFIGUREDEVICESPARAMSA DICONFIGUREDEVICESPARAMS;
typedef LPDICONFIGUREDEVICESPARAMSA LPDICONFIGUREDEVICESPARAMS;
#endif // UNICODE
typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;
typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;
#ifdef UNICODE
typedef DICONFIGUREDEVICESPARAMSW DICONFIGUREDEVICESPARAMS;
typedef LPCDICONFIGUREDEVICESPARAMSW LPCDICONFIGUREDEVICESPARAMS;
#else
typedef DICONFIGUREDEVICESPARAMSA DICONFIGUREDEVICESPARAMS;
typedef LPCDICONFIGUREDEVICESPARAMSA LPCDICONFIGUREDEVICESPARAMS;
#endif // UNICODE
typedef const DICONFIGUREDEVICESPARAMS *LPCDICONFIGUREDEVICESPARAMS;
#define DIDIFT_CONFIGURATION 0x00000001
#define DIDIFT_OVERLAY 0x00000002
#define DIDAL_CENTERED 0x00000000
#define DIDAL_LEFTALIGNED 0x00000001
#define DIDAL_RIGHTALIGNED 0x00000002
#define DIDAL_MIDDLE 0x00000000
#define DIDAL_TOPALIGNED 0x00000004
#define DIDAL_BOTTOMALIGNED 0x00000008
typedef struct _DIDEVICEIMAGEINFOA {
CHAR tszImagePath[MAX_PATH];
DWORD dwFlags;
// These are valid if DIDIFT_OVERLAY is present in dwFlags.
DWORD dwViewID;
RECT rcOverlay;
DWORD dwObjID;
DWORD dwcValidPts;
POINT rgptCalloutLine[5];
RECT rcCalloutRect;
DWORD dwTextAlign;
} DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA;
typedef struct _DIDEVICEIMAGEINFOW {
WCHAR tszImagePath[MAX_PATH];
DWORD dwFlags;
// These are valid if DIDIFT_OVERLAY is present in dwFlags.
DWORD dwViewID;
RECT rcOverlay;
DWORD dwObjID;
DWORD dwcValidPts;
POINT rgptCalloutLine[5];
RECT rcCalloutRect;
DWORD dwTextAlign;
} DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW;
#ifdef UNICODE
typedef DIDEVICEIMAGEINFOW DIDEVICEIMAGEINFO;
typedef LPDIDEVICEIMAGEINFOW LPDIDEVICEIMAGEINFO;
#else
typedef DIDEVICEIMAGEINFOA DIDEVICEIMAGEINFO;
typedef LPDIDEVICEIMAGEINFOA LPDIDEVICEIMAGEINFO;
#endif // UNICODE
typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA;
typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW;
#ifdef UNICODE
typedef DIDEVICEIMAGEINFOW DIDEVICEIMAGEINFO;
typedef LPCDIDEVICEIMAGEINFOW LPCDIDEVICEIMAGEINFO;
#else
typedef DIDEVICEIMAGEINFOA DIDEVICEIMAGEINFO;
typedef LPCDIDEVICEIMAGEINFOA LPCDIDEVICEIMAGEINFO;
#endif // UNICODE
typedef const DIDEVICEIMAGEINFO *LPCDIDEVICEIMAGEINFO;
typedef struct _DIDEVICEIMAGEINFOHEADERA {
DWORD dwSize;
DWORD dwSizeImageInfo;
DWORD dwcViews;
DWORD dwcButtons;
DWORD dwcAxes;
DWORD dwcPOVs;
DWORD dwBufferSize;
DWORD dwBufferUsed;
LPDIDEVICEIMAGEINFOA lprgImageInfoArray;
} DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA;
typedef struct _DIDEVICEIMAGEINFOHEADERW {
DWORD dwSize;
DWORD dwSizeImageInfo;
DWORD dwcViews;
DWORD dwcButtons;
DWORD dwcAxes;
DWORD dwcPOVs;
DWORD dwBufferSize;
DWORD dwBufferUsed;
LPDIDEVICEIMAGEINFOW lprgImageInfoArray;
} DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW;
#ifdef UNICODE
typedef DIDEVICEIMAGEINFOHEADERW DIDEVICEIMAGEINFOHEADER;
typedef LPDIDEVICEIMAGEINFOHEADERW LPDIDEVICEIMAGEINFOHEADER;
#else
typedef DIDEVICEIMAGEINFOHEADERA DIDEVICEIMAGEINFOHEADER;
typedef LPDIDEVICEIMAGEINFOHEADERA LPDIDEVICEIMAGEINFOHEADER;
#endif // UNICODE
typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA;
typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW;
#ifdef UNICODE
typedef DIDEVICEIMAGEINFOHEADERW DIDEVICEIMAGEINFOHEADER;
typedef LPCDIDEVICEIMAGEINFOHEADERW LPCDIDEVICEIMAGEINFOHEADER;
#else
typedef DIDEVICEIMAGEINFOHEADERA DIDEVICEIMAGEINFOHEADER;
typedef LPCDIDEVICEIMAGEINFOHEADERA LPCDIDEVICEIMAGEINFOHEADER;
#endif // UNICODE
typedef const DIDEVICEIMAGEINFOHEADER *LPCDIDEVICEIMAGEINFOHEADER;
#endif /* DIRECTINPUT_VERSION > 0x0700 */
#if(DIRECTINPUT_VERSION >= 0x0500)
/* These structures are defined for DirectX 3.0 compatibility */
typedef struct DIDEVICEOBJECTINSTANCE_DX3A {
DWORD dwSize;
GUID guidType;
DWORD dwOfs;
DWORD dwType;
DWORD dwFlags;
CHAR tszName[MAX_PATH];
} DIDEVICEOBJECTINSTANCE_DX3A, *LPDIDEVICEOBJECTINSTANCE_DX3A;
typedef struct DIDEVICEOBJECTINSTANCE_DX3W {
DWORD dwSize;
GUID guidType;
DWORD dwOfs;
DWORD dwType;
DWORD dwFlags;
WCHAR tszName[MAX_PATH];
} DIDEVICEOBJECTINSTANCE_DX3W, *LPDIDEVICEOBJECTINSTANCE_DX3W;
#ifdef UNICODE
typedef DIDEVICEOBJECTINSTANCE_DX3W DIDEVICEOBJECTINSTANCE_DX3;
typedef LPDIDEVICEOBJECTINSTANCE_DX3W LPDIDEVICEOBJECTINSTANCE_DX3;
#else
typedef DIDEVICEOBJECTINSTANCE_DX3A DIDEVICEOBJECTINSTANCE_DX3;
typedef LPDIDEVICEOBJECTINSTANCE_DX3A LPDIDEVICEOBJECTINSTANCE_DX3;
#endif // UNICODE
typedef const DIDEVICEOBJECTINSTANCE_DX3A *LPCDIDEVICEOBJECTINSTANCE_DX3A;
typedef const DIDEVICEOBJECTINSTANCE_DX3W *LPCDIDEVICEOBJECTINSTANCE_DX3W;
typedef const DIDEVICEOBJECTINSTANCE_DX3 *LPCDIDEVICEOBJECTINSTANCE_DX3;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
typedef struct DIDEVICEOBJECTINSTANCEA {
DWORD dwSize;
GUID guidType;
DWORD dwOfs;
DWORD dwType;
DWORD dwFlags;
CHAR tszName[MAX_PATH];
#if(DIRECTINPUT_VERSION >= 0x0500)
DWORD dwFFMaxForce;
DWORD dwFFForceResolution;
WORD wCollectionNumber;
WORD wDesignatorIndex;
WORD wUsagePage;
WORD wUsage;
DWORD dwDimension;
WORD wExponent;
WORD wReportId;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
} DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;
typedef struct DIDEVICEOBJECTINSTANCEW {
DWORD dwSize;
GUID guidType;
DWORD dwOfs;
DWORD dwType;
DWORD dwFlags;
WCHAR tszName[MAX_PATH];
#if(DIRECTINPUT_VERSION >= 0x0500)
DWORD dwFFMaxForce;
DWORD dwFFForceResolution;
WORD wCollectionNumber;
WORD wDesignatorIndex;
WORD wUsagePage;
WORD wUsage;
DWORD dwDimension;
WORD wExponent;
WORD wReportId;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
} DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW;