Click here to Skip to main content
15,910,118 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionRe: Reading the registry once and storing the values Pin
Mark Salsbery28-Feb-09 7:45
Mark Salsbery28-Feb-09 7:45 
AnswerRe: Reading the registry once and storing the values Pin
naveen_bij28-Feb-09 22:57
naveen_bij28-Feb-09 22:57 
GeneralRe: Reading the registry once and storing the values Pin
N a v a n e e t h1-Mar-09 13:27
N a v a n e e t h1-Mar-09 13:27 
GeneralRe: Reading the registry once and storing the values Pin
naveen_bij1-Mar-09 17:40
naveen_bij1-Mar-09 17:40 
GeneralRe: Reading the registry once and storing the values Pin
N a v a n e e t h1-Mar-09 20:59
N a v a n e e t h1-Mar-09 20:59 
GeneralRe: Reading the registry once and storing the values Pin
naveen_bij1-Mar-09 21:30
naveen_bij1-Mar-09 21:30 
GeneralRe: Reading the registry once and storing the values Pin
N a v a n e e t h1-Mar-09 21:57
N a v a n e e t h1-Mar-09 21:57 
GeneralRe: Reading the registry once and storing the values Pin
naveen_bij1-Mar-09 22:17
naveen_bij1-Mar-09 22:17 
is the below code correct and when ever i load the parameters from registry, i load the whole array of class.

 public ref class HostSettings
{
public:
        static String ^HName;
	static String ^HAddr;
	static Collections::ArrayList ^cardType = gcnew System::Collections::ArrayList(); 
	static String ^HCommtype;
	static String ^HMsgType;
	static String ^HPriority;
	static String ^oldHostName;

	static property HostSettings^ Instance
	{		

		HostSettings^ get()
		{
			if(!instance)
				LoadSetting();
			return instance;
		}
	}

private:
	static void LoadSetting()
	{
		instance = gcnew HostSettings();
		// read registry and set properties of instance
	}

	static HostSettings^ instance;
};

array<HostSettings^>^ HostList = gcnew array<HostSettings^> (5);


i want the whole array to be available till the application unloads
this is the error i am getting when i do a global class array declaration

'HostList' : global or static variable may not have managed type 'cli::array<type> ^'<br />
1>        with<br />
1>        [<br />
1>            Type=HostSettings ^<br />
1>        ]<br />
1>        may not declare a global or static variable, or a member of a native type that refers to objects in the gc heap</type>



Naveen

QuestionAfter CLR conversion debugging is slow. Pin
KASR126-Feb-09 17:25
KASR126-Feb-09 17:25 
AnswerRe: After CLR conversion debugging is slow. Pin
Mark Salsbery27-Feb-09 6:24
Mark Salsbery27-Feb-09 6:24 
AnswerRe: After CLR conversion debugging is slow. Pin
Luc Pattyn27-Feb-09 7:02
sitebuilderLuc Pattyn27-Feb-09 7:02 
Questionifstream & ofstream manipulators equivalents in C++/CLI Pin
J_E_D_I26-Feb-09 1:19
J_E_D_I26-Feb-09 1:19 
AnswerRe: ifstream & ofstream manipulators equivalents in C++/CLI Pin
N a v a n e e t h26-Feb-09 3:42
N a v a n e e t h26-Feb-09 3:42 
GeneralRe: ifstream & ofstream manipulators equivalents in C++/CLI Pin
J_E_D_I27-Feb-09 10:03
J_E_D_I27-Feb-09 10:03 
GeneralRe: ifstream & ofstream manipulators equivalents in C++/CLI Pin
N a v a n e e t h1-Mar-09 13:25
N a v a n e e t h1-Mar-09 13:25 
QuestionWhen prefer to write managed C++ code ? Pin
Yanshof25-Feb-09 11:46
Yanshof25-Feb-09 11:46 
AnswerRe: When prefer to write managed C++ code ? Pin
Mark Salsbery25-Feb-09 14:30
Mark Salsbery25-Feb-09 14:30 
AnswerRe: When prefer to write managed C++ code ? Pin
N a v a n e e t h25-Feb-09 14:40
N a v a n e e t h25-Feb-09 14:40 
QuestionBoolean property causing crash Pin
Andy____________uk24-Feb-09 1:35
Andy____________uk24-Feb-09 1:35 
GeneralRe: Boolean property causing crash Pin
Luc Pattyn24-Feb-09 1:42
sitebuilderLuc Pattyn24-Feb-09 1:42 
GeneralRe: Boolean property causing crash Pin
Andy____________uk24-Feb-09 2:01
Andy____________uk24-Feb-09 2:01 
GeneralRe: Boolean property causing crash Pin
Luc Pattyn24-Feb-09 2:33
sitebuilderLuc Pattyn24-Feb-09 2:33 
GeneralRe: Boolean property causing crash Pin
Andy____________uk24-Feb-09 3:01
Andy____________uk24-Feb-09 3:01 
QuestionConverting int to string confusion Pin
TabascoSauce23-Feb-09 15:33
TabascoSauce23-Feb-09 15:33 
GeneralRe: Converting int to string confusion Pin
Luc Pattyn23-Feb-09 16:07
sitebuilderLuc Pattyn23-Feb-09 16:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.