This is because HANDLE port
is member of managed class, which is subject of garbage collection. Reference to managed class member cannot be used, because class instance can change its address. You can use local variable to fix this:
int RFID::connect(char* p){
HANGLE h = port;
int n = RmuOpenAndConnect(h,p,0);
port = h; // in the case RmuOpenAndConnect changed the handle
return n;
}