public value struct ListOfWindows
{
HWND hWindow;
int winID;
String^ capName;
};
thats my structure now i have created an array of them:
array<ListOfWindows ^> ^ MyArray = gcnew array<ListOfWindows ^>(5);
now to test if that works i made a simple function:
void AddStruct( )
{
HWND temp = ::FindWindow( NULL, "Test" );
if( temp == NULL ) return;
MyArray[0]->hWindow = temp; // debug time error..
return;
}
ERROR: An unhandled exception of type 'System.NullReferenceException' occurred in Window.exe
Additional information: Object reference not set to an instance of an object.
dont know what to do.. kinda new to CLI so if you can help please do.. Thanks.