1. My type library (MyLib.tlb) has a couple of COM components. The library
is
built using MkTypeLib check box off as I dont want the interface definitions
necessarily inside library block.
2. My own test client for MyLib imports the tlb as follows
#import "MyLib.tlb" no_namespace raw_interfaces_only named_guids
> Note : tlb path is locatable to the source file and project.
3. I get following warnings. The warning level being 3 and no. being C4192
for all.
\Main.cpp(13) : warning C4192: automatically excluding 'IUnknown' while
importing type library '\MyLib.tlb'
\Main.cpp(13) : warning C4192: automatically excluding '_GUID' while
importing type library '\MyLib.tlb'
\Main.cpp(13) : warning C4192: automatically excluding 'IUnknown' while
importing type library '\MyLib.tlb'
\Main.cpp(13) : warning C4192: automatically excluding '_LARGE_INTEGER'
while importing type library '\MyLib.tlb'
\Main.cpp(13) : warning C4192: automatically excluding '_ULARGE_INTEGER'
while importing type library '\MyLib.tlb'
\Main.cpp(13) : warning C4192: automatically excluding 'tagSTATSTG' while
importing type library '\MyLib.tlb'
\Main.cpp(13) : warning C4192: automatically excluding '_FILETIME' while
importing type library '\MyLib'
<have manually removed long path names>
4. I have already used acad and solidworks typelibraries in my client code
where the similiar inclusion of tlbs dont give rise to these warnings.
5. Hence I used OLE View tool to find whats inside the tlbs and found that
MyLib had the definitions of IUnknown, GUIDs etc... whereas the acad.tlb did
not have any.
6. My question is how to tell MIDL not to put the definitions of the
standard interfaces (IUnknown, IDispatch etc...) and types (GUIDs etc...)
into the resultant type library and avoid getting these warnings at the
client end. I do not want to turn off the warning using pragma directive or
setting warning level to something below 3 (2, 1 etc...).
Regards,
Abhijit Savarkar
-------------------------------------------------
abhi...@geometricsoftware.com
http://www.geometricsoftware.com
-------------------------------------------------