We had an issue once we deployed our .Net 4.0 C# ZeroMQ solution to a Windows Server 2008 instance where the application would freeze up or block, seemingly on the initialization of our ZeroMQ library. Upon furthter investigation it was discovered that the application was blocking on the construction of each new zmq Context object. Having exhausted all other alternatives, an internet search revealed a stack overflow post : http://stackoverflow.com/qu... ......
Scratched my head with this one a bit, but here is the solution: Obtain the IntPtr equivalent of the char*: const unsigned char* data; System::IntPtr dataptr((int)data); Then use the System::Runtime::InteropSer... class to copy the data into the cli::array<Byte>: array<Byte>^ byteArray = gcnew array<Byte>(dataLength); Marshal::Copy(dataptr, byteArray, 0, dataLength); ......