Urgent ! InteropServices.COMException error
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngmigrate' list.
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.

Koh Yuen Lin, App Spec, SCS-MACH30
Hi,

I'm using VB.Net Released version.

I like to call a VB6 COM from a Web Application. I've Added Reference to my
application. However, when it's trying to call a function in VB6 COM, it
will give me the following error

System.Runtime.InteropServices.COMException: Object variable or With block
variable not set

What does this mean? I've tried tlbimp but it i still get the same error
message

Pls advise. Thanks

YL
Reply to this message...
 
    
G. Andrew Duthie (VIP)
This is a common COM error which usually indicates that you've declared
an object variable, but not instantiated it before making a method call
or referencing a property. Can you post the code that you're using to
call the VB6 COM object? That might help us determine if there's a
problem with the code.=20

The other thing to check in the meantime is whether the VB6 COM object
is properly registered. Can you call the COM object from VB6?

Finally, have you created a Runtime-callable wrapper (RCW) class for the
COM object by running tlbimp.exe against it?

Regards,

--
G. Andrew Duthie
Graymad Enterprises, Inc.
http://www.graymad.com
Click here to reveal e-mail address
Author, ASP.NET Step By Step
http://www.amazon.com/exec/obidos/ASIN/0735612870/

[Original message clipped]

Reply to this message...
 
    
Martin Brock
Hi,

I'm using VB.Net Released version.

I like to call a VB6 COM from a Web Application. I've Added Reference to my
application. However, when it's trying to call a function in VB6 COM, it
will give me the following error

System.Runtime.InteropServices.COMException: Object variable or With block
variable not set

What does this mean? I've tried tlbimp but it i still get the same error
message

Pls advise. Thanks

YL
Reply to this message...
 
 
System.Runtime.InteropServices.COMException




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com