Hi I've tried googling this but it keeps coming up with either C++ or C# examples, I'd like an example in pure ANSI C, reason for this is I'm trying to make a custom framework that can compile in C++, C# and OBJC with little or no errors (hence ANSI C89/C90).
I'd like examples for keyboards, mice and joy pads. (As a note I'm using keybd, mouse and joypd respectively for my variables).
Edit: I'm going to bed now, probably won't check back until about 16:00 onwards tomorrow
Edit:
Found out that I was more or less doing it right but just needed to add ->lpVtbl between the objects and the functions and then also reference the obj as the first parameter. To deal with that pain of a difference I'll use a macro like this:
||=== Build: libzxs-x64-d-vc in libzxs (compiler: Microsoft Visual C++ 2010) ===|
main.c|309|error C2039: 'CreateDevice' : is not a member of 'IDirectInput8A'|
main.c|318|error C2039: 'SetDataFormat' : is not a member of 'IDirectInputDevice8A'|
main.c|319|error C2039: 'SetCooperativeLevel' : is not a member of 'IDirectInputDevice8A'|
||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|