Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / September 2003

Tip: Looking for answers? Try searching our database.

CreateObject failed with VB.Net, but succeded with VB6

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dmitry Zhiltsov - 15 Sep 2003 07:49 GMT
There some problems with creating object our COM server
application. Application works fine, if we use VB6 ( or
any old tool supported automation ) for creating client
application, but the same code failed in vb.net with very
strange error message: your COM server does not support
IDispatch or ( IMyApp ), depending on object requested (
dim a as Object or dim a as MyApp ). Have somebody any
idea of such vb.net behaviour?
Phil Wilson - 16 Sep 2003 18:20 GMT
VB6 isn't an "automation only" interface - it will early-bind and use vtables
depending on how your code accesses the COM object, so it may well be true that
you don't have IDispatch.

I sssume you're exposing a .NET class as a COM interface, so post the heading
and attributes for your .NET class, and the Interface too if you're using one.
Signature

Phil Wilson [MVP Windows Installer]
----

> There some problems with creating object our COM server
> application. Application works fine, if we use VB6 ( or
[quoted text clipped - 4 lines]
> dim a as Object or dim a as MyApp ). Have somebody any
> idea of such vb.net behaviour?
Dmitry Zhiltsov - 17 Sep 2003 10:16 GMT
Thanks for help. I found the difference VB.Net object creation sequence
from vb6 one and correct mistake in our server code. VB6 hold reference
on class factory much longer then VB.Net( VB.Net release class factory
immediatly after use ). We had not 0 reference count on our object in
some moment after CreateInstance call, but VB.6 worked fine, because it
held reference to class factory. The same is not true with .NET, so, our
server sent WM_QUIT himself just after VB.NET release class factory, and
proxi object in vb.net had invalid reference from this moment. Thank you
once more.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.