Link to home
Start Free TrialLog in
Avatar of erot
erot

asked on

DCOM and VB6.0 SP3 and NT4.0 SP5

I have created a DLL with VISUAL BASIC 6.0 SP3 and registered it within MTS (Microsoft Transaction Server).

Then I have created an EXE project in VB and called the methods in the DLL above like this:
dim xDll as object
set xDll = CreateObject  
           ("PubsMTS.Authors")
call xDll.GetAuthorInfo("12")

which work great... :-)

Now I want to run the DLL on the NT-Server from the EXE-program created above. But this time I want to run the EXE program on a client computer (Windows 95) and use the DLL/Method on the Server with DCOM technology.

Have found two articles describing how to do this on the following URL's
http://support.microsoft.com/support/kb/articles/
and then Q161/8/37.asp and Q191/7/66.asp

but my problem is that both this articles deals with VB5.0 and the description on how to setup the client does not work for my VB6.0

Can anyone give me a step by step instruction on how to create installation files that can be installed on the client computer so it will work???? or a reference to an articel on Internet that does?????

Happy new year

Erot

Avatar of brsltd
brsltd

All you need to do is Export the MTS package that you added the DLL to.  This will create a subdirectory called \clients from the path of the package.

In here, MTS will create an exe file (You name it when you export it) which you need to browse to FROM THE CLIENT PC, and then double-click.

This will make the necessary registry entries for you and all should be well.

As long as you've already installed the dll on the server, just do the following:


dim xDll as object
CreateObject("PubsMTS.Authors","servername")
call xDll.GetAuthorInfo("12")


....where servername is the name of your server. Does the GetAuthorInfo return anything?

if so....let's say it returns a recordset, you can code like you normally would..

dim rsSet as adodb.recordset
..
..
..
rsset = xDll.GeteAuthorInfo("12")




Avatar of erot

ASKER

To twol!!!!
I did what you said but when I try to run the VB-EXE file...the procedure that actually makes a call to the DLL on the SErver I get the following error:

Run time error '463'.
Class not registered on local machine

erot
Avatar of erot

ASKER

to brsltd   !!

I did what you said but:
When I try to export I get the following error message after hitting the Export buttong in the Export dialog box:

An error occured accessing components in the system package on this computer.
Error code was 80110422. Make sure that:
Microsoft Transaction server is installed correctly.
If you have set a spesific identity for the system package, check that the user account and password are correct, and user is a member of the local NT Administrators group.

????

erot
 
 
That error can be caused if there is security set on the system package (How MTS controls itself).  

Have a look in MTS, under Computers\My Computer\Packages Installed     you should see the system package.

Click on it, then right click on it and select properties.  Go to the Identity tab and see what the settings are.  If "This User" is checked, make sure the ID and password are correct; otherwise select the "Interactive User" checkbox.  It's also probably worthwhile making sure the "Enable Authorisation Checking" checkbox is NOT checked on the Security tab.

If you're still getting that error, have a word with your support guys as it could require MTS to be reinstalled.

Hope that helps.
That error can be caused if there is security set on the system package (How MTS controls itself).  

Have a look in MTS, under Computers\My Computer\Packages Installed     you should see the system package.

Click on it, then right click on it and select properties.  Go to the Identity tab and see what the settings are.  If "This User" is checked, make sure the ID and password are correct; otherwise select the "Interactive User" checkbox.  It's also probably worthwhile making sure the "Enable Authorisation Checking" checkbox is NOT checked on the Security tab.

If you're still getting that error, have a word with your support guys as it could require MTS to be reinstalled.

Hope that helps.
Avatar of erot

ASKER

Now I manage to export but:

When I Export I choose to export to
a:\PubsMTS-Client

Then the Export facility creates two files:
PubsMTS-Client.MSI
PubsMTS-Client.MSI.cab

There in no subdirs created at the Package in the MTS called /Clients...

No exe-file is created... ???
Any suggestions...
Avatar of erot

ASKER

Forgot to tell that if I extract the cab-file then I get two files: one .MSI file and one .INF file...

the .inf file contains:
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[Setup Hooks]
hook1=hook1
[hook1]
run=msiexec.exe /i "%EXTRACT_DIR%\PubsMTS-Client.MSI"

This really does not tell me much
Avatar of erot

ASKER

I have now finally made it work.
I did manage to export the package, but I have not found out how to install the exported package on the client!!!

However... the method described by twol
did work but????

At first I got the error message that the Class was not registered on the local machine...

Then i used regsvr32.exe to register the DLL on the remote server. Which worked... I can also see that the DLL is running through the MTS because the round Icon with the green cross is spinning....

BUT is this the right way to
A) Register the DLL with regsvr32.exe ??
B) To use DCOM???
Will this handle multiple simultanous users using the same DLL????

Erot
ASKER CERTIFIED SOLUTION
Avatar of brsltd
brsltd

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm glad you got it to work...A good book that will help round out your knowledge of both COM and some MTS is VB Comm by Thomas Lewis.
I'm glad you got it to work...A good book that will help round out your knowledge of both COM and some MTS is VB Comm by Thomas Lewis.
Avatar of erot

ASKER

Thanks a lot ....
I wish I could split the points in two and give them to both of you....

Since BRLSTD was first out and his answer worked then he gets the points..