Topaz Filer: if you use e-mail for business, we can save you money and decrease your risk.
VB 6 COM Convert to VB.net
Messages   Related Types
This message was discovered on microsoft.public.dotnet.languages.vb.upgrade.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Desmond Tse via .NET 247 (VIP)
GOOD ANSWER
Hi,

I have create a COM object in VB6, it work fine, but when I try to use this COM in window 2003 server (This server already install VB.net), I use Component Services to register this COM object, but when I use ASP to test, it have a error " WindowMail error '8007202b'. Automation error A referral was returned from the server. "

So I try to upgrade this COM from VB6 to VB.net, It can bulid a DLL file, but when I use Component Services to register it, it said I missing some file, I cannot see the function normally

I have try to use regsvr32 to register this DLL file, it got "MYDLL.dll was loaded, but the DllRegisterServer entry point was not found. This file can not be registered"

Any one can help me to fix this program, Many thanks!
--------------------------------
From: Desmond Tse

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>+TNv7gu5tUKpBfq5zbSRig==</Id>
Reply to this message...
Vote that this is a GOOD answer... (6 votes from other users already)
 
 
    
John Wadie
GOOD ANSWER
In the properties of the VB.NET DLL project, open Configuration Properties /
Build, and set "Register for COM Interop" to True, then add the following
line at the beginning of your code
Imports System.Runtime.InteropServices

next, add this line before your class declaration
[Guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")]
Replace the x's in the above statement with a new GUID.

After building the DLL you'll be able to register it in componet services,
no need for regsvr32.

Regards,
John Wadie

"Desmond Tse via .NET 247" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
Hi,

I have create a COM object in VB6, it work fine, but when I try to use this
COM in window 2003 server (This server already install VB.net), I use
Component Services to register this COM object, but when I use ASP to test,
it have a error " WindowMail error '8007202b'. Automation error A referral
was returned from the server. "

So I try to upgrade this COM from VB6 to VB.net, It can bulid a DLL file,
but when I use Component Services to register it, it said I missing some
file, I cannot see the function normally

I have try to use regsvr32 to register this DLL file, it got "MYDLL.dll was
loaded, but the DllRegisterServer entry point was not found. This file can
not be registered"

Any one can help me to fix this program, Many thanks!
--------------------------------
From: Desmond Tse

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>+TNv7gu5tUKpBfq5zbSRig==</Id>

Reply to this message...
Vote that this is a GOOD answer... (9 votes from other users already)
 
 
    
Bobby Agonoy
(Type your message here)
Where do you get this GUID from? Can it be anything?
--------------------------------
From: Bobby Agonoy
Reply to this message...
Vote that this is a GOOD answer...
 
 
 




Ad
BootFX
Reliable and powerful .NET application framework.
Recession Busting Bespoke Software
Get through the recession by investing in bespoke software to decrease costs and create commercial opportunities.
Other DN247 Network Sites
.NET 247
SQL Server Wins
Old Skool Developer
 
Copyright © AMX Software Ltd 2008-2009. Portions copyright © Matthew Baxter-Reynolds 2001-2009. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - .NET 247 is a member of the DN247 Network - 4.0.30129.1734