473,387 Members | 1,318 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,387 software developers and data experts.

hiding classes in a DLL

I'm developing a DLL for third party use. I have one class (Main.vb) that I want to expose to the developer. There are several underlying classes that I do not want to expose to the developer, but the main class needs. How do I make sure that those classes are not exposed when they call the dll? I set ComVisible(False) on the classes I don't want to expose, but it still shows up in intellisence and I can access it.
Dec 17 '07 #1
3 2694
Plater
7,872 Expert 4TB
declare the classes inside the main class.

Such as:
Expand|Select|Wrap|Line Numbers
  1. public mymainclass
  2. {
  3.    //some constructor
  4.    //some functions
  5.    private class myprivlass1
  6.    {
  7.       //some constructor
  8.       //some functions
  9.    }
  10. }
  11.  
Also, I forget the command, but there's a way to hide functions from the intellisense too.
Dec 17 '07 #2
Thanks for the help. I just declared those classes "Friend" and it worked just fine.

Now I have another issue. The class that I do have exposed.......If I reference the compiled DLL (not the DLL source project file) in another project and set a break point to some exposed function that I call. When I step into that function (F8), it actually goes into the source code of the DLL. It should have steped over that function while the DLL performed it. Whats up with that? I don't want the users of this DLL to be able to see the source code of that class.

Is this really going to happen when I deploy that DLL, or is it because I have the source code on the same machine as my sample project?

I have <System.Runtime.InteropServices.ComVisible(False )> set for that public class.
Dec 18 '07 #3
Plater
7,872 Expert 4TB
I noticed that on my own programs. It is supposibly based on if your build settings produce debug code.
However, even without debug code it still opened up my source file.

The important thing to remember is that it IS opening up the source file, not re-creating the source. So, no source file, no code for it to open.
Dec 19 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Amir S. | last post by:
Hi, I'm a newbie to C++ (2 weeks into the course). We were given this assignment to write some code that reads a set of integers (grades) from a file (filename passed by console), outputs them...
6
by: harrylmh | last post by:
Hi, I'm learning C# and I just don't quite understand the need for polymorphism. why do we need to use it? how does a base class variable holding a derived class instance do any good? Also,...
4
by: Sharon Tal | last post by:
Hi all. I am trying to figure out the differences between overriding and hiding a method name. The only difference i can see, is that with name hiding i can change the method access level. Are...
9
by: bob | last post by:
Hi, I know there exists a good reason why the designers of c++ decided that function hiding should exist. But I don't know why. Can anybody provide a good reason/example of a case where function...
8
by: SpotNet | last post by:
Hello NewsGroup, I have a base class and six classes that inherit from this base class. All members in the base class are used in it's extended classes except, in one of the extended class one...
3
by: Nicolas Castagne | last post by:
Hi all, I have been wondering for a while why function hiding (in a derived class) exists in C++, e.g. why when writing class Base { void foo( int ) {} }; class Derived: public Base { void...
14
by: Dom | last post by:
Hi all I'm developing a control, and I need to hide some properties to the user. For example, suppose I need Text property to be completely inacessible (from a Form/Code that is into another...
11
by: Aflj | last post by:
This code won't compile (two compilers tried, gcc and VC++, both of recent versions, but I don't remember them exactly): class C1 { public: void M1(int i) {} }; class C2: public C1
2
by: developer.new | last post by:
Hi I have a question regarding this concept I learned about recently: Name Hiding. Here's what I've come across: There is a base class with two functions with the same name but different...
162
by: Sh4wn | last post by:
Hi, first, python is one of my fav languages, and i'll definitely keep developing with it. But, there's 1 one thing what I -really- miss: data hiding. I know member vars are private when you...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.