NT4 and COM+?

I'm creating an MTS application for use by a number of NT4/win95/98 clients... But I want to develop the VB software within win2k server and sql server 2k.. I'm going to set up a win2k server to run the app using COM+ but can the NT4 and win95/98 clients use the win2k COM+ package that I'll have to export.?? I tried to export a package and install it on an NT4 client and got a componet services not installed error.. I presume it means the the COM+ services are not installed.. So. what do I need to setup or install to allow COM+ services to be accessable from NT4 and win95/98 clients?/??/?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

try to register your vb.dll manually(on client) and use the following to call it

dim x as progid.classid
set x = createobject("progid.classis", "mtsserver").
to reg dll manually just run : regsvr32 path to the dll

plus :
I think you should use ado 2.5 not 2.6(from sp1 for 2000)
Stupid question, but ...
Did you install vb runtime dll?s on the client pc ?
I think COM+ is win2000 only... so it probably won't work on NT/W95/W98
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

simloxAuthor Commented:
The client PC I tried to install to package on has visual Studio 6 with sp4 already installed... But it's not actually the Com+ app package I want install but the client reference to the COM+ distributed DLL. Under MTS I could export the client package and just install it on the client (together with DCOM on the 95/98 clients) , so it had access to the Data Layer DLL on the MTS server.
com+ package does not work on 9X or NT. but com+ export file has your dll or typelib and some configuration options. you can register dll manually(or as part of setup)  and point to the server using createobject. we did it for the mix env. If anybody knows better solution I would like to know. p.s on your client pc you need to have only typelib info.
simloxAuthor Commented:
rkot.. Could you please give some additional information on how you registered the remote com+ component on win nt4/98 client machines. I thought you only needed the 'tlb' type library on the clients and not the dll as well?
Yes you are right you need to have a typelib only.
But typelib also included in the dll. So you can create a setup package to register your dll and support files(vb runtime ado and ?.)

Try the following on NT4.0 Server.
Create a new mts package, add a component (only dll without typelib) and export it.

ClientConfig exe from MTS will include a dll.

But if you add a typelib to your package. ClientConfig exe will include a typelib.

I am using :

Clireg32.exe ? for typelib
regsvr32 ? for dll
simloxAuthor Commented:
I've created a new dll added it to the com+ services in win2k as an application. Exported the application(package) and installed the export file (msi file) on the NT 4 workstation. I've opened Visual basic and created a simple 'exe' app and added the reference to the dll. I've added some code to the form to simple return a value from the dll but i'm gettin the following error:

Runtime error '463'.
class not registered on this machine.

I manually registered the dll but still get the error..??
you are using set xx = new or createobject ...
simloxAuthor Commented:
yep... set objxx = createObject("classname","servername")
class name or progid.classname ?
simloxAuthor Commented:
I've tried several combinations of:

Set objTest = CreateObject("Test.clsHello", "Test")
Set objTest = CreateObject("clsHello", "Test")
Set objTest = CreateObject("Test.clsHello")

however, with :

Set objTest = CreateObject("Test.clsHello")

I get error '429' cannot create activex object
and not error '463'
try this Set objTest = new Test.clsHello or

Set objTest = new clsHello

in the production you should use :
Set objTest = CreateObject("Test.clsHello", "Test")
Set objTest = CreateObject("Test.clsHello")

if it's does not help try this :

close all vb projects
unregister dll

register dll and use
"C:\Program Files\Microsoft Visual Studio\Common\Tools\DEPENDS.EXE" tp check for missing runtime dll's

try to use "C:\Program Files\Microsoft Visual Studio\Common\Tools\OLEVIEW.EXE" to create an object

dll should be created/coml on nt4 machine,

try to create a setup package to include all files.
did you register a dll on the server?
do you have all support files on the server?

usually i am creating a setup package to run it on a server.

p.s you can include that dll or tlb in the setup for clients exe.
simloxAuthor Commented:
I seem to have all the runtime files for the dll on the client (checked using depends.exe) but cannot see the object within oleview.exe , but I can open the dll and get its info within oleview. When I try and create the object using new I get a cannot create activex object runtime '429'.

The dll was built on the server so all of the support files are available, but it built under windows 2k and put into com+, then the package exported for the client.

