The code below shown is in visual c++
array<Byte>^ b = gcnew array <Byte> (filesize);
fs->Read(b,0,b->Length);
unsigned char *pb;
pb=(byte*)malloc(b->Length); //pb is unmanaged here.
for(int i=0;i<b->Length;i++)
{
*(pb+i)=InverseByte(b+i);
}
I want to call the function below to reverse each byte. How can I do this? I want to do inverse of each byte of managed array b, and put it in the unmanaged array b.
unsigned char InverseByte(unsigned char* PbByte)
{
//something;
}