Logitech Gaming Steering Wheel SDK
Overview and Reference
© 2015 Logitech. Confidential
The Logitech Gaming Steering Wheel SDK, including all accompanying documentation, is
protected by intellectual property laws. All use of the Logitech Gaming Steering Wheel SDK
is subject to the License Agreement found in the "Logitech Gaming Steering Wheel SDK
License Agreement" file and at the end of this document. If you do not agree to the terms
and conditions of the License Agreement, you must immediately return any documentation,
the accompanying software and all other material provided to you by Logitech. All rights not
expressly granted by Logitech are reserved.
Logitech Gaming Steering Wheel SDK
Page 2
Contents
Overview ............................................................................................................................................ 4
SDK Package ................................................................................................................................... 4
Requirements .................................................................................................................................. 4
Interfacing with the SDK .................................................................................................................. 4
Using LogitechSteeringWheel.h and LogitechSteeringWheel.lib to access LogitechSteeringWheel.dll .. 4
Multiple clients using the SDK at the same time ................................................................................. 4
Do’s and Don’ts .................................................................................................................................. 4
Sample usage of the SDK .................................................................................................................... 5
Using header and lib ........................................................................................................................ 5
Reference ........................................................................................................................................... 5
LogiSteeringInitializeWithWindow ..................................................................................................... 5
LogiSteeringInitialize ........................................................................................................................ 5
LogiUpdate ...................................................................................................................................... 6
LogiGetState ................................................................................................................................... 6
LogiGetStateENGINES ...................................................................................................................... 6
LogiGetDevicePath ........................................................................................................................... 6
LogiGetFriendlyProductName ............................................................................................................ 7
LogiIsConnected .............................................................................................................................. 7
LogiIsDeviceConnected .................................................................................................................... 7
LogiIsManufacturerConnected .......................................................................................................... 8
LogiIsModelConnected ..................................................................................................................... 8
LogiButtonTriggered ........................................................................................................................ 9
LogiButtonReleased ......................................................................................................................... 9
LogiButtonIsPressed ........................................................................................................................ 9
LogiGenerateNonLinearValues ........................................................................................................ 10
LogiGetNonLinearValue .................................................................................................................. 11
LogiHasForceFeedback ................................................................................................................... 11
LogiIsPlaying ................................................................................................................................. 11
LogiPlaySpringForce ....................................................................................................................... 12
LogiStopSpringForce ...................................................................................................................... 12
LogiPlayConstantForce ................................................................................................................... 13
LogiStopConstantForce .................................................................................................................. 13
LogiPlayDamperForce .................................................................................................................... 13
LogiStopDamperForce .................................................................................................................... 14
LogiPlaySideCollisionForce .............................................................................................................. 14
LogiPlayFrontalCollisionForce .......................................................................................................... 15
Logitech Gaming Steering Wheel SDK
Page 3
LogiPlayDirtRoadEffect ................................................................................................................... 15
LogiStopDirtRoadEffect .................................................................................................................. 15
LogiPlayBumpyRoadEffect .............................................................................................................. 16
LogiStopBumpyRoadEffect.............................................................................................................. 16
LogiPlaySlipperyRoadEffect ............................................................................................................. 16
LogiStopSlipperyRoadEffect ............................................................................................................ 17
LogiPlaySurfaceEffect ..................................................................................................................... 17
LogiStopSurfaceEffectEffect ............................................................................................................ 18
LogiPlayCarAirborne ....................................................................................................................... 18
LogiStopCarAirborne ...................................................................................................................... 18
LogiPlaySoftstopForce .................................................................................................................... 18
LogiStopSoftstopForce ................................................................................................................... 19
LogiSetPreferredControllerProperties ............................................................................................... 19
LogiGetCurrentControllerProperties ................................................................................................. 19
LogiGetShifterMode ....................................................................................................................... 20
LogiSetOperatingRange .................................................................................................................. 20
LogiGetOperatingRange ................................................................................................................. 20
LogiPlayLeds ................................................................................................................................. 21
LogiSetOperatingRangeDInput ....................................................................................................... 21
LogiGetOperatingRangeDInput ....................................................................................................... 21
LogiPlayLedsDInput ....................................................................................................................... 22
LogiSteeringShutdown ................................................................................................................... 22
End-User License Agreement for Logitech Gaming Steering Wheel SDK ................................................ 22
Logitech Gaming Steering Wheel SDK
Page 4
Overview
The Logitech Gaming Steering Wheel SDK enables applications such as games to control various types of
game controllers (USB/gameport wheels/joysticks/game pads, Force Feedback enabled or not).
By using the Steering Wheel SDK you have the guarantee that all wheels and joysticks will function
flawlessly. No more situations where force feedback in a game behaves very differently from one
wheel/joystick to another, which in turn results in user frustration and product returns. Please note that
the SDK will work properly only if the Logitech Gaming Software is installed. Visit
http://www.logitech.com/en-us/gaming for more informations.
SDK Package
The following files are included:
LogitechSteeringWheelLib.h: C/C++ header file containing function prototypes
LogitechGSDK.cs: C# reference file to access the wrapped SDK
LogitechSteeringWheelLib.lib: lib file to access DLL exported functions (32 and 64 bit)
LogitechSteeringWheelEnginesWrapper.dll: wrapper of SDK functions (32 and 64 bit)
Requirements
The Logitech Gaming Steering Wheel SDK can be used on the following platforms:
Windows XP SP2 (32-bit and 64-bit)
Windows Vista (32-bit and 64-bit)
Windows 7 (32-bit and 64-bit)
Windows 8 (32-bit and 64-bit)
The Logitech Gaming Steering Wheel SDK is a C based interface and is designed for use by C/C++
programmers. Familiarity with Windows programming is required.
Interfacing with the SDK
Using LogitechSteeringWheel.h and LogitechSteeringWheel.lib to access LogitechSteeringWheel.dll
The application can include LogitechSteeringWheel.h and link to LogitechSteeringWheel.lib (see “Sample
usage of the SDK” further below or sample program in Samples folder). Installation folder for the DLL
needs to be the same as the main executable, or needs to be part of the Path in the system environment.
Multiple clients using the SDK at the same time
The SDK allows only one client to control a device at any given time. In case two applications try to
initialize the SDK for the device, only the first will succeed. The second application’s initialization will fail.
Do’s and Don’ts
These are a few guidelines that may help you implement 'better' support in your game:
The function LogiSteeringInitialize() will try to get your application/game main window handler.
It could fail, because when you are calling the function the main window may not be in the
foreground yet. If LogiSteeringInitialize() returns false, the initialization will be attempted in any
of the next LogiUpdate() function calls. When the window will be in foreground and the SDK can
be initialized, LogiUpdate() will return true.
Logitech Gaming Steering Wheel SDK
Page 5
Sample usage of the SDK
Using header and lib
#pragma comment(lib, "LogitechSteeringWheelLib.lib")
#include "LogiSteeringWheelLib.h"
//the parameter determines whether you’ll use X-input or not
LogiSteeringInitialize(TRUE);
//this is your main loop
while(!done){
if(LogiUpdate()){
//the main window handler has been found, you can now call any function
//from the steering wheel sdk
}
}
Reference
LogiSteeringInitializeWithWindow
The LogiSteeringInitializeWithWindow () function makes necessary initializations, if there is not
another instance already running. Use this function only if you already have a window handle from your
code.
bool LogiSteeringInitialize(CONST bool ignoreXInputControllers, HWND hwnd)
Parameters
ignoreXInputControlllers: if set to true, the SDKs will ignore any X-input controller
hwnd: the window handle
Return value
If the function succeeds, it returns true, otherwise false.
LogiSteeringInitialize
The LogiSteeringInitialize() function makes sure the main window has come to foreground. Then, if
there isn’t already another instance running makes necessary initializations.
bool LogiSteeringInitialize(CONST bool ignoreXInputControllers)
Parameters
ignoreXInputControlllers: if set to true, the SDKs will ignore any X-input controller
Return value
If the function succeeds, it returns true, otherwise false.
If it returns false, it is because the main window of your application has not come to foreground yet. This
means that the window handler cannot be retrieved yet.