The problem is that my development environments are mainly win2k so creating the com+/mts dll components on a win nt4 server would be a problem.
simloxAuthor Commented:
I can create a package on an nt4 server and export the client stub to a win2k client machine and it works ok.. but not the other way round.. Is the installation from a com package different to a MTS one??
what is com package?
what is com package?
for some projects I am using rds to create an object on iis+mts server(s). rds works using http or https protocols and supports simple datatypes (long, string) and ado.recordset. the real plus for me that I don't need to register a dll or tlb on the client.
in order to use rds you must have a iis server and i am using mts/com+ to manage activex dll's.

simloxAuthor Commented:
sorry it supposed to be COM+. The package is to be run over a network and is to be on a sql server DB, from which the clients use the datalayer (COM+) object to retrieve data from the DataBase. If I use RDS does the app have to be used through an 'ASP' or similar web type interface ??
To all my clients I am not recommending to install bus tier and data tier(database) and the same server.
For couple reasons :
Dataserver usually is very expensive (raid 1 or raid10) + backup + 2/4 cpus, so it?s not scaleable, plus you need to apply service packs and new releases and you need to reboot a server or if you add a new feature with xyz.dll and for some reason sql server does not like it(xyz.dll) or you crashed nt during installing a service pack.

Back to dll.
If you build a dll on win2000 it requests that environment (ole automation and com)

But win2000 is backward compatible so you can build on nt4 and run it on 2000  
from help -->
Remote Data Service uses the RDS.DataSpace object's CreateObject method to create business object proxies. The business object proxy is dynamically created whenever an instance of its middle-tier business object counterpart is created. Remote Data Service supports the following protocols: HTTP, HTTPS (HTTP Secure Sockets), DCOM, and in-process (client components and the business object reside on the same computer).

simloxAuthor Commented:
so if I create a COM+ object on win2k it can only be
accessed via win2k clients... but if I create MTS
components on NT4 I can put them onto a win2k server
and all client can access them (nt4/me/win 2k)..

hmmm..  so I can create the MTS components on NT4
and install into com+ on win2k and all Clients can access
the components.. can I then create the client components on win2k and still port to all clients or do I have to create the client components on an NT4 platform.???
>>> so if I create a COM+ object on win2k it can only be
accessed via win2k clients...

yes and no.
Depends on clients configuration.
If you are installing only typelib  you should be ok, if you are trying to register dll it may not work properly).
simloxAuthor Commented:
I initially installed only the typelib on the NT4 client but it could'nt create the object...
ie. Runtime error '463'.class not registered on this machine.

which was my initial problem..
just found this :

PSS ID Number: Q238014
Article last modified on 03-30-2000

The information in this article applies to:
 - Microsoft COM+, version 1.0
Component Services (COM+) Explorer blocks the export of library applications as
application proxies, but you can still export library applications as
application proxies through the COM+ Admin SDK without getting error.
When you install this proxy on another computer using Component Services Explorer
or the COM+ Admin SDK, no error message will pop up because there is no check in
the SDK. The installation will be successful, but attempts to CoCreate a
component in this application will result in a "Class Not Registered" error.
Therefore, the application is unusable on the client computer. This is because
the .dll file is not registered on the client computer.
There is no check in the export code of the Admin SDK to prevent exporting
library applications as application proxies. There should be a check in the
installation code also for when an application proxy is being installed from an
.msi (Windows Installer) file. If the application being installed is indicated
as a library application, the installation should fail.
Do not export a library application as an application proxy using the Admin
If you already have an "invalid" .msi file, which are generated by exporting a
library application as an application proxy, either
 - Delete the application proxy using the COM+ Explorer or Admin SDK interfaces.
  You should also delete the .msi file in question and generate a new one, this
  time not specifying it as an application proxy.
 - Change the application to be exported to be a server application, then
  re-export the application proxy.
Microsoft has confirmed this to be a bug in the Microsoft products listed at the
beginning of this article.
Steps to Reproduce this Behavior
1. Create a new COM+ application as a library using the COM+ Explorer or the
  Admin SDK.
2. Export this library to an .msi file using the SDK.
3. Install this .msi file on a different computer.
4. Use a client application to create a component in this library. The error
  message "Class not registered" appears.
Additional query words: library, COM+, proxy, export
Keywords          : kbCOMPlus kbDCOM kbGrpCom kbDSupport
Version           : :1.0
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbpending
Copyright Microsoft Corporation 2000.

another :

PSS ID Number: Q259719
Article last modified on 07-07-2000


The information in this article applies to:
 - Microsoft COM+, version 1.0
