Solved

HOW TO CONFIGURE DCOM PROGRAMATICALLY???

Posted on 2001-08-03
6
471 Views
Last Modified: 2008-02-01
Hello Experts!!!

I want to configure DCOM related settings (in client and server) for my component (ActiveX dll & exe) , while running the component's setup.  I don't want to use "dcomcnfg.exe" and "clireg32.exe" for that.  (But now i'm using that.)

How i can programatically accomplish all those things which we are doing using those utility programs.  I'm also sure we can, because some programs already doing all those settings, (like dcom registration, MTS registration etc.,) when we are installing them.

Is there anybody to help me please????
0
Comment
Question by:SRIVB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 6348488
here's a small article of the MSDN libraries. It means that you can use the normal registry api functions to set up the DCOM environment. It shows a small example (manual setting regisytry settings), but you can get the correct functionality too if you use the Registry API functions. I hope it is clear.

----

Changing the Registry Manually
You can also make many of these modifications manually instead of using the DCOMCNFG tool, as follows:


Using the registry editor, modify the server application's registry entries on the client and the server machines. The following registration information uses the REGEDIT4 syntax where the key is specified in square brackets. The line after each key specifies a name and a value. The name is on the left of '=' and the value on the right.
   '@' on the left indicates a value without a name. Replace the following
   GUIDs with your GUIDs. You can generate a new GUID for AppID (using
   uuidgen.exe), or use the same GUID as the CLSID. Replace hello.exe with
   your server's EXE name and replace 'Hello App' with a string that
   describes your server application:

   REGEDIT4
   ;;;; CLSID key
   [HKEY_CLASSES_ROOT\CLSID\{0bf52b11-8cab-11cf-8572-00aa00c006cf}]
   "AppID"="{0bf52b15-8cab-11cf-8572-00aa00c006cf}"

   ;;;; AppID key
   [HKEY_CLASSES_ROOT\APPID\{0bf52b15-8cab-11cf-8572-00aa00c006cf}]
   @="Hello App"

   [HKEY_CLASSES_ROOT\APPID\hello.exe]
   "APPID"="{0bf52b15-8cab-11cf-8572-00aa00c006cf}"



Remove any InprocServer32 and LocalServer32 keys from the server application's registry entries on the client machine. (These should not be removed on the server machine where the server application resides.) Add the following key to the server's registry entries on the client machine. Use the same GUID for the AppID as in the previous step. Replace server_machine_name with the name of the machine on which the server is located:
[HKEY_CLASSES_ROOT\APPID\{0bf52b15-8cab-11cf-8572-00aa00c006cf}] "RemoteServerName"="server_machine_name"


On the server machine, use DCOMCNFG or the OLE View tool to specify access and launch permissions for the server application. See the sections in this article that describe these tools for more information about how to specify permissions.
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6348729

PDW - can do some job for you...

just when you compile *.dll you need to check remote files ..

Package and Deployment Wizard ? Remote Servers

Allows you to provide or modify the settings necessary for the end user's machine to find and connect to a remote server. When end users install the package, they will be required to provide any information necessary for the connection that you did not enter here.

This screen only appears if your package includes one or more .vbr files. These and all included files are listed on the Included Files screen; they are either needed by your project, manually added to the package on the Included Files screen, or needed by another file in the package.

Options
Remote Servers List

Displays the name and current location of each .vbr file, and provides columns in which you can specify the necessary connection settings:

Net Address ? The network address of the machine where the server application will be installed. If you leave this column blank, your users will be asked for this information when they install the package.

Connection Type ? Choose whether your application uses DCOM (Distributed Component Object Model) or RA (Remote Automation) to access the remote component.

Protocol ? Displays a list of the network protocols from which you can choose. Available only if you selected RA (Remote Automation) as the connection type. If you want the end user to supply the information, choose "(End user must specify)."

Authentication ? Available only if you selected RA (Remote Automation) as the connection type. Required. For more information, see RPC Security in your Windows NT documentation.

When you move the mouse cursor over an entry in the remote servers list, a tooltip appears, listing the files for which the given file is needed or stating that the given file was manually added to the list.

0
 

Author Comment

by:SRIVB
ID: 6351066
I already read those MSDN articles, but they are little confusing.  Using dcomcnfg utility i can configure some general machine settings(Enable/Disable DCOM, Default Authentication, Default Impersonation.. etc.,) as well as some settings which are specific to my component(Access Permissions, Launch Permissions, identity, activation..etc.,).  I want to do all those settings thru my program.

So can you please give some code (or) logic, specific to my requirement??
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:marconovaro
ID: 7095032
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7198452
Hi SRIVB,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Save as PAQ -- No Refund.
    *** Unsure if any answer worked and too few points to split.

SRIVB, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7213321
Per recommendation, points NOT refunded and question closed.

Netminder
CS Moderator
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question