Visual Studio 6.0

#pragma component( browser, { on | off }[, references [, name ]] )

#pragma component( minrebuild, on | off )

Controls the collecting of browse information or dependency information from within source files.


You can turn collecting on or off, and you can specify particular names to be ignored as information is collected.

Using on or off controls the collection of browse information from the pragma forward. For example:

#pragma component(browser, off)

stops the compiler from collecting browse information.

Note   To turn on the collecting of browse information with this pragma, browse information must first be enabled from the Project Settings dialog box or the command line.

The references option can be used with or without the name argument. Using references without name turns on or off the collecting of references (other browse information continues to be collected, however). For example:

#pragma component(browser, off, references)

stops the compiler from collecting reference information.

Using references with name and off prevents references to name from appearing in the browse information window. Use this syntax to ignore names and types you are not interested in and to reduce the size of browse information files. For example:

#pragma component(browser, off, references, DWORD)

ignores references to DWORD from that point forward. You can turn collecting of references to DWORD back on by using on:

#pragma component(browser, on, references, DWORD)

This is the only way to resume collecting references to name; you must explicitly turn on any name that you have turned off.

To prevent the preprocessor from expanding name (such as expanding NULL to 0), put quotes around it:

#pragma component(browser, off, references, "NULL")

Minimal Rebuild

The Visual C++ minimal rebuild feature requires that the compiler create and store C++ class dependency information, which takes disk space. To save disk space, you can use #pragma component( minrebuild, off ) whenever you don't need to collect dependency information, for instance, in unchanging header files. Insert #pragma component(minrebuild, on) after unchanging classes to turn dependency collection back on.

For more information, see the Enable Minimal Rebuild (/Gm) compiler option.