Reputation: 737
I have a Classic ASP web site that uses a VB6 COM object.
I want to create a new version of the COM object using .NET instead of VB6.
Upvotes: 1
Views: 1549
Reputation: 737
[01]
Start Visual Studio 2015 (run as admin).
Create a new "Class Library" project.
Name it: "DotNetCom"
[02]
Add a new "COM Class" item.
Name it: "HelloCOM.vb"
[03]
Add a public function to "HelloCOM.vb".
For example:
Public Function Hello() As String
Return "Hello there!"
End Function
[04]
Open "MyProject".
Go to "Compile".
Select "Target CPU: x86".
[05]
Build the "DotNetCom.dll".
[06]
Start Component Services.
Add a new COM+ application.
Name it: "DotNetCom".
[07]
Open the "DotNetCom" properties.
Go to the "Security Tab".
UNCHECK "Enforce access checks for this application".
[08]
Add a new component.
Select "DotNetComTest.tlb" (do NOT select "DotNetComTest.dll").
[09]
Use the COM object from the Classic ASP page.
<%
Dim HelloCOM
Set HelloCOM = Server.CreateObject("DotNetCom.HelloCOM")
Response.Write HelloCom.Hello
%>
Upvotes: 1