Search found 10 matches

by Julian
Fri Jan 16, 2009 11:45 am
Forum: Developer's Forum for Windows
Topic: HOW TO BUILD STATIC LIB FOR SPACEMOUSE?
Replies: 9
Views: 16569

If your hWndMain is NULL, your CreateWindow isn't working. A NULL hWnd will cause your SiOpen to fail. Jwick, thank you for the reply! I compared my code with the demo code and found that my code was compiled with Unicode. So I just changed it to default and made it compiled again, then my test cod...
by Julian
Fri Jan 16, 2009 5:10 am
Forum: Developer's Forum for Windows
Topic: HOW TO BUILD STATIC LIB FOR SPACEMOUSE?
Replies: 9
Views: 16569

Why can not hWndMain & devHdl get value?

SOrry jwick, I have got a new problem. My test code can not initialize spaceball and connect to it. By debugging the code, i found that my hWndMain and devHdl was always 0x00000000 and didnt change ever. I also debugged demo code 3DxTest32, and found the value of hWndMain changed after execution of ...
by Julian
Thu Jan 15, 2009 8:32 am
Forum: Developer's Forum for Windows
Topic: HOW TO BUILD STATIC LIB FOR SPACEMOUSE?
Replies: 9
Views: 16569

jwick wrote:Are you linking to the siapp.lib library from the SDK?
oops, i forgot it. now it compiled! :)
thank you jwick!!!
by Julian
Thu Jan 15, 2009 7:14 am
Forum: Developer's Forum for Windows
Topic: HOW TO BUILD STATIC LIB FOR SPACEMOUSE?
Replies: 9
Views: 16569

You are probably getting link errors because you are mangling the names in one place and not in another. I don't know what code you are using. What are some of the names of the functions? To change to C++, change the extension to .cpp, compile, and correct any compiler errors <G>. I change the name...
by Julian
Thu Jan 15, 2009 3:37 am
Forum: Developer's Forum for Windows
Topic: HOW TO BUILD STATIC LIB FOR SPACEMOUSE?
Replies: 9
Views: 16569

You can call C from C++ or you can change the code to C++. To call C from C++, enclose the declarations in an extern "C" {...} section. Hey jwick, thank you for the reply. I'v tried the extern "C", i can build the lib. but when i link it to my test.cpp, some link errors showed u...
by Julian
Sat Jan 10, 2009 5:04 am
Forum: Developer's Forum for Windows
Topic: HOW TO BUILD STATIC LIB FOR SPACEMOUSE?
Replies: 9
Views: 16569

HOW TO BUILD STATIC LIB FOR SPACEMOUSE?

now i am trying to build a static library for spacemouse so that i can simply use it when my application need to connect spacemouse and get data from it. I have two kind of input data A & B, here A means the data getting from spacemouse. if the system detect A is available, application will use ...
by Julian
Sun Dec 21, 2008 12:10 pm
Forum: Developer's Forum for Windows
Topic: Help!
Replies: 6
Views: 12253

You may have to read up on the HID API. The code is long but fairly easy to understand (IMO). The code reads all the descriptive data from each device into an array. The array is loaded in the order the devices are discovered. The code then attempts to wait on all devices with usage page 1, usage 4...
by Julian
Sun Dec 21, 2008 10:54 am
Forum: Developer's Forum for Windows
Topic: Help!
Replies: 6
Views: 12253

Yes of course the HIDTest code lists the information for all your devices, but only, I think, prints out the values for the first device in the list. Since your USB bus can constantly have a different arrangement of devices, you need to look at each device descriptor to figure out which one you wan...
by Julian
Sun Dec 21, 2008 10:16 am
Forum: Developer's Forum for Windows
Topic: Help!
Replies: 6
Views: 12253

If you don't want a windows main loop, you should use the HID API. There are examples posted in the forum. Thank you jwick, for this reply! I have tried HID example, I downloaded the Winddk and complied HIDTest code successfully. But when I run that code, there only showed some figures in the conso...
by Julian
Sun Dec 21, 2008 3:13 am
Forum: Developer's Forum for Windows
Topic: Help!
Replies: 6
Views: 12253

Help!

Hello everyone, I am trying to integrate 3d spacemouse to simulate a joystick. I have the code for joystick mapping, and it was written as a console application.(including a main.app in which there is a main() function). What I need to do is only get the data of spacemouse translation & rotation...