|
Question : Windows 98 SE - Registry - SharedDLLs - dword - purpose
|
|
dword = double word = 2 words = 4 bytes = 32 bits
But, what is it FOR in the Registry?
What are the implications of different values?
Is it used anyplace other than the Registry?
Is it used for higher versions of Windows?
|
|
Answer : Windows 98 SE - Registry - SharedDLLs - dword - purpose
|
|
sysandprog.
To give you a live example of where a Dword is used rather than a String Value, do this:
Start > Settings > Folder Options > File Types. Click on the top file type, and arrow down slowly, looking at the 3 buttons at the right named "New Type", "Remove" and "Edit".
You will see that, when certain file types are selected, one or more of these buttons becomes unavailable. A perfect example is "Application" which will show up below as EXE. The "Remove" and "Edit" buttons are unavailable, and this is intentional to stop inquisitive users from messing around with the .EXE file association.
Close the Folder options dialog and navigate in regedit to the key: HKEY_CLASSES_ROOT\exefile
Across in the right pane, you will see a Dword Value named "EditFlags", and the value against it will show as "d8 07 00 00". This would appear as "EditFlags"=hex:d8,07,00,00 if you exported that key to a .REG file.
Go now to the sub-key: HKEY_CLASSES_ROOT\exefile\shell\open and there you will see another "EditFlags" value set as hex:00,00,00,00.
Each paired value has a significance with the deliberate restrictions you saw for the .EXE file type in Folder Options, and it is the preferred type of value because of these paired values.
As you will probably be aware, if you selected a particular file type in the "File Types" dialog, and clicked the "Edit" button (if available), it should then show you one or more "Actions" set against that file type such as "Open", "Edit", "Print", etc. If you then selected one of those actions, you would be able to "Edit" the command used for that action. In the example above, the first "EditFlags" stops a user from even getting to that 2nd stage.
IF the first "EditFlags" value was 00 00 00 00 then all 3 buttons SHOULD be made available (you would think) and you could screw up your system really well if you wanted to, because it would in theory allow access to the "Actions". It's handy to know this, because there may be a time that a file association is usurped maliciously, and you could temporarily reset an "EditFlags" value to access the "File Types" action and reset the default value. Just an example, of course, but you will also find that there are restrictive "EditFlags" values to prevent you messing with other file types including "Folder" and "File Folder".
It is much easier to set the "EditFlag" value through the paired values of a Dword value rather than a string value. I know you will be curious about this, so here's some notes I cooked earlier:
To allow an object without an extension to be edited in this dialog box the EditFlag setting must be present in the registry and set to "Add to list even if no ext" from the table below.
Object with extension appear unless there is a EditFlags setting with "Remove from List" set.
Win98 adds many "special file types" that were not available in Win95.
Unknown - All files that aren't defined Folder - All Folders including those that aren't directories Directories - All Directories Drive - All Disk Drives AllFileSystemObjects - Everything you can see in Explorer AllFileSystemEditObjects - Everything editable you can see in Explorer
To allow these to be edited in "Folder Options > File Types", they require "Add to list even if no extension" to be set. Folders, Directories (File Folders), and Drives appear by default in Win98, and you will see this if you looked at the EditFlags value in the section that makes it show in the list.
EditFlag can also be defined under each Shell\Command, and will override the higher EditFlag setting.
The HKEY_CLASSES_ROOT\Folder, Directory, and Drive keys all have the following restrictions set by default to prevent you from Editing or Removing the "Actions". These items DO allow you to create New actions, though.
"EditFlags"=hex:d2,01,00,00
d2 hex = 210 decimal, and this appears to be a combination of:
1 10 (16) No Remove Button (main tab) 1 02 Add to list even if no ext (main tab) 1 40 (64) No Edit Button (edit tab) 1 80 (128) No Remove Button (edit tab)
The 2nd pair (01) seems to be derived from: 2 01 No Description (action box)
In theory, by setting "EditFlags" to 00,00,00,00 should remove all restrictions, and allow total control over changing things in the "Folder Options > File Types" tab. It DOESN'T, though, it just removes them from the list because 02 Add to list even if no ext (main tab) has to be set.
To keep the restriction in place to prevent removal of those file types, but open up the ability to remove certain actions and edit existing ones, it needs the value: "EditFlags"=hex:12,01,00,00
This is derived from:
(File Types Tab)
02 hex (Add to list even if no ext) + 10 hex (16 decimal) (No Remove Button) = 12 hex
Add values together. Use Windows calculator in Hex mode.
Hex Mode (base 16) uses 0-9 and A-F - so decimal (base 10) 10 is Hex A, 11 is B, ..., 15 is F, and 16 is 10. Decimal 17 would be Hex 11 and Decimal 31 would be Hex 1F.
Position Hex Value (Decimal) Description
Control Types Tab ----------------- 1 01 Remove From List 1 02 Add to list even if no ext 1 04 No Extension 1 08 No Edit Button 1 10 (16) No Remove Button Edit Tab -------- 1 20 (32) No New 1 40 (64) No Edit Button 1 80 (128) No Remove Button 2 01 No Description 2 02 No Change Icon 2 04 No Set Default 3 01 Set Confirm Open After Download
Action Box ---------- 2 08 No Description 2 10 (16) No Command 2 20 (32) No DDE
Add All File Types and Unknown File Types ----------------------------------------- To add All File Types and Unknown File Types to the edited list in the View - Folder Options - File Types. This registry file will automate this process. Open Notepad and copy the following lines to a new file and call it "AddFileTypes.reg". Save it to the desktop. Then double click it.
REGEDIT4
[HKEY_CLASSES_ROOT\Unknown] "EditFlags"=hex:02,01,00,00
[HKEY_CLASSES_ROOT\*] @="AllFiles" "AlwaysShowExt"="" "EditFlags"=hex:d2,00,00,00
Try setting an "EditFlag" value from a single StringValue !! ;-)
Take a look also at the "Binary Values" in the key: HKEY_CURRENT_USER\Control Panel\Appearance\Schemes
How many lines of "StringValues" would have to be used to define the appearance rendered by changing your Desktop and Windows Explorer appearance to the "Eggplant" scheme where colours of title bar, menu fonts, etc, etc, are all changed to a garish abomination designed to look funky, I suppose??
Much easier to apply from a single BinaryValue, don't you think?
One other thing you touch on is whether the same value types seen in the Win98 registry are used in "higher versions" of Windows. You will find that the following expressions are used to describe the respective types in a Win9x registry:
REG_BINARY - BinaryValue - raw binary data REG_DWORD - DwordValue - four byte number REG_SZ - human readable text values.
The Windows NT-based (NT, 2000, XP) registry also uses a couple of extra value types in addition to those used by the win9x registry:
REG_EXPAND_SZ - expandable data string containing a variable to be replaced when called by an application eg. "%SystemRoot%"
REG_MULTI_SZ - a multiple string used to represent values that contain lists or multiple values, each entry is separated by a NULL character.
Good tutorials here: http://www.winguides.com/article.php?id=1&guide=registry http://www.petri.co.il/before_you_begin.htm
|
|
|
|