|
-
Apr 11th, 2001, 01:09 PM
#1
Thread Starter
Member
Hi,
I have a VB app on my machine.
And i have a COM dll (DLL name is MTransfer.dll, class in the DLL is 'SetMT.cls',method in that class is 'DebitMT')residing on another MTS machine on the network (the computer name is 'MTS-Machine').
Now i want to call the method(DebitMT) of that COM dll from the VB app on my machine.
Can i know exactly what to do to call that DLL method(DebitMT) from my machine.
And can i also know where the DLL actually runs, is it on my machine? or on the 'MTS-Machine'?
Please let me know soon,
Thanks,
Srini
-
Apr 17th, 2001, 11:15 AM
#2
The dll runs on the machine where it is physically located.
You can reference it by going to project..references and Browse. In the file name dialog box, you can type in the full UNC path and file name of the dll.
-
Apr 19th, 2001, 05:25 PM
#3
Fanatic Member
Bubba wrote:
The dll runs on the machine where it is physically located.
I have a different opinion on this. See explain below:
To call the DLL file on the MTS machine you need to do:
1. Export the package where the DLL file is located.
2. Inside the package there is a folder, "CLIENT"
3. Get the file *.EXE inside the client folder and run it on your local machine (this will register the DLL file so that your VP app can use)
4. Start your project, add a reference of the DLL to your project. Once you've done this you can use:
Code:
Dim myvariable as MTransfer.SetMT
Set myvariable = CreateObject("MTransfer.SetMT",servername)
5. The DLL return will be run on which machine depends on the "Package Activation Type": Library or Server. If it is library, then it runs on your machine, if it is server then it runs on the server. You can find out about this be clicking on your package property, go to "Activation" tab.
Hope this helps,
TheBao
-
Apr 20th, 2001, 05:47 AM
#4
That's not quite accurate TheBao
When you add the MTransfer component to the Remote Components folders of your local machine, the DLL is copied across the network to your local machine. The dll will be copied to a subdirectory with the same name as the Package on the MTS Server.
Then the local machine system registry is updated with information from the system registry on the MTS Server.
So the DLL is now physically on your local machine, and therefore runs on your local machine
Using Library or Server packages just refers to whether the package will run in the same process:(from the official propaganda)
A Library package runs in the process of the client that creates it. This option is only available for clients on the computer on which the package is being installed and configured. Note that Library packages offer no component tracking, role checking, or process isolation.
A server package runs in its own process on the local computer. Server packages support role-based security, resource sharing, process isolation, and process management (such as package tracking).
I don't know personally of anyone ever setting up an MTS package to be a library package.
-
Apr 22nd, 2001, 04:34 PM
#5
Fanatic Member
So the DLL is now physically on your local machine, and therefore runs on your local machine
Thanks bubba for clarify this!
I agree with you on the first point. However, when you make a reference to the components, you application will try to link to the package on the MTS machine.(quote: When you add the MTransfer component to the Remote Components folders of your local machine..)
If you look at the component, you'll actually see that the component is spinning. Now try this: right click on My Computer on the MMC console, select Stop MSDTC. Then try to run you application again, it'll fail. So I DLLs runs on the server.
If you have another opinion, I would be happy to hear it.
Regards,
TheBao
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|