Solved

Manually setting up DCOM Client/Server app

Posted on 2001-06-14
11
317 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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
 

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
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…

809 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