Jump to content

Dll


Guest LAS

Recommended Posts

When I'm showing the parameter lists, parameters enclosed in [] mean

those parameters are optional, and parameters enclosed in <> mean

those parameters are mandatory.

 

The DLL includes these functions:

 

GetKeyValue

Parameters: [starting character] [length] [display] <key/value>

 

This function reads a value from the registry. As it's possible

that some binary or string entries could be longer than 900

characters, you may provide a starting character and maximum

length for the function to return. Characters start at 1.

If [starting character] is 0, then the function will return

the length of the registry value. These two parameters are

ignored when the registry value is a DWORD value. Keys and

values must be formatted as such:

 

<root>\<key name>\\<value name>

 

If <value name> is blank or the double backslashes do not exist,

the key's default value will be returned. If the key does not

exist or has no value ("" for strings, or a zero-length binary

value) then $null will be returned.

 

If you give a [display], you can change the way the registry

entry is output:

long - Displays REG_BINARY as a 32-bit integer (as if

it were of type REG_DWORD). Returns $null if

there are not enough bytes to do this.

hex - Displays the output as a string of hexadecimal characters

splithex- Displays the output as a string of hexadecimal characters

with spaces in between, similar to the way regedit.exe

displays REG_BINARY values

 

Examples:

 

//echo You logged on as $dll(registry.dll,GetKeyValue,

HKEY_LOCAL_MACHINE\Network\Logon\\Username)

 

//bset &SecondColor 1 $dll(registry.dll,GetKeyValue,

4 3 HKEY_CURRENT_USER\Control Panel\Appearance\\CustomColors)

 

//echo Your dial-up connection speed is $dll(registry.dll,

GetKeyValue,LONG

HKEY_DYN_DATA\PerfStats\StatData\\Dial-Up Adapter\ConnectSpeed

)

 

GetKeyType

Parameters: <key/value>

 

This function's purpose is to give you the data type of

the registry value, in case it matters. On Windows 95/98,

it can return REG_SZ (string), REG_BINARY (binary value),

REG_DWORD (double word), REG_NONE (no specific type), or

$null. If REG_NONE is returned, that usually means that

the key you gave existed, but the value name did not.

If $null is returned, that means that the key did not

exist. On Windows NT, this can return other values too,

but they aren't currently supported with GetKeyValue.

The format of <key/value> should be the same as it is in

GetKeyValue.

 

Examples:

 

//echo Most entries are of type $dll(registry.dll,GetKeyType,

HKEY_CLASSES_ROOT\.bat)

 

//echo Lame null: $dll(registry.dll,GetKeyType,

HKEY_DYN_DATA\asdkjsdjka7834\dfyah)

 

GetSubKeyName

Parameters: <index> <key>

 

Use this function to obtain a list of subkeys in the

registry tree. <index> starts at 1. If you pass <index>

as 0, the total number of subkeys will be returned.

No value should be added to <key>. It will be ignored

if it exists. You will also get $null if the key path

does not exist. Keep in mind that only the key name

is returned, not the full path name.

 

Examples:

 

//echo You have $dll(registry.dll,GetSubKeyName,

0 HKEY_CLASSES_ROOT\CLSID) class IDs

 

//echo One of your recent network mappings was $dll(registry.dll,

GetSubKeyName,1 HKEY_CURRENT_USER\Network\Recent)

 

GetValueName

Parameters: <index> <key>

 

Like GetSubKeyName, this is used to obtain part of the

tree listing, except this works for value names instead

of subkey names. Other than that, it works exactly the

same way.

 

Example:

 

//echo One of your color schemes is named $dll(registry.dll,

GetValueName,

1 HKEY_CURRENT_USER\Control Panel\Appearance\Schemes)

 

DLLInfo

Parameters: none

 

This just gives you my version info.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...