1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
else
{
//write the data directly to the registry
RegBinaryClass lRegDataPlugRawBytes;
// Calculate the checksum
lData[0] = mCalculateChecksum(&lData[1], aDataplugIni.aLastByteAddress);
AASSERT( lData != NULL );
if ( lData != NULL )
{
if(lRegDataPlugRawBytes.mInit( REG_KEY_BASE_NPEN_DATAPLUG_FOLDER, REG_KEY_NAME_NPEN_DATAPLUG_CONTENT, aDataplugIni.aLastByteAddress + 1 , (const LPBYTE)lData ), aDataplugIni.aLastByteAddress + 1)
{
lRegDataPlugRawBytes.mSetBinaryValues( (LPBYTE)lData, aDataplugIni.aLastByteAddress + 1 );
if(!(lRegDataPlugRawBytes.mWriteValue()))
{
MessageBox(strcat((char*)aDataplugIni.aErrorEntry.c_str(), "\nmWriteValue() failed"), "Error Writing to the registry", MB_ICONERROR | MB_OK);
}
}
else
{
MessageBox(strcat((char*)aDataplugIni.aErrorEntry.c_str(), "\nmInit() failed"), "Error Writing to the registry", MB_ICONERROR | MB_OK);
}
}
else
{
MessageBox(aDataplugIni.aErrorEntry.c_str(), "Error Writing to the registry", MB_ICONERROR | MB_OK);
}
} |
Partager