Renaming classes, handling header guard GUIDs
Posted on 2004-09-02
When I create a new class in VC++ 6.0, an MFC class for example, Visual Studio will generate a header and implementation file, and within that header is a header guard, something along the lines of
Anyway - say I want to later rename the class, either before or after it is actually in use elsewhere in the codebase. I would first change the names of the .H and .CPP files, and change all instances of CMyClassName throughout the code to CMyNewName as well as all include references etc. What, if anything do I have to do to the header guard, specifically, the GUID portion of it? Is that value installed in the registry or anything and further used by the compiler, or is purely a long random number used only to insure a unique identifier?