Ok, so I used
array<String^>^drives = Environment::GetLogicalDrives();
and I'm trying to pass it into my function
deliver(string thisDir)
but simply typing
for(int i=0; i < drives->Length; i++)
drliver(drives);
does not work. Obviously the simple thing to do would be to allow deliver() to take a managed string but on theother side I am doing all kinds of string manipulation so that's an option but only if I can convert from managed to standard string on the other side....
I tried
char* str = (char*)(void*)Marshal::StringToHGlobalAnsi(drives);
but it gives me all kinds of errors. I'm using Microsoft Visual Studio 2005 pro. Any help would be REALLY appreciated. Thanks in advance.
array<String^>^drives = Environment::GetLogicalDrives();
and I'm trying to pass it into my function
deliver(string thisDir)
but simply typing
for(int i=0; i < drives->Length; i++)
drliver(drives);
does not work. Obviously the simple thing to do would be to allow deliver() to take a managed string but on theother side I am doing all kinds of string manipulation so that's an option but only if I can convert from managed to standard string on the other side....
I tried
char* str = (char*)(void*)Marshal::StringToHGlobalAnsi(drives);
but it gives me all kinds of errors. I'm using Microsoft Visual Studio 2005 pro. Any help would be REALLY appreciated. Thanks in advance.
