Solved

NT4 and COM+?

Posted on 2001-07-06
34
483 Views
Last Modified: 2013-11-25
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?/??/?
0
Comment
Question by:simlox
  • 20
  • 13
34 Comments
 
LVL 5

Expert Comment

by:rkot2000
ID: 6259507
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)
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6259514
Stupid question, but ...
Did you install vb runtime dll?s on the client pc ?
0
 
LVL 1

Expert Comment

by:Sieger
ID: 6259551
I think COM+ is win2000 only... so it probably won't work on NT/W95/W98
0
 

Author Comment

by:simlox
ID: 6259736
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.
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6259783
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.
0
 

Author Comment

by:simlox
ID: 6312485
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?
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6312558
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 ?.)

P.S
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
0
 

Author Comment

by:simlox
ID: 6312697
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..??
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6312722
you are using set xx = new or createobject ...
0
 

Author Comment

by:simlox
ID: 6312834
yep... set objxx = createObject("classname","servername")
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6312852
class name or progid.classname ?
0
 

Author Comment

by:simlox
ID: 6312970
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'
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6313020
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

p.s
dll should be created/coml on nt4 machine,

try to create a setup package to include all files.
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6313030
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.
0
 

Author Comment

by:simlox
ID: 6316625
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.
0
 

Author Comment

by:simlox
ID: 6321131
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??
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6321907
what is com package?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 5

Expert Comment

by:rkot2000
ID: 6321931
what is com package?
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6321977
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.

0
 

Author Comment

by:simlox
ID: 6323064
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 ??
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6323128
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  
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6323547
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).

0
 

Author Comment

by:simlox
ID: 6324013
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.???
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6338511
>>> 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).
0
 

Author Comment

by:simlox
ID: 6340279
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..
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6349666
just found this :

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

======================================================================
-------------------------------------------------------------------------------
The information in this article applies to:
 
 - Microsoft COM+, version 1.0
-------------------------------------------------------------------------------
 
SYMPTOMS
========
 
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.
 
CAUSE
=====
 
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.
 
RESOLUTION
==========
 
Do not export a library application as an application proxy using the Admin
SDK.
 
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.
 
-or-
 
 - Change the application to be exported to be a server application, then
  re-export the application proxy.
 
STATUS
======
 
Microsoft has confirmed this to be a bug in the Microsoft products listed at the
beginning of this article.
 
MORE INFORMATION
================
 
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.
 

0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6349682
another :

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

 

======================================================================
-------------------------------------------------------------------------------
The information in this article applies to:
 
 - Microsoft COM+, version 1.0
-------------------------------------------------------------------------------
 
SUMMARY
=======
 
This article describes how to export a COM+ application so that client computers
can use it remotely.
 
MORE INFORMATION
================
 
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:
 
   http://msdn.microsoft.com/downloads/sdks/platform/wininst.asp
 
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
remotely.
 
To uninstall the COM+ application from the client computer, start Add/Remove
Programs from Control Panel, select the installed package, and click
Add/Remove.
 
REFERENCES
==========
 
Please see the following for more information on exporting COM+ applications to
client computers:
 
   http://msdn.microsoft.com/library/psdk/cossdk/pgdeployment_toplevel_65gz.htm
  (http://msdn.microsoft.com/library/psdk/cossdk/pgdeployment_toplevel_65gz.htm)
 
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.
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6410810
simlox - i have a solution i just tested w2k dll with nt4 client. let me know if you watn it.
0
 

Author Comment

by:simlox
ID: 6410889
yes please... I'll up the point to 250 for the solution...
0
 
LVL 5

Accepted Solution

by:
rkot2000 earned 250 total points
ID: 6411090
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 :

HKEY_CLASES_ROOT\INTERFACE\{<Server ClsId>} _
\ProxyStubClsid\{00020420-0000-0000-c000-00000000046}

To the

HKEY_CLASES_ROOT\INTERFACE\{<Server ClsId>} _
\ProxyStubClsid\{00020424-0000-0000-c000-00000000046}

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
http://support.microsoft.com/support/kb/articles/Q185/1/93.ASP?LN=EN-US&SD=gn&FR=0&qry=Q185193&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=VBB


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
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6411119
0
 

Author Comment

by:simlox
ID: 6412621
works brilliant... Thanks very much for all your help.

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

Thanks
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6413448
this link has some info on client setup
http://support.microsoft.com/support/kb/articles/Q266/7/17.ASP


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

http://support.microsoft.com/support/kb/articles/Q165/1/01.ASP

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

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

or
b.
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.
0
 

Author Comment

by:simlox
ID: 6416629
thanx again..
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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…

760 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

19 Experts available now in Live!

Get 1:1 Help Now