Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Global Variable

Currently, code is like this in .cpp file (This is C++ .net class library project)

namespace MyNameSpace
{
using namespace System::Runtime::InteropServices;
[DllImport("c:\\program files\\notes\\nnotes.dll")]
extern "C" int NotesInitExtended(int str1, char * str2[]);

...
}

I'm trying to put the value "c:\\program files\\notes\\nnotes.dll" into some static variable. I tried String but it gives "cannot declare a global or static managed type object or a __gc pointer"
[541 byte] By [alphaoide] at [2007-11-11 8:51:07]