0% found this document useful (0 votes)
386 views8 pages

MSI Mystic Light SDK Guide

This document provides an overview and documentation for the Mystic Light Software Development Kit (SDK) version 1.0.0.01 released by Micro-Star INT'L CO., LTD. in August 2017. The SDK includes functions for initializing the APIs, getting information about connected devices and LEDs, and setting properties like color, style, brightness and speed for individual LEDs on MSI products. The SDK is supported on Windows 7 and later and requires installation of the MSI Mystic Light application.
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)
386 views8 pages

MSI Mystic Light SDK Guide

This document provides an overview and documentation for the Mystic Light Software Development Kit (SDK) version 1.0.0.01 released by Micro-Star INT'L CO., LTD. in August 2017. The SDK includes functions for initializing the APIs, getting information about connected devices and LEDs, and setting properties like color, style, brightness and speed for individual LEDs on MSI products. The SDK is supported on Windows 7 and later and requires installation of the MSI Mystic Light application.
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/ 8

Mystic Light Software Development Kit

Reference Documentation

Version 1.0.0.01

Aug. 2017

Micro-Star INT’L CO., LTD.

Desktop Platform Solution Division Software Department


Micro-Star INT'L CO., LTD. Confidential

Overview
- Introduction

- System Requirements

- Function APIs

- Function Documentation

- MLAPI Status Values

Introduction
 This SDK is provides the LED control functions for MSI product such as MSI Motherboard, VGA,
Keyboard, Mouse, Headset, etc.

 This SDK is based on the Microsoft development environment, that supports Microsoft Visual
Studio C++ and C# programming language.

System Requirements
 This SDK is supported on Windows 7 / 8 / 8.1 / 10, both 32-bit and 64-bit architectures.

 Must install MSI Mystic Light application before using SDK functions.

Confidential Micro-Star INT'L CO., LTD.

1
Micro-Star INT'L CO., LTD. Confidential

Function APIs
int MLAPI_GetErrorMessage(int, BSTR*)
This function converts a MLAPI error code into general string.

int MLAPI_Initialize()
This function initializes the APIs.

int MLAPI_GetDeviceInfo(SAFEARRAY**, SAFEARRAY**)


This function retrieves information of all devices

int MLAPI_GetLedInfo(BSTR,DWORD, BSTR*, SAFEARRAY**)


This function retrieves the LED display name and enumerate the LED styles.

int MLAPI_GetLedColor(BSTR, DWORD, DWORD*, DWORD*, DWORD*)


This function retrieves the specific LED current color.

int MLAPI_GetLedStyle(BSTR, DWORD, BSTR*)


This function retrieves the specific LED current style.

int MLAPI_GetLedMaxBright(BSTR, DWORD, DWORD*)


This function retrieves a specific LED supports the maximum brightness level.

int MLAPI_GetLedBright(BSTR, DWORD, DWORD*)


This function retrieves the specific LED current brightness level.

int MLAPI_GetLedMaxSpeed(BSTR, DWORD, DWORD*)


This function retrieves a specific LED supports the maximum speed level.

int MLAPI_GetLedSpeed(BSTR, DWORD, DWORD*)


This function retrieves the specific LED current speed level.

int MLAPI_SetLedColor(BSTR, DWORD, DWORD, DWORD , DWORD)


This function sets the LED to a specific color.

int MLAPI_SetLedStyle(BSTR, DWORD, BSTR)


This function sets the LED to a specific style.

int MLAPI_SetLedBright(BSTR, DWORD, DWORD)


This function sets the LED brightness to a specific level.

int MLAPI_SetLedSpeed(BSTR, DWORD, DWORD)


This function sets the LED blink speed to a specific level.

Confidential Micro-Star INT'L CO., LTD.

2
Micro-Star INT'L CO., LTD. Confidential

Function Documentation
int MLAPI_Initialize()
Description: This function initializes the APIs. This must be called before calling other MLAPI_ functions.

Return values:

MLAPI_OK Initialized.

MLAPI_NO_IMPLEMENTED MSI application not found or current version is not supported.

MLAPI_INITIAL_TIMEOUT MLAPI_Initialize timeout.

int MLAPI_GetDeviceInfo(SAFEARRAY** pDevType, SAFEARRAY** pLedCount)


Description: This function retrieves information of all devices.

Parameters:

