Welcome! and rules
Joel on Software
bool bug: unmanaged to managed improper mashalling
Try changing the prototype of the unmanaged function to return Int32 or UInt32, AND (&) the return value with 15 and test against 0 instead of false. I don't know the size of a .net Boolean but I suspect it's not the same as your (C++?) unmanaged code's bool.
I meant 255 not 15 above. Anyway just test the lowest byte of the return value against 0.
Fog Creek Home