[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Manually setting up DCOM Client/Server app

Posted on 2001-06-14
11
Medium Priority
?
356 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
[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
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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 400 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

649 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