basic que abt pure C++ COM Dll and ATL dll 
Author Message
 basic que abt pure C++ COM Dll and ATL dll

Hi all,

sorry if it sounds stupid but i want to know why is this behavior.
I'm learning COM and I wrote a COM dll in pure C++(without ATL and MFC).
After i compiled it successfully i wanted to test it in vb client, so i went
to project->references in VB simple exe project. As my component was not
listed in references so i browsed the .tlb file and it worked. But if i try
to chose .dll file insted of .tlb file, Visual Basic does not allow me to do
so????? however, if i create a dll file using ATL, i  can select dll file in
VB project references. why is this behavior????

Tx

--
Deepesh Dhapola
_________________________________________________
Trisoft Systems              Ph : +91-11-6846282, 92 ext: 305
www.trisoft.net              Fax:+91-11-6845268-69



Mon, 22 Sep 2003 19:37:19 GMT  
 basic que abt pure C++ COM Dll and ATL dll

Quote:
> so????? however, if i create a dll file using ATL, i  can select dll file
in
> VB project references. why is this behavior????

That is because of ATL wizard adds typelibrary to executable resource. Just
create test project and open *.rc file in text editor, there is the
following lines

.....
3 TEXTINCLUDE DISCARDABLE
BEGIN
    "1 TYPELIB ""ProjectTypeLib.tlb""\r\n"
    "\0"
END
......

1 TYPELIB "ProjectTypeLib.tlb"
....

VB can use typelibrary either from tlb or executable files.

Regards,
Vadim.



Mon, 22 Sep 2003 22:36:29 GMT  
 basic que abt pure C++ COM Dll and ATL dll
Although not widely used, you can have a type library in a stream within
a compound document too...

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:

> > so????? however, if i create a dll file using ATL, i  can select dll
file
> in
> > VB project references. why is this behavior????

> That is because of ATL wizard adds typelibrary to executable resource.
Just
> create test project and open *.rc file in text editor, there is the
> following lines

> .....
> 3 TEXTINCLUDE DISCARDABLE
> BEGIN
>     "1 TYPELIB ""ProjectTypeLib.tlb""\r\n"
>     "\0"
> END
> ......

> 1 TYPELIB "ProjectTypeLib.tlb"
> ....

> VB can use typelibrary either from tlb or executable files.

> Regards,
> Vadim.



Tue, 23 Sep 2003 04:32:31 GMT  
 basic que abt pure C++ COM Dll and ATL dll
Thanks Vadim,

I got it!! Now, can u pl help me how should i do this same thing in my C++
COM dll?

Deepesh


Quote:

> > so????? however, if i create a dll file using ATL, i  can select dll
file
> in
> > VB project references. why is this behavior????

> That is because of ATL wizard adds typelibrary to executable resource.
Just
> create test project and open *.rc file in text editor, there is the
> following lines

> .....
> 3 TEXTINCLUDE DISCARDABLE
> BEGIN
>     "1 TYPELIB ""ProjectTypeLib.tlb""\r\n"
>     "\0"
> END
> ......

> 1 TYPELIB "ProjectTypeLib.tlb"
> ....

> VB can use typelibrary either from tlb or executable files.

> Regards,
> Vadim.



Tue, 23 Sep 2003 12:26:31 GMT  
 basic que abt pure C++ COM Dll and ATL dll
Hi Deepesh,

Quote:
> I got it!! Now, can u pl help me how should i do this same thing in my C++
> COM dll?

Why don't make as ATL wizard does? Only add few lines to your *.rc file. If
you have troubles - create an empty "ATL COM AppWizard" project and look at
.rc file.

Regards,
Vadim.

Quote:

> Deepesh



> > > so????? however, if i create a dll file using ATL, i  can select dll
> file
> > in
> > > VB project references. why is this behavior????

> > That is because of ATL wizard adds typelibrary to executable resource.
> Just
> > create test project and open *.rc file in text editor, there is the
> > following lines

> > .....
> > 3 TEXTINCLUDE DISCARDABLE
> > BEGIN
> >     "1 TYPELIB ""ProjectTypeLib.tlb""\r\n"
> >     "\0"
> > END
> > ......

> > 1 TYPELIB "ProjectTypeLib.tlb"
> > ....

> > VB can use typelibrary either from tlb or executable files.

> > Regards,
> > Vadim.



Tue, 23 Sep 2003 23:35:24 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. call a VB COM dll thru a C++ COM dll from a C program

2. call a VB COM dll thru a C++ COM dll from a C program

3. Help with Visual Basic ActiveX DLL showing form within Visual C++ ATL app

4. diff b/w usual .dll and .dll developed in atl com

5. Converting Plain DLL to ATL COM based Dll

6. que abt process???

7. QUE Abt "MFC Internals"

8. Developing a pure C DLL with Visual C++ dotnet Studio

9. Developing a pure C DLL with Visual C++ dotnet Studio

10. Developing a pure C DLL with Visual C++ dotnet Studio

11. How to create a Com Dll to use it using Late Binding in Visual Basic

12. ATL COM - Passing ATL COM classes through another ATL COM class in the same app

 

 
Powered by phpBB® Forum Software