0% found this document useful (0 votes)
154 views2 pages

ReadMe PDF

The VJoy Virtual Joystick Driver SDK provides source code examples for controlling a virtual joystick driver in various programming languages like C#, C++, Delphi, VB6 and VB.NET. It contains functions to initialize and shutdown the driver, as well as update the joystick state with values for axes, buttons, and POV positions. The latest version supports 32 buttons, 8 axes ranging from -32768 to 32767, and 4 POV positions.

Uploaded by

Victor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views2 pages

ReadMe PDF

The VJoy Virtual Joystick Driver SDK provides source code examples for controlling a virtual joystick driver in various programming languages like C#, C++, Delphi, VB6 and VB.NET. It contains functions to initialize and shutdown the driver, as well as update the joystick state with values for axes, buttons, and POV positions. The latest version supports 32 buttons, 8 axes ranging from -32768 to 32767, and 4 POV positions.

Uploaded by

Victor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

VJoy Virtual Joystick Driver SDK 1.

2
Developed by Headsoft

Description
The VJoy Virtual Joystick Driver SDK is a collection of source code examples for
controlling the VJoy Virtual Joystick Driver.
For more information on these devices please visit:

VJoy - http://headsoft.com.au/index.php?category=vjoy

It contains source code projects in the following languages:

C#
C++
Delphi
VB6
VB.NET

Strutures
struct JOYSTICK_STATE
{
unsigned char ReportId;
short XAxis;
short YAxis;
short ZAxis;
short XRotation;
short YRotation;
short ZRotation;
short Slider;
short Dial;
unsigned short POV;
unsigned int Buttons;
};

Functions
bool VJoy_Initialize((char *) name, (char *) serial)

Initialize the VJoy driver


Name and serial are provided for commercial usage. Empty strings will
place the driver in demo mode and will quit after 5 minutes of use
Returns true for success and false for failure

void VJoy_Shutdown()

Shutdown the VJoy driver


No return value

10/14/2012

VJoy Virtual Joystick Driver SDK 1.2

Page 1 of 2

VJoy Virtual Joystick Driver SDK 1.2


Developed by Headsoft

bool VJoy_UpdateJoyState(int id, JOYSTICK_STATE* pJoyState)

Update the current joystick state specified by id


Returns true for success and false for failure
Axis range is -32768 to 32767
There are 4 POVs each taking 4 bits of the 32 bit integer
POV values are Up = 0, Right = 1, Down = 2, Left = 3, Nil = 4

Examples in C++

Send some data to the first joystick

JOYSTICK_STATE m_joyState[2] = { 0 };
int main(int argc, char* argv[])
{
VJoy_Initialize("", "");
m_joyState[0].XAxis = 32767;
m_joyState[0].YAxis = 32767;
m_joyState[0].ZAxis = 32767;
m_joyState[0].Buttons = 0xAAAAAAAA;
m_joyState[0].POV = (4 << 12) | (4 << 8) | (4 << 4) |
4;
VJoy_UpdateJoyState(0, &m_joyState[0]);
VJoy_Shutdown();
return 0;
}

Release Dates

13-10-2012 1.2 32 Buttons, 8 axes (-32768 to 32767), 4 POV


2-7-2012 1.1 32 buttons, 7 axes, 1 POV
1-2-2010 1.0 First Release

Contact
Ben Baker (VJoy SDK Developer)
[email protected] / www.headsoft.com.au

10/14/2012

VJoy Virtual Joystick Driver SDK 1.2

Page 2 of 2

You might also like