473,396 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

get base com type name

hi,

in a c# app i dynamically loaded a com type library:
AssemblyBuilder ab = tlc.ConvertTypeLibToAssembly(typeLib, "temp.dll", 0,
ceh, null, null, null, null);

while loading .net raises an event becauce it found a external reference.

this is my event handler: (it's in a class derived from
ITypeLibImporterNotifySink)

public Assembly ResolveRef( object typeLib )
{
TypeLibConverter tlc = new TypeLibConverter();
ConversionEventHandler ceh = new ConversionEventHandler();
AssemblyBuilder ab = tlc.ConvertTypeLibToAssembly(typeLib, "temp.dll", 0,
ceh, null, null, null, null);
return ab;
}

the external reference is also a native com library.

is there a way to get the name of this loaded library by using the parameter
typeLib?

For example:
I wrote a com lib in vb6 which uses Scripting.FileSystemObject as return
datatype of a method. then i dynamically load my vb6-com-lib and the app
raises the event. in this moment typeLib points to
"Scripting.FileSystemObject". I somehow need to get the name (here:
"Scripting") of the loaded lib...

thank you!

ingo
Nov 17 '05 #1
3 1458
is there a way to get the name of this loaded library by using the parameter
typeLib?


Cast it to UCOMITypeLib and go from there (you can get the typelib
name with GetDocumentation(-1, out name, ...)).

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 17 '05 #2
thats it! thank you!

"Mattias Sjögren" <ma********************@mvps.org> schrieb im Newsbeitrag
news:eV**************@TK2MSFTNGP09.phx.gbl...
is there a way to get the name of this loaded library by using the
parameter
typeLib?


Cast it to UCOMITypeLib and go from there (you can get the typelib
name with GetDocumentation(-1, out name, ...)).

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nov 17 '05 #3
thats it! thank you!

"Mattias Sjögren" <ma********************@mvps.org> schrieb im Newsbeitrag
news:eV**************@TK2MSFTNGP09.phx.gbl...
is there a way to get the name of this loaded library by using the
parameter
typeLib?


Cast it to UCOMITypeLib and go from there (you can get the typelib
name with GetDocumentation(-1, out name, ...)).

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Deep Purple | last post by:
I started with the following error... ------------------------------------------------------- An error occured while loading the schema with TargetNamespace 'http://www.w3.org/2001/XMLSchema'...
5
by: Andy | last post by:
Hi all, I have a site with the following architecture: Common.Web.dll - Contains a CommonPageBase class which inherits System.Web.UI.Page myadd.dll - Contains PageBase which inherits...
2
by: Urs Eichmann | last post by:
Hi using VS 2005 Beta 2, I want to define a base class for any type of entity, e.g. customer, item, order etc. The entity could have a key of type String or Integer, so I define the base class as...
11
by: anongroupaccount | last post by:
What measures should be taken to avoid this sort of thing? class Base { }; class Derived1 : public Base { private: int i, j, k;
0
by: robert | last post by:
Hi all, I'm having a hard time resolving a namespace issue in my wsdl. Here's an element that explains my question, with the full wsdl below: <definitions name="MaragatoService"...
3
by: Filimon Roukoutakis | last post by:
Dear all, assuming that through a mechanism, for example reflexion, the Derived** is known explicitly. Would it be legal (and "moral") to do this conversion by a cast (probably reinterpret would...
0
by: jam_planta | last post by:
Hi guys, Hope you can help me.I'm new in using C# and Xml Schema. I have a problem in getting the child element of the base type.. Here is the sample of my xsd file: <xs:complexType...
14
by: Jo | last post by:
Hi, Is there a generic way to access the (virtual) functions in the base class of a class? Like in: if (!this->Foo(something)) return(((Base*)this)->Foo(something)); // for a normal member...
1
by: rakeshnair | last post by:
i wrote a code in jsp to create dynamic table..the problem is i need data base connection when cursor moves from one cell to other... eg...when i enter product id in the first cell, the product name...
0
by: icesign | last post by:
I know that the selector of these elements has a scope relative to the element being declared, but maybe there is a way to get beyond bounds of this scope or maybe just a way to extend base element?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.