Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello,

 

I would like to use a third party email component written for asp pages in my .net project.

 

The instructions say

 

"POP3SVG.DLL

RegKey.txt

USERREG.EXE

First, register POP3SVG.DLL. Then run USERREG.EXE. Select ASPPOP3 from

the dropdown, then enter the company name, code and key (from RegKey.txt)."

 

DoI have to do this for .net projects? We don not have to register dlls in .net right? Would a dll written for asp work with .net?

 

Thank you,

 

Burak

  • *Experts*
Posted

Yes, you can use COM components in ASP.NET - You can either:

 

Register the component and use Server.CreateObject to create the component (late-binding).

 

OR (preferredly)

 

Use Tlbimp.exe to import a COM component into a managed .NET wrapper which can be used like any other .NET component (early-binding).

Posted

Hello,

 

Thanks for the advice.

 

I ran

 

tlbimp POP3SVG.dll \out=pop3net.dll

 

it ran successfully but it looks like there is a discrepancy between two file sizes

 

POP3SVG.dll -> 243 K

 

pop3net.dll -> 8K

 

Is this normal?

 

Thank you,

 

Burak

  • *Experts*
Posted
It is just a wrapper - it still needs to call the COM DLL, but it created a DLL which has the same structure as the COM DLL. For example, if there's a method in the COM DLL like this:
Public Sub DoStuff(a As Long)
 Dim i As Integer

 For i = 0 to a
   'do a lot of stuff
 Next
End Sub

Then in the .NET wrapper it may be something like this:

Public Sub DoStuff(a As Integer)
 MyComDll.DoStuff(a)
End Sub

It doesn't turn the code into .NET managed code, it just makes a wrapper function for each function in the COM DLL.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...