ATL Service instantiating a VB com object 
Author Message
 ATL Service instantiating a VB com object

What code samples are there. Or just what should i search msdn for in order
to find out how to do it. I just need to instantiate the activex dll then
call one function and get back a long value.

thanks
jc



Mon, 21 Oct 2002 03:00:00 GMT  
 ATL Service instantiating a VB com object
Quote:
> What code samples are there. Or just what should i search msdn for in
order
> to find out how to do it. I just need to instantiate the activex dll then
> call one function and get back a long value.

> thanks
> jc

Use #import directive on your dll path i.e

#import "mydll.dll"

then you can use the compiler generated class wrappers to instantiate your
object and make the call i.e.

mydllnamespace::myobjectPtr p(__uuidof(mydllnamespace::myobject));
long l = p->mymethod(...);

Check out the docs on #import, there are a number of complier options you
shuold be aware of;



Mon, 21 Oct 2002 03:00:00 GMT  
 ATL Service instantiating a VB com object
Hi, thanks for the info, i am looking into it. Initially I don't think that
it will work, because although I know the methods of the dll I don't know
the name. This dll will be called something different for each instance, i
need to instantiate it based on the prog id. Aren't there other commands
that let me instantiate activex dll's just based on the prog id.

jc


Quote:
> > What code samples are there. Or just what should i search msdn for in
> order
> > to find out how to do it. I just need to instantiate the activex dll
then
> > call one function and get back a long value.

> > thanks
> > jc

> Use #import directive on your dll path i.e

> #import "mydll.dll"

> then you can use the compiler generated class wrappers to instantiate your
> object and make the call i.e.

> mydllnamespace::myobjectPtr p(__uuidof(mydllnamespace::myobject));
> long l = p->mymethod(...);

> Check out the docs on #import, there are a number of complier options you
> shuold be aware of;



Fri, 25 Oct 2002 03:00:00 GMT  
 ATL Service instantiating a VB com object
JUST THIS ABOUT IT.

it's just like in VB with the Object Browser -
u don't see only one class definitions, but all classes defined in a dll.



Sat, 09 Nov 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Instantiating com object in atl service

2. Problem debugging VB COM object from a ATL-Service

3. Connection points between a VB COM-based and ATL COM-based (NT Service) MTA

4. ATL: instantiating a COM object within its own implementation DLL

5. ATL COM object can't get arrays from VB in VB/VC6

6. ATL COM object can't get arrays from VB in VB/VC6

7. Problem with scripting context when using VB com object inside VC com object

8. ATL Service with COM Object called by ISAPI Extension

9. ATL COM object in VB w/DAO runs out of Stack Space

10. Passing Arrays Between VB and ATL COM object

11. passing COM object pointers to another COM object in ATL

12. VB COM object in ATL

 

 
Powered by phpBB® Forum Software