On 9 Oct 2006 10:40:48 -0700, in comp.lang.c , "James Reid"
<a8******@hotmail.comwrote:
>Richard Heathfield wrote:
>Show me. Show me how Fortran 77 can make changes to the registry. Or ISO
Basic. Or Algol-68. Are those languages too old for you? Okay, let's see
you do it in Ook!, or Whitespace, or Princess.
The Windows "Registry" means binary files. Even GWBASIC can change
binary files! What's the problem?
Sure, you can change it with C. All you need to do is
a) discover the binary format of the registry
b) discover how to bypass security so you can see the bits you need
c) fopen the registry file (lets pretend its an ordinary file)
d) fseek to the right place, somehow
e) change some bits in it. Note that in-place file editing is in
general impossible in Standard C. And you can't use the usual trick of
copying the file to a new one since the file is locked open by the OS.
f) close the file and hope like hell you didn't fsck your registry.
g) reboot the PC and pray.
h) reinstall Windows and curse.
Or alternatively you could go to a windows group and ask how to use
the registry editing functions in the Win32 API.
--
Mark McIntyre
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan