I am making a dll and need to use a global variable. This needs to be addressed by a function. I have some code but i can't figure out how to do this so i have pretty much guessed after reading various articles on the internet.

Code:
public ref class Wii {
public:
	static Wiimote^ wm;
};

MYCOMMAND bool WMCONNECT()
{
	Wiimote wm;
	wm.Connect();
	Wii::wm := wm;
}
Help greatly appreciated.

Dale2507