Global Managed Type in win32 dll project
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
Re: Global Managed Type in win32 dll project
public ref class Wii {
public:
static Wiimote^ wm;
};
MYCOMMAND bool WMCONNECT()
{
Wiimote^ wm = gcnew Wiimote();
wm->Connect();
Wii::wm = wm;
}
Re: Global Managed Type in win32 dll project
Thank you!! works perfectly an i no how 2 do rest now! gd stuff!! :P