This article describes how to export a COM+ application so that client computers
can use it remotely.
The first step in exporting a COM+ application to a client computer is to export
the COM+ application to an *.msi file. To do this, follow the steps below:
1. At the computer where the COM+ application is already installed, in Component
  Services, right-click the COM+ application that will be exported, and then
  click Export.
2. In the second screen of the wizard, click the Application Proxy option, and
  then specify a name and location for the *.msi file.
The second step is to install the *.msi file on to the client computer. The
client computer can be running Microsoft Windows 95, Microsoft Windows 98,
Microsoft Windows NT, or Microsoft Windows 2000. For the COM+ component client
proxy to be installed on an operating system other than Windows 2000, the system
should have the latest Microsoft Windows Installer installed.
The Microsoft Windows Installer can be downloaded from the following location:
After Microsoft Windows Installer has been installed on the client computer, copy
the *.msi file that was generated while exporting the COM+ application to the
client computer, and then double-click it.
The COM+ application is now installed so that client applications can use it
To uninstall the COM+ application from the client computer, start Add/Remove
Programs from Control Panel, select the installed package, and click
Please see the following for more information on exporting COM+ applications to
client computers:
Additional query words: Export clients setup deployment remoting remotable distribute objects aplications components classes
Keywords          : kbCOMPlus kbDSupport kbSysAdmin
Version           : :1.0
Issue type        : kbhowto
Copyright Microsoft Corporation 2000.
simlox - i have a solution i just tested w2k dll with nt4 client. let me know if you watn it.
simloxAuthor Commented:
yes please... I'll up the point to 250 for the solution...
ok ok it is almost very simple, you need to use vbr and tlb files.

We just got mixed environment, I created some samples, got GPFs did some research on support.Microsoft.com and ? .....
Step by step what I did.
1. Create an activex dll

 1.a In the components tab select remote server files.
 1.b make your dll.

2 Create COM+ package, add dll and regular mts/com+ junk ?

For client pc.
Open vbr file using notepad and change :


To the


Make the same change for ProxyStubClsid32.

Basically you need to change 0 to 4

You must do this otherwise you will get :

The instruction at '0x00000000' referenced memory at '0x00000000'.
The memory could not be 'read' - Q185193 on support.Microsoft.com

Execute  Clireg32
This exe can be found in the following folder : C:\Program Files\Microsoft Visual Studio\Common\Tools\Clireg

CLIREG32 SampleW2k.VBR -T SampleW2k.TLB -S TST-EBI3DEV

Where SampleW2k.VBR ? your new vbr file
SampleW2k.TLB ? your original tlb file
TST-EBI3DEV  - your W2K server.

Select DCOM in the dialog.

Open VB and locate your object in the references.

P.S you also need to modify client's setup program, but for now just try to call your server.

More good links :

Q161837 HOWTO: Create a DCOM Client/Server Application
Q168429 PRB: Component Download Fails for DCOM Projects
Q266717 HOWTO: Create a DCOM Client/Server Application by Using VB
Q267836 HOWTO: Create a DCOM Client/Server with Events by Using Visual Basic
Q268550 HOWTO: Use Dcomcnfg for a Visual Basic DCOM Client/Server Application
Q269330 HOWTO: Troubleshoot DCOM for Visual Basic Client/Server Applications

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
simloxAuthor Commented:
works brilliant... Thanks very much for all your help.

Do you have any additional links for the client setups..??

this link has some info on client setup

again for win95 you may need to get extra files from mircosoft :


For client setup.

Basically you need to include vbr file and tlb with client application.

After you add a vbr file to setup wizard, wizard will prompt you for net address  and connection type (DCOM)

You can check msdn for more info - Specifying Remote Server Components in the Setup.lst File

p.s. in your client application you can create an object using following

dim x as myapp.myclass
set x = new myapp.myclass

dim x as myapp.myclass
set x = createobject(?myapp.myclass?, ?nt server name?)

I am using b and I am storing server name in the ini file or in the registry.
In this case you have static load balancing or when you need to upgrade you production server you can direct all traffic to another box.

If you choose to use registry you can include *.reg file with your setup program:
From help:
If your project references any .reg or .vbl files, you will see an additional screen in the wizard where you can specify how this registry information should be treated. You can choose to simply copy the registry files to the end user's computer, or you can have the system store the information in the registry and automatically register it on the end user's computer.
simloxAuthor Commented:
thanx again..
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.