473,574 Members | 3,140 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hiding classes in a DLL

56 New Member
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(Fals e) 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 2709
Plater
7,872 Recognized Expert Expert
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
Matt Nunnally
56 New Member
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.......I f 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 .InteropService s.ComVisible(Fa lse)> set for that public class.
Dec 18 '07 #3
Plater
7,872 Recognized Expert Expert
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
2176
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 in reverse order, calculates and prints their average. => We have been told that we need to make sure that our code meets "information hiding"...
6
538
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, what's the difference between method hiding and overriding when they're both still overriding the base method. Thanks
4
4147
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 there any other differences? Thanks, Sharon.
9
4970
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 hiding saves the day. I know there exists one, I'd just like to hear about it. thanks and have a nice day.
8
2628
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 member in the base class is not required. Is it possible to mark a method in the extended class such that it does not appear in that particular...
3
6559
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 foo( char const ) {} };
14
2402
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 project/assembly). I tried with attributes: <Browsable(False), _ EditorBrowsable(EditorBrowsableState.Never), _...
11
3033
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
4839
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 signature. A class inherits publicly from this base class and redefines one of the two functions in the derived class. In that case, a derived class...
162
10134
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 prefix them with 2 underscores, but I hate prefixing my vars, I'd rather add a keyword before it. Python advertises himself as a full OOP language,...
0
7805
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8052
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7815
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5620
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5300
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3740
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2243
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1339
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1060
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.