Hi,
I am developing a DLL on VB6 and i have this issue:
To add certain functionality on it, i had to add the whole opensource
code of the VB Core Libraries (which supplies dot net like
functionality), i have removed almost every class what i dont need and
now the problem is i need to hide the rest of the classes because they
are public so you can see them on the object explorer and also they
are also exposed with intellisense. If i put them on "private" looks
like they dont see eachother.
To be honest VB6 is not my strongest tool, i use to develop on C# and
im used to have "internal" modifier to acomplish this kind of things,
on this terrain of VB6 i dont have any clue about how to archieve it.
Its really important because this DLL is intended to overwrite the
existing one (using binary compatibility) but it doesnt work because
the DLL exposes many more classes.
in other words, i need to make the classes available inside the dll
and not visible outside
please, i would appreciate a lot any help which can lead me to solve
this big problem.
thank you very much in advance!
(sorry for my english, its not my native language)
MikeD - 11 Jun 2008 15:11 GMT
> Hi,
>
[quoted text clipped - 18 lines]
> in other words, i need to make the classes available inside the dll
> and not visible outside
Make these classes Public Not Creatable. This will make them visible (exposed) outside the DLL, but ONLY code in the DLL project
itself can instantiate these particular classes.
If that is not suitable for your needs, then your only other choice is to make them Private and you'll just have to break binary
compatibility and recompile everything that uses the DLL.
And in the future, you'll find you'll get more responses if you use a meaningful subject for your post. Everybody posting a question
needs help, so saying "I really need help" is worthless. People are more likely to reply to a post when they know what it's actually
about.

Signature
Mike
Microsoft Visual Basic MVP