Organizing my program in classes? And question about registry information retrieval.
-
Hi everyone, thank you to all who have helped me so far. I have a question about creating classes. I was wondering if I would keep int main() completely separate, and then have the function which retrieves the local computer name a subclass of the retrieval process. I am more or less trying to organize my program. My program is designed to retrieve information, that's it. Right now I have it working to retrieve the local computer name through a NetBIOS function. I do however want to learn how to do this through the registry. Question Number one, is it more accurate to pull the computer name from the registry or from the NetBIOS? Question Number two, can you retrieve the group policy that user is under as well? Question Number three, where can I find a good reading for retrieving information via the registry? I have looked on MSDN and did not find a registry library. Thank you in advance!
-
Hi everyone, thank you to all who have helped me so far. I have a question about creating classes. I was wondering if I would keep int main() completely separate, and then have the function which retrieves the local computer name a subclass of the retrieval process. I am more or less trying to organize my program. My program is designed to retrieve information, that's it. Right now I have it working to retrieve the local computer name through a NetBIOS function. I do however want to learn how to do this through the registry. Question Number one, is it more accurate to pull the computer name from the registry or from the NetBIOS? Question Number two, can you retrieve the group policy that user is under as well? Question Number three, where can I find a good reading for retrieving information via the registry? I have looked on MSDN and did not find a registry library. Thank you in advance!
rbwest86 wrote:
I was wondering if I would keep int main() completely separate, and then have the function which retrieves the local computer name a subclass of the retrieval process. I am more or less trying to organize my program.
What is the object in this case? What would its properties and methods be?
rbwest86 wrote:
Question Number three, where can I find a good reading for retrieving information via the registry? I have looked on MSDN and did not find a registry library.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Hi everyone, thank you to all who have helped me so far. I have a question about creating classes. I was wondering if I would keep int main() completely separate, and then have the function which retrieves the local computer name a subclass of the retrieval process. I am more or less trying to organize my program. My program is designed to retrieve information, that's it. Right now I have it working to retrieve the local computer name through a NetBIOS function. I do however want to learn how to do this through the registry. Question Number one, is it more accurate to pull the computer name from the registry or from the NetBIOS? Question Number two, can you retrieve the group policy that user is under as well? Question Number three, where can I find a good reading for retrieving information via the registry? I have looked on MSDN and did not find a registry library. Thank you in advance!
rbwest86 wrote:
I was wondering if I would keep int main() completely separate, and then have the function which retrieves the local computer name a subclass of the retrieval process. I am more or less trying to organize my program.
I can't decide for you how your program should be designed. What I can do is point out that the organization of code, largely referred to as Design, is a fairly large subject. The good news is that much is known about the subject and it is therefore a well covered topic. Covered in writing in many Books as well as articles that can be found on the internet. Specifically in terms of designing object oriented code, there are Software Design Patterns[^] that you should read about. To conclude, one should prefer to read, learn and understand the subject of Software Design as opposed to asking people in internet forums how a specific program should be designed.