PDA

View Full Version : Binary entry into registry



brianw
01-23-2002, 09:17 AM
I'm trying to create a registry entry called File Mode - a BINARY type - with a value of 01. However, when I attempt to create this through my script, I'm getting everything but a 01 entry. I've attached the code that I am using to try and do this. Any assistance that anyone can provide is greatly appreciated.

Here it is:

if (RegDBSetKeyValueEx(saKey, "File Mode", REGDB_BINARY, sValue, nSize) < 0) then
MessageBox("Setup was unable to create the 'File Mode' registry value \n" +"for the " + saType + "\\" + svName + " ACD. This will have to be done manually.\n", WARNING);

endif;

mdelpin
01-30-2002, 01:26 PM
Why not just use the registry table instead?

Link the reg to a component or create a dummy component that only contains that registry entry.

Mitcho
01-30-2002, 02:59 PM
Try setting the values by putting each digit in an array:

///setting value in key7 to 00,00,01,00
szName = "EditFlags";

szValue7[0] = 0x00;
szValue7[1] = 0x00;
szValue7[2] = 0x01;
szValue7[3] = 0x00;

nType = REGDB_BINARY;
nSize = 4;
if (RegDBSetKeyValueEx(szKey7, szName, nType, szValue7,
nSize) < 0) then
MessageBox("RegDBSetKeyValueEx failed.7", SEVERE);

abort;