paulburns
asked on
Undocumented MFC Functions
Browsing through the source for CWinApp i came across two undocumented functions... GetProfileBinary and WriteProfileBinary. Their purpose seems to be to allow reading/writing of arbitrary binary data to the registry, similar to the documented functions GetProfileInt/WriteProfile Int and GetProfileString/WriteProf ileString.
Does anyone know why they are not documented? Does this mean i shouldn't use them in my own applications?
Does anyone know why they are not documented? Does this mean i shouldn't use them in my own applications?
MFC contains several undocumented features / functions, the reason for lack of documentation known only to Microsoft, for the most part. I believe I have seen books, however, on undocumented MFC stuff... it may be worth your while to get one to satisfy your curiosity. I would say that if the functions work as you expect them to, use them.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If it is a protected function, don't use it. (it is probably only for implementation and may not exist in a future version)
If it is a function in a class that isn't documented, don't use it. (likewise)
BUT: if it gets you out of troble and solves a problem for you, then use it and DOCUMENT that you are 'cheating' in your code.
If it is a function in a class that isn't documented, don't use it. (likewise)
BUT: if it gets you out of troble and solves a problem for you, then use it and DOCUMENT that you are 'cheating' in your code.
ASKER
Thanks everyone for the advice. Since the specific functions mentioned are public and in a well documented class i'll go ahead and use them. They definitely will save me a lot of hassle.