Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / January 2005



Tip: Looking for answers? Try searching our database.

Instantiating a COM Object in VB6

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Emanuel Haisiuc - 21 Jan 2005 09:13 GMT
How can a COM Object be instantiated outside the addresses space of the
calling process (the VB6 program)? In C it can be done passing the
CLSCTX_LOCAL_SERVER attribute to the calling of the CoCreateInstance function.

Thank you!

Emanuel Haisiuc
Ralph - 21 Jan 2005 13:27 GMT
> How can a COM Object be instantiated outside the addresses space of the
> calling process (the VB6 program)? In C it can be done passing the
[quoted text clipped - 3 lines]
>
> Emanuel Haisiuc

From the docs...

CreateObject( class, [server_name] )
...
   server_name:   Optional; Variant (String) The name of the network server
where the object will be created.
                           If server_name is an empty string(""), the local
machine is used.
...

You can also use dcommgr to setup your component as available on a server.

hth
-ralph
MikeD - 21 Jan 2005 13:31 GMT
> How can a COM Object be instantiated outside the addresses space of the
> calling process (the VB6 program)? In C it can be done passing the
> CLSCTX_LOCAL_SERVER attribute to the calling of the CoCreateInstance function.

The object has to be part of an ActiveX EXE.

Signature

Mike
Microsoft MVP Visual Basic

Tony Proctor - 21 Jan 2005 14:43 GMT
...or register it with COM+

   Tony Proctor

> > How can a COM Object be instantiated outside the addresses space of the
> > calling process (the VB6 program)? In C it can be done passing the
> > CLSCTX_LOCAL_SERVER attribute to the calling of the CoCreateInstance
> function.
>
> The object has to be part of an ActiveX EXE.
Ralph - 21 Jan 2005 15:42 GMT
> ...or register it with COM+
>
>     Tony Proctor
>
> <snipped>

Yeah! What did I say? "DCOMMgr"?

Well at least I am finally remembering to write "05" on my checks. Some
things just take a little longer to 'take'. <g>

-ralph
Tony Proctor - 21 Jan 2005 15:48 GMT
Just leave all the fields blank Ralph and I'll fill them in here for you <g>

       Tony Proctor

> > ...or register it with COM+
> >
[quoted text clipped - 8 lines]
>
> -ralph
 
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



©2009 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.