Bind AlienFX to UE4 c++ ?

I thought a little step-throught may be usefull for some

_get the SDK in the command center directory (C:\Program Files\Alienware\Command Center\AlienFX SDK\Unmanaged\includes)
_create 2 new headers and copy paste the code in it
_copy the dll from C:\Program Files\Alienware\Command Center\AlienFX SDK\Unmanaged\dll\x64 to your project’s binaries directory
_open on of the .cpp examples and get your way through it :wink:

Mine looks like this

void APickupAmmo::Alien(/** int argc, _TCHAR* argv] */)
{
// Things
LFX2INITIALIZE InitFunction;
LFX2RELEASE ReleaseFunction;
LFX2RESET ResetFunction;
LFX2UPDATE UpdateFunction;
LFX2UPDATEDEFAULT UpdatedefaultFunction;
// Devices
LFX2GETNUMDEVICES GetNumDevicesFunction;
LFX2GETDEVDESC GetDeviceDescriptionFunction;
// Lights
LFX2GETNUMLIGHTS GetNumLightsFunction;
LFX2GETLIGHTDESC GetLightDescriptionFunction;
LFX2GETLIGHTLOC GetLightLocationFunction;
LFX2GETLIGHTCOL GetLightColorFunction;
LFX2SETLIGHTCOL SetLightColorFunction;
LFX2LIGHT LightFunction;
// Light again
LFX2SETLIGHTACTIONCOLOR SetLightActionColor;
LFX2SETLIGHTACTIONCOLOREX SetLightActionColorEx;
// More lights
LFX2ACTIONCOLOR LightActionColorFunction;
LFX2ACTIONCOLOREX LightActionColorExFunction;
LFX2SETTIMING SetTiming;

HINSTANCE hLibrary = LoadLibrary(_T(LFX_DLL_NAME));
if (hLibrary)
{
	//Things
	InitFunction =				(LFX2INITIALIZE)	GetProcAddress(hLibrary, LFX_DLL_INITIALIZE);
	ReleaseFunction =			(LFX2RELEASE)		GetProcAddress(hLibrary, LFX_DLL_RELEASE);
	ResetFunction =				(LFX2RESET)			GetProcAddress(hLibrary, LFX_DLL_RESET);
	UpdateFunction =			(LFX2UPDATE)		GetProcAddress(hLibrary, LFX_DLL_UPDATE);
	UpdatedefaultFunction =		(LFX2UPDATEDEFAULT)	GetProcAddress(hLibrary, LFX_DLL_UPDATEDEFAULT);
	//	Devices
	GetNumDevicesFunction =		(LFX2GETNUMDEVICES)	GetProcAddress(hLibrary, LFX_DLL_GETNUMDEVICES);
	GetDeviceDescriptionFunction =  (LFX2GETDEVDESC)	GetProcAddress(hLibrary, LFX_DLL_GETDEVDESC);

	//	Lights
	GetNumLightsFunction =		(LFX2GETNUMLIGHTS)	GetProcAddress(hLibrary, LFX_DLL_GETNUMLIGHTS);
	GetLightDescriptionFunction =	(LFX2GETLIGHTDESC)	GetProcAddress(hLibrary, LFX_DLL_GETLIGHTDESC);
	GetLightLocationFunction =		(LFX2GETLIGHTLOC)	GetProcAddress(hLibrary, LFX_DLL_GETLIGHTLOC);
	//	Get & Set
	GetLightColorFunction =		(LFX2SETLIGHTCOL)	GetProcAddress(hLibrary, LFX_DLL_SETLIGHTCOL);
	GetLightColorFunction =		(LFX2GETLIGHTCOL)	GetProcAddress(hLibrary, LFX_DLL_GETLIGHTCOL);
	//	Light again
	LightFunction =				(LFX2LIGHT)			GetProcAddress(hLibrary, LFX_DLL_LIGHT);
	SetLightActionColor =			(LFX2SETLIGHTACTIONCOLOR)GetProcAddress(hLibrary, LFX_DLL_SETLIGHTACTIONCOLOR);
	SetLightActionColorEx =		(LFX2SETLIGHTACTIONCOLOREX) GetProcAddress(hLibrary, LFX_DLL_SETLIGHTACTIONCOLOREX);
	//	More lights
	LightActionColorFunction =		(LFX2ACTIONCOLOR)	GetProcAddress(hLibrary, LFX_DLL_ACTIONCOLOR);
	LightActionColorExFunction =	(LFX2ACTIONCOLOREX)	GetProcAddress(hLibrary, LFX_DLL_ACTIONCOLOREX);
	SetTiming =				(LFX2SETTIMING)		GetProcAddress(hLibrary, LFX_DLL_SETTIMING);


	LFX_RESULT result = InitFunction();
	if (result == LFX_SUCCESS)
	{ 
		result = SetTiming(100);
		//Set all blue
		result = ResetFunction();
		result = LightFunction(LFX_ALL, LFX_BLUE | LFX_FULL_BRIGHTNESS);
		result = UpdateFunction();
		Sleep(5000);
		//set blinking red
		result = ResetFunction();
		result = LightActionColorFunction(LFX_ALL, LFX_ACTION_PULSE, LFX_RED | LFX_FULL_BRIGHTNESS);
		result = UpdateFunction();
		Sleep(5000);
		//go from red to blue
		result = ResetFunction();
		result = LightActionColorExFunction(LFX_ALL, LFX_ACTION_MORPH, LFX_RED | LFX_FULL_BRIGHTNESS, LFX_BLUE | LFX_FULL_BRIGHTNESS);
		result = UpdateFunction();

		result = ReleaseFunction();
	}
}

functions are fully documented

BE CAREFULL: you are messing with a physical chip, anticipate about initialisation and correct memory cleaning, eventuals loops and stuff like that. I don’t really know if you can brick it this way, but I was due for at least one power drain to restore it