[out] pDevType Pointer to a safe array containing defined type of all devices.

[out] pLedCount Pointer to a safe array containing the number of LEDs for all devices.

Return values:

MLAPI_OK Initialized.

MLAPI_NOT_INITIALIZED MLAPI_Initialize has not been called successful.

MLAPI_INITIAL_TIMEOUT MLAPI_Initialize timeout.

int MLAPI_GetLedInfo(BSTR type, DWORD index, BSTR* pName, SAFEARRAY** pLedStyles)


Description: This function retrieves the information of the specified LED.

Parameters:

[in] type The defined of device type.

[in] index The LED identifier of the device.

[out] pName The LED display name of the specified LED.

[out] pLedStyles The support styles of the specified LED.

Return values:

MLAPI_OK Initialized.

MLAPI_DEVICE_NOT_FOUND The device is not found.

MLAPI_NOT_INITIALIZED MLAPI_Initialize has not been called successful.

MLAPI_INITIAL_TIMEOUT MLAPI_Initialize timeout.

int MLAPI_GetLedColor(BSTR type, DWORD index, DWORD* R, DWORD* G, DWORD* B)


Description: This function retrieves the color of the specified LED.

Parameters:

[in] type The defined of device type.

[in] index The LED identifier of the device.

[out] R, G, B Pointer to a DWORD variable containing the color of the specified LED.

Confidential Micro-Star INT'L CO., LTD.

3
Micro-Star INT'L CO., LTD. Confidential

Return values:

MLAPI_OK Initialized.

MLAPI_DEVICE_NOT_FOUND The device is not found.

MLAPI_NOT_INITIALIZED MLAPI_Initialize has not been called successful.

MLAPI_INITIAL_TIMEOUT MLAPI_Initialize timeout.

int MLAPI_GetLedStyle(BSTR type, DWORD index, BSTR* style)


Description: This function retrieves the style of the specified LED.

Parameters:

[in] type The defined of device type.

[in] index The LED identifier of the device.

[out] style Pointer to a BSTR variable containing the style of the specified LED.

Return values:

MLAPI_OK Initialized.

MLAPI_DEVICE_NOT_FOUND The device is not found.

MLAPI_NOT_INITIALIZED MLAPI_Initialize has not been called successful.

MLAPI_INITIAL_TIMEOUT MLAPI_Initialize timeout.

int MLAPI_GetLedMaxBright(BSTR type, DWORD index, DWORD* maxLevel)


Description: This function retrieves the maximum brightness level of the specified LED.

Parameters:

[in] type The defined of device type.

[in] index The LED identifier of the device.

[out] style Pointer to a DWORD variable containing the maximum brightness level of the specified LED.

Return values:

MLAPI_OK Initialized.

MLAPI_DEVICE_NOT_FOUND The device is not found.

MLAPI_NOT_SUPPORTED Requested feature is not supported in the selected LED.

MLAPI_NOT_INITIALIZED MLAPI_Initialize has not been called successful.

int MLAPI_GetLedBright(BSTR type, DWORD index, DWORD* currentLevel)


Description: This function retrieves the brightness level of the specified LED.

Parameters:

[in] type The defined of device type.

[in] index The LED identifier of the device.

[out] style Pointer to a DWORD variable containing the brightness level of the specified LED.

Return values:

MLAPI_OK Initialized.

MLAPI_DEVICE_NOT_FOUND The device is not found.

MLAPI_NOT_SUPPORTED Requested feature is not supported in the selected LED.

Confidential Micro-Star INT'L CO., LTD.

4
Micro-Star INT'L CO., LTD. Confidential

MLAPI_NOT_INITIALIZED MLAPI_Initialize has not been called successful.

int MLAPI_GetLedMaxSpeed(BSTR type, DWORD index, DWORD* maxLevel)


Description: This function retrieves the maximum speed level of the specified LED.

Parameters:

[in] type The defined of device type.

[in] index The LED identifier of the device.

[out] style Pointer to a DWORD variable containing the maximum speed level of the specified LED.

Return values:

MLAPI_OK Initialized.

MLAPI_DEVICE_NOT_FOUND The device is not found.

MLAPI_NOT_SUPPORTED Requested feature is not supported in the selected LED.

MLAPI_NOT_INITIALIZED MLAPI_Initialize has not been called successful.

int MLAPI_GetLedSpeed(BSTR type, DWORD index, DWORD* currentLevel)


Description: This function retrieves the speed level of the specified LED.

Parameters:

[in] type The defined of device type.

[in] index The LED identifier of the device.

[out] style Pointer to a DWORD variable containing the speed level of the specified LED.

Return values:

MLAPI_OK Initialized.

MLAPI_DEVICE_NOT_FOUND The device is not found.

MLAPI_NOT_SUPPORTED Requested feature is not supported in the selected LED.

MLAPI_NOT_INITIALIZED MLAPI_Initialize has not been called successful.

int MLAPI_SetLedColor(BSTR type, DWORD index, DWORD R, DWORD G, DWORD B)


Description: This function sets the color of the specified LED.

Parameters:

[in] type The defined of device type.

[in] index The LED identifier of the device.

[in] R, G, B The color of the specified LED.

Return values:

MLAPI_OK Initialized.

MLAPI_INVALID_ARGUMENT The parameter value is not valid.

MLAPI_DEVICE_NOT_FOUND The device is not found.

MLAPI_NOT_SUPPORTED Requested feature is not supported in the selected LED.

MLAPI_NOT_INITIALIZED MLAPI_Initialize has not been called successful.

int MLAPI_SetLedStyle(BSTR type, DWORD index, BSTR style)

Confidential Micro-Star INT'L CO., LTD.

5
Micro-Star INT'L CO., LTD. Confidential

Description: This function sets the style of the specified LED.

Parameters:

[in] type The defined of device type.

[in] index The LED identifier of the device.

[in] style The style of the specified LED.

Return values:

MLAPI_OK Initialized.

MLAPI_DEVICE_NOT_FOUND The device is not found.

MLAPI_NOT_SUPPORTED Requested feature is not supported in the selected LED.

MLAPI_NOT_INITIALIZED MLAPI_Initialize has not been called successful.

int MLAPI_SetLedBright(BSTR type, DWORD index, DWORD level)


Description: This function sets the brightness level of the specified LED.

Parameters:

[in] type The defined of device type.

[in] index The LED identifier of the device.

[in] style brightness level of the specified LED.

Return values:

MLAPI_OK Initialized.

MLAPI_INVALID_ARGUMENT The parameter value is not valid.

MLAPI_DEVICE_NOT_FOUND The device is not found.

MLAPI_NOT_SUPPORTED Requested feature is not supported in the selected LED.

MLAPI_NOT_INITIALIZED MLAPI_Initialize has not been called successful.

int MLAPI_SetLedSpeed(BSTR type, DWORD index, DWORD level)


Description: This function sets the speed level of the specified LED.

Parameters:

[in] type The defined of device type.

[in] index The LED identifier of the device.

[in] style speed level of the specified LED.

Return values:

MLAPI_OK Initialized.

MLAPI_INVALID_ARGUMENT The parameter value is not valid.

MLAPI_DEVICE_NOT_FOUND The device is not found.

MLAPI_NOT_SUPPORTED Requested feature is not supported in the selected LED.

MLAPI_NOT_INITIALIZED MLAPI_Initialize has not been called successful.

int MLAPI_GetErrorMessage(int ErrorCode, BSTR* pDesc)


Description: This function converts a MLAPI error code into general string.

Confidential Micro-Star INT'L CO., LTD.

6
Micro-Star INT'L CO., LTD. Confidential

Parameters:

[in] ErrorCode The APIs return status values.

[out] pDesc Pointer to a BSTR variable containing the Description of the error code.

Return values:

MLAPI_OK Always, string never null.

MLAPI Status Values


MLAPI_OK = 0
Description: Request is completed.

MLAPI_ERROR = -1
Description: Generic error.

MLAPI_TIMEOUT = -2
Description: Request is timeout.

MLAPI_NO_IMPLEMENTED = -3
Description: MSI application not found or installed version not supported.

MLAPI_NOT_INITIALIZED = -4
Description: MLAPI_Initialize has not been called successful.

MLAPI_INVALID_ARGUMENT = -101
Description: The parameter value is not valid.

MLAPI_DEVICE_NOT_FOUND = -102
Description: The device is not found.

MLAPI_NOT_SUPPORTED = -103
Description: Requested feature is not supported in the selected LED.

Confidential Micro-Star INT'L CO., LTD.

You might also like