Federico - 2016-09-29

When i call daveCopyRamToRom i get the error "Operation not permitted in current protection level".
This is my c++ code:

daveConnection * dc;
_daveOSserialType fds;
fds.rfd=openSocket(102, sIp);
fds.wfd=fds.rfd;
if (fds.rfd>0){
    daveInterf = daveNewInterface(fds, const_cast<char*>("IF0"), 0, daveProtoISOTCP, daveSpeed187k);
    daveSetTimeout(daveInterf, 5000000);
    dc=daveNewConnection(daveInterf, 2, 0, 2);  // insert your rack and slot here
    if(0==daveConnectPLC(dc)){ 
        dc->maxPDUlength = 240;
        bConnected = true;
    }
    else{ 
        bConnected = false;
        return false;
    }
}
else{ //Couldn't open TCP port. \nPlease make sure a CP is connected and the IP address is ok.
    bConnected = false;
    return false;
}  
daveStop(dc);
int ret = daveCopyRAMtoROM(dc);
debug() << daveStrerror(ret);
daveStart(dc);

What could be the cause?