Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COM + COMPONENT

Status
Not open for further replies.

pilg

Programmer
Feb 16, 2001
82
GB
Could anyone tell me what a VB com+ component is and how I would go about creating one. I need the component to execute a .exe file and I also need to call the component from ASP any help will be appreciated thanks pilg!!!
 
Just browsing and saw your question...

COM+ is a feature of win 2000 and adds some extra features to a normal com component. I don't think that a com+ component will run on a machine with an older version of win than win 2000.

Jordi Reineman
 
Hi pilg,
I have got exactly the same problem and as you posted this message long ago, I wondered myself wheter you already have the answer. If yes, please tell me!
Thanx in advance,
Robert
 
If you are not using win 2000 COM + would be a DLL running in MTS (Microsoft Transaction Server).
Running one or more DLL in MTS has some advantiges (component crashes the MTS packet will keep going and sharing ADO connections).
You do not have to run the DLL in MTS you can just install the DLL, here is how you can reference the DLL from an asp page if the DLL is installed on the same computer as IIS running the asp page:

dim myDLLObject
set myDLLObject = server.createobject("myprojectname.myclassname")
myDLLObject.myPublicSubOrFunction

If the DLL is not on the computer as IIS running the asp page you should compile the DLL as DCOM (distributed com) wich means you can run the DLL from another computer. To do so you have to go to the project properties and check the Remote Server Files (in the Component tab).
You allso have to make 2 setup packages for the DLL (one for the computer running the DLL and on on the computer calling the DLL).
 
Thanx for the tip, but I still got a problem: My dll runs on the fat client (I tested it in the immediate window) but if I want to create an instance of it via ASP I get a CreateObject-Failure! What could be the reason for that? Is that a security problem (rights of anonymus user)?

Help would be appreciated,
Robert
 
Can you give me the exact number of the error?

you can use the following code:
<%
on error resume next
dim objMyObject
set objMyObject = server.createobject(&quot;projectName.ClassName&quot;)
response.write err.number & &quot;<br>&quot; & err.description
response.write &quot;<br><br><br>Done&quot;
%>
 
make sure you copy the dll to your IIS machine and then register it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top