MyClass::Func01(UINT32 param1, UINT32 param2) { UINT8* invalBuf = NULL; // System::IntPtr^ invalBuf = NULL; even uncommenting and usage of above would give the same error. Error 8 error C2059: syntax error : ';' e:\Proj\ManagedProject.cpp 232 UINT8* outvalBuf = NULL; // System::IntPtr^ outvalBuf = NULL; Error 9 error C2059: syntax error : ';' e:\Proj\ManagedProject.cpp 232 UINT16 var1; UINT32 var2; ..... when invoking gcnew with above variables, and allocation of memory, invalBuf = (System::IntPtr) gcnew(var1,true,"invalBuf"); ... memcpy(outBuf,inBuf,var1); //error C2440: 'type cast' : cannot convert from 'System::IntPtr ^' to 'void *' e:\Proj\ManagedProject.cpp 249 outvalBuf[2] = Some bitwise operated value; Error 13 error C3915: 'System::IntPtr' has no default indexed property (class indexer) e:\Proj\ManagedProject.cpp 252 outvalBuf[3] = some other bitwise operted values; .... .... ....
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)