Re: Making Type Library for normal Windows DLL (not a COM server)

Tech-Archive recommends: Fix windows errors by optimizing your registry



in VB , we can add reference to a type library only if it is
registered. Is there a way we can register a type library for a normal
DLL.

You can register any type library with regtlib.exe. However, according
to the article, it is not necessary to register. On the References
dialog in VB IDE there should be a Browse button that allows you to just
navigate to your TLB file.
-- in VB I could not see my type lib in the object browser. I tried to
add reference to it and the error message specifically says that " you
can not add reference. Please make sure that the file is a valid
assembly or a COM component"

is type library specific to COM only and we can not take advantage of
typelib for a normal DLL.

Well, according to the article, you can use TLB for a C-style API - in
VB. I haven't tried it myself, but I have no reason not to believe it.
But again, you _cannot_, I repeat _cannot_, use the same technique in
C++ client. You should use import library. Why are you so opposed to the
idea?
-- I tried it step wise and I am doing it for couple of days now but I
could not get a way to create a type library and then add reference to
it from a VB code.

we have a large VB application and now my task is to create a typelib
to an existing C++ DLL so that we do not have to use declare statements
in our VB code. This article is the reason that I am attempting to do
it but I guess there is something missing from the article.

I will appreciate If you can provide the misssing link. You can try it
in your machine . It is easy to implement.
-thanks
abhinaw sharma
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925

.


Quantcast