Solved

Manually setting up DCOM Client/Server app

Posted on 2001-06-14
11
306 Views
Last Modified: 2008-02-01
My question is very similar to the one at http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20135365

I've read the article at http://support.microsoft.com/support/kb/articles/Q266/7/17.ASP which describes the procedure using Package and Deployment Wizard, I'm wanting to test the app without using P&D wizard.

I've..

1)created an activeX exe and under properties>Component I have selected 'Remote Server Files' to create the vbr and tlb files when compiled. However because at present the app has a form I have not been able to select 'Unattended execution' in the General tab (The form could be removed if this is a problem).

2)placed the active exe on a server and run <path>\<activeX exe name> to register it.

3)had a look at Dcomcnfg but left permissions set at default.

4)In the client app I've referenced the activeX exe located on the server.

5)run <Path>\CLIREG32 <path>\<activeX>.VBR and in the dialog's address box entered the full network path of the activeX exe on the server.

When I run the client app in the IDE and step through the code, the CreateObject method worked but since there is a form in the activeX exe the app shows as running on the win98 workstation and does not show in the NT task manager.

Now when run the CreateObject method creates an error which says 'The remote server machine does not exist or is unavailable'.

Any clues?
0
Comment
Question by:rhubarbtwo
  • 7
  • 3
11 Comments
 

Author Comment

by:rhubarbtwo
ID: 6191975
Forgot to say I'm using the activeX exe to open an ado connection on the server to a Db located in an un-shared drive. Then another call will pass a recordset using that connection. Is that sensible? For security I don't want the user to see the data files and their location, but the activeX exe will acquire that info somehow.
0
 

Expert Comment

by:mpaul4u
ID: 6194332
JUST MAKE SURE REMOTE MACHINE YOU MENTIONED WHILE
INSTALLING PACKAGE EXISTS OR ACCESSIBLE>
MAKE SURE THE CLSIDS AT THE REMOTE MACHINE AND
CLIENT MACHINE ARE SAME>Tht is it
martin
0
 

Author Comment

by:rhubarbtwo
ID: 6194383
I've followed Craig Boland's notes which come with his project at Planet Source Code http://www.planetsourcecode.com/xq/ASP/txtCodeId.10751/lngWId.1/qx/vb/scripts/ShowCode.htm

I get the feeling I have a problem at the Client end, maybe I have not run CliReg32.exe correctly.
0
 

Author Comment

by:rhubarbtwo
ID: 6194603
Got it to work now by using the Package and Deployment Wizard for the Client installation. So could do with some help to setup the client manually ie without using P&D wizard, some help with the usage of CliReg32.exe would be appreciated.
0
 
LVL 5

Accepted Solution

by:
AndrewDev earned 100 total points
ID: 6194989
CLIREG32
Follow the steps in this document and you should be OK
http://support.microsoft.com/support/kb/articles/Q194/6/36.ASP

Good Luck
Andrew
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:rhubarbtwo
ID: 6195467
I had the activeX exe running ok on the server, then I removed two forms and recompiled. I re-referenced the activeX component in my client project, recompiled, and now the component runs on the client not the Server. I've checked the component is still registered in Dconcnfg to run on the server.

Also even without any forms in the activeX component, the option of Unattended Execution is always greyed out (there is a standard module included in the project).
0
 

Author Comment

by:rhubarbtwo
ID: 6195559
I've reregistered the client, now when I call CreateObject I get an Automation error
0
 
LVL 5

Expert Comment

by:AndrewDev
ID: 6196070
After recreating a server you need to reregister and run DCOMCNFG again.

In DCOMCNFG you don't have to set everything up from scrath, what I do is go to the identity tab, change it to the interactive user hit Apply, then change it back to the launching user and hit Apply.

If you are using the 'this user' option the same applies, just change it to one of the others and back again. It will then work.

Remember to make sure your new server is registered before running DCOMCNFG. Unless an exposed interface has changed you shouldn't need to run CLIREG32 again.

Hope this helps
Andrew

0
 

Author Comment

by:rhubarbtwo
ID: 6197745
So I have to run Regsvr32 for each recompile of the activeX exe even though its name is the same?

I notice the client app references the TLB file. When the activeX exe is recompiled this will be updated I presume. So should the client be referencing a local copy of the TLB file or a central one on the server? If a local one, then does that need updating?
0
 
LVL 5

Expert Comment

by:AndrewDev
ID: 6197956
Yes - the problem is it is not the name but the class ids that are registered. So if you recompile, unless you force the class ids to be the same you have to run Regsrv32 again.

As long as you haven't changed the client interface you shouldn't  need to run clireg32 again. However if in doubt it won't do any harm.
0
 

Author Comment

by:rhubarbtwo
ID: 6202814
AndrewDev : I'm going to have a number of exe's on one client PC referencing the same Server ActiveX component. Is there a free utility available for managing client registrations, eg I'm wanting to temporarily de-register an exe so that I can test locally on my development PC? Also will need to do multiple registrations at setup.

I'm looking for a windows interface to the Dos styled CLIREG32.exe
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

759 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now