Can't write dword to registry correctly?
Posted on 2003-03-03
I need to write a key to the registry with a value of 4294967295, which is what Windows Media services recognizes as 'no limit'. The thing is I can write dWord values less than 2,147,483,647, but values any higher get automatically converted to a string registry entry.
Here is my code:
RegistryKey regKey = Registry.LocalMachine.CreateSubKey(@"SYSTEM\CurrentControlSet\Services\nsunicast\Parameters\Virtual Roots\/"+eId);
regKey.SetValue("MaxBandwidth", 4294967295); // if I change this to below the number above it will set as a dWord all day long.
Any examples, or ideas would be great.