473,398 Members | 2,343 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,398 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 1459
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.