Home : Registry Entries Created by Setdllhost
Q30975 - INFO: Registry Entries Created by Setdllhost

Registry Entries Created by Setdllhost

 

Setdllhost.exe is a program provided by J-Integra to set the default surrogate for a specified in-process server (DLL) to be dllhost.exe. The reason why it's needed is because a COM client cannot communicate remotely to an in-process server; it must be hosted in an executable. It does this by creating various entries in the registry. Here are the entries it creates.

1. For each CLSID encountered in the DLL component, it creates an AppID value under HKCR\CLSID\{clsid} which contains the same value as the CLSID.

HKCR\CLSID\{clsid}
  AppID = {appid value}

2. Using the same AppID value, it also creates an AppID key under HKCR\AppID.

HKCR\AppID\{appid}

3. Under HKCR\AppID\{appid}, it creates the following values:

(Default) =
DllSurrogate =

For example, let's say MyDll.dll contains one class called MyClass with CLSID {6A0484F3-7F3C-4A81-BE59-9AAA746E5C6E}. To host MyDll.dll using dllhost, you will need to run setdllhost like this:

setdllhost MyDll.dll "My DLL Surrogate"

This command will create the following entries in the registry:

HKCR\CLSID\{6A0484F3-7F3C-4A81-BE59-9AAA746E5C6E}
  AppID = {6A0484F3-7F3C-4A81-BE59-9AAA746E5C6E}

HKCR\AppID\{6A0484F3-7F3C-4A81-BE59-9AAA746E5C6E}
  (Default) = "My DLL Surrogate"
  DllSurrogate =

You would then be able to configure this surrogate by running DCOMCNFG and looking for the Application entry called "My DLL Surrogate".

To remove a surrogate, you need to delete these entries using the registry API in Win32 (regedit).

Note: Two new options which allow for the automatic listing and removal of surrogates (/list and /unregister) are now available for the SetDllHost tool.

Please note that the use of surrogates for accessing DLLs is not a J-Integra specification, but a COM specification. Setdllhost simply follows the COM specification to properly set the default surrogate. We highly suggest using this tool unless you are well aware of what registry entries are needed, and how to work with the registry.

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 6/23/2006.
Last Modified on 7/11/2006.
Last Modified by No Author Name Available!.
Article has been viewed 9831 times.
Rated 6 out of 10 based on 16 votes.
Print Article
Email Article