Jump to content
Sign in to follow this  
AcidicChip

LightFX DLL Help?

Recommended Posts

AcidicChip

I am not very good with using DLLs, and was wondering if someone could help me with using GamingSDK.dll . All I'm trying to do is get is get SetEffect to work. Here's the documentation provided, but can't get passed the point of successfully using InitSDK.

Back to Contents Page

API Functions

Dell XPS LightFX SDK Programmer's Guide

Function: InitSDK

Function: GetCapabilities

Function: GetLEDSettings

Function: SetLEDSettings

Function: SetEffect

Function: StopEffect

Function: ReleaseSDK

The Application Programming Interface (API) functions allow you to program lighting effects into your application. The effects include the lighting of LEDs in several zones around your system.

The following definitions apply to the type FN_DECLSPEC used in the API functions:

If you are using the dynamic link library (DLL) version of the SDK, _IMPORTING must be defined in the project settings. This definition will ensure that FN_DECLSPEC gets defined as __declspec(dllimport), which is necessary to import the functions exposed by the DLL.

If you are using the static library version of the SDK, no special definitions are required.

NOTE: For Windows Vista, ensure each thread in your process initializes Component Object Model (COM), using the Single Threaded Apartment model.

--------------------------------------------------------------------------------

Function: InitSDK

The InitSDK function queries the system capability and initializes the SDK. This must be the very first call made by your application to determine if XPS LightFX is supported or not. Starting SDK v1.1, this call replaces the GetCapabilities call. The return value of this function should be used as input parameter (capability) to other calls. Table 3-1 shows the valid parameters for the InitSDK function. The InitSDK function is defined as follows:

FN_DECLSPEC LED_CAPS__cdecl InitSDK();

Table 3-1. InitSDK Parameters

Item

Description

Input Parameter

VOID

Return Value

SUPPORTED - System supports LED color control

NONE - System does not support LED color control

Back to Contents Page

--------------------------------------------------------------------------------

Function: GetCapabilities

The GetCapabilities function returns the capability of the system to support LED color control. This must be the very first call made by your application to determine if XPS LightFX is supported or not. A return value = NONE indicates that the system does not support LED color control. Do not attempt to make any other calls in this case. The return value of this function should be used as input parameter (capability) to other calls.

NOTE: This API has been deprecated starting v1.1 of the SDK and is available only for backward compatibility purposes. Applications using SDK v1.1 or later must use InitSDK instead.

Table 3-2 shows the valid parameters for the GetCapabilities function. The GetCapabilities function is defined as follows:

FN_DECLSPEC VOID __cdecl GetCapabilities(PLED_CAPS pCapability);

Table 3-2. GetCapabilities Parameters

Item

Description

Input Parameter

Pointer to a LED_CAPS data type

Return Value

NONE = 0 (unsupported),

SUPPORTED = 1

Back to Contents Page

--------------------------------------------------------------------------------

Function: GetLEDSettings

The GetLEDSettings function returns the current LED colors and intensities for the supported zones.

NOTE: The supported zones may vary.

Table 3-3 shows the valid parameters for the GetLEDSettings function. The GetLEDSettings function is defined as follows:

FN_DECLSPEC BOOL __cdecl GetLEDSettings(PVOID pSettings, LED_CAPS capability);

Table 3-3. GetLEDSettings Parameters

Item

Description

Input Parameter

pSettings depends on the value of capability. For example:

pSettings = Pointer to LED_USER_SETTINGS structure if capability > 0

capability - obtained from InitSDK() call

Return Value

The function returns the following values:

TRUE = Success

FALSE = Failure

Back to Contents Page

--------------------------------------------------------------------------------

Function: SetLEDSettings

The SetLEDSettings function sets the LED colors for each zone and the intensity for all zones.

NOTE: Supported zones could vary depending on the capability of your system.

Table 3-4 shows the valid parameters for the SetLEDSettings. The SetLEDSettings function is defined as follows:

FN_DECLSPEC BOOL __cdecl SetLEDSettings(PVOID pSettings, LED_CAPS capability, BOOL bMakePerm = FALSE );

Table 3-4. SetLEDSettings Parameters

Item

Description

Input Parameter

pSettings depends on the value of capability. For example:

pSettings - Pointer to LED_USER_SETTINGS structure if capability > 0

capability - return value obtained from InitSDK() call

bMakePerm - TRUE if the LED settings are to be saved and used at system start up

Return Value

The function returns the following values:

TRUE = Success

FALSE = Failure

Function: SetPowerOnDefaults

The SetPowerOnDefaults function sets the Default LED settings that will be used when the system starts up. Table 3-5 shows the valid parameters for the SetPowerOnDefaults function. The SetPowerOnDefaults function is defined as follows:

FN_DECLSPEC BOOL __cdecl SetPowerOnDefaults(PVOID pSettings, LED_CAPS capability );

Table 3-5. SetPowerOnDefaults Parameters

Item

Description

Input Parameter

pSettings - Pointer to LED_USER_SETTINGS structure if capability > 0

capability - return value obtained from InitSDK() call

Return Value

The function returns the following values:

TRUE = Success

FALSE = Failure

Back to Contents Page

--------------------------------------------------------------------------------

Function: SetEffect

The SetEffect function Sets the effect that will be displayed by the LEDs given the properly formatted XML file. Table 3-6 shows the valid parameters for the SetEffect function. The SetEffect function is defined as follows:

FN_DECLSPEC HANDLE __cdecl SetEffect(char* szPath, LED_CAPS capability );

Table 3-6. SetEffect Parameters

Item

Description

Input Parameter

szPath - Path to the XML file that defines the effect

capability - obtained from InitSDK() call

Return Value

The handle to the thread that performs the effect

--------------------------------------------------------------------------------

Function: StopEffect

The StopEffect function stops the effect that is currently being played. Table 3-7 shows the valid parameters for the StopEffect function. The StopEffect function is defined as follows:

FN_DECLSPEC BOOL __cdecl StopEffect( HANDLE threadHandle );

Table 3-7. StopEffect Parameters

Item

Description

Input Parameter

threadHandle - The handle to the thread returned by a previous call to the SetEffect function

Return Value

The function returns the following values:

TRUE = Succes

FALSE = Failure

--------------------------------------------------------------------------------

Function: ReleaseSDK

The ReleaseSDK function uninitializes and cleans up the SDK. This should be the very last function your application calls. After ReleaseSDK has been called, your application should not try to access any other functoion from the SDK.

Table 3-8 shows the valid parameters for the ReleaseSDK function. The ReleaseSDK function is defined as follows:

FN_DECLSPEC void __cdecl ReleaseSDK( void );

Table 3-8. ReleaseSDK Parameters

Item

Description

Input Parameter

None

Return Value

None

Any help or suggestions would be greatly appreciated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×