UtilityInterface Namespace Reference

Functions

UtilExport const MCHARGetRegistryKeyBase ()
 Returns the base product registry key: "SOFTWARE\<Company Name>\<Product Name>\<version>". More...
 
UtilExport const MCHARGetRegistryCompanyBase ()
 Returns the base company registry key: "SOFTWARE\<Company Name>". More...
 
UtilExport const MCHARGetRegistrySoftwareBase ()
 Returns the software base (i.e. SOFTWARE - should be static from release to release.) More...
 
UtilExport const MCHARGetCompanyName ()
 Returns the company name (i.e. Autodesk). Mainly for branding purposes. More...
 
UtilExport const MCHARGetProductName ()
 Returns the product name (i.e. 3dsmax). More...
 
UtilExport const MCHARGetCurrentVersion ()
 Returns the current release-number (major, minor release: #.#). More...
 
UtilExport bool GetBoolEnvironmentVariable (const MCHAR *pEnvVarName, bool defaultVal)
 Returns the true/false value of an environment variable. More...
 
UtilExport void DisplayOutOfMemoryWarning ()
 Display a warning telling the user the application is out of memory. More...
 
UtilExport bool DisplayOutOfMemoryWarning (const MCHAR *message)
 Displays a warning telling the user the application is out of memory. More...
 

Function Documentation

UtilExport const MCHAR* UtilityInterface::GetRegistryKeyBase ( )

Returns the base product registry key: "SOFTWARE\<Company Name>\<Product Name>\<version>".

Returns the base registry key. The application uses this key as the base for storing registry settings. A plugin can choose to store registry settings under the base (preferably in a subkey group), but likely will want store its registry settings under its own company root. Combines calls to GetRegistrySoftwareBase(), GetCompanyName(), GetProductName() and GetVersion(). Note: Tailing backslash is not appended.

Returns
base-key in this format: "SOFTWARE\<Company Name>\<Product Name>\<version>"
UtilExport const MCHAR* UtilityInterface::GetRegistryCompanyBase ( )

Returns the base company registry key: "SOFTWARE\<Company Name>".

Returns the base company registry key. This key in general should be used to store registry key settings. Combines calls to GetRegistrySoftwareBase(), GetCompanyName(). This is useful when we need to access registry settings for other Autodesk applications. Note: Tailing backslash is not appended.

Returns
base-key in this format: "SOFTWARE\<Company Name>"
UtilExport const MCHAR* UtilityInterface::GetRegistrySoftwareBase ( )

Returns the software base (i.e. SOFTWARE - should be static from release to release.)

Returns the software base (i.e. SOFTWARE - should be static from release to release.)

Returns
Returns the software base (i.e. SOFTWARE - should be static from release to release.)
UtilExport const MCHAR* UtilityInterface::GetCompanyName ( )

Returns the company name (i.e. Autodesk). Mainly for branding purposes.

Returns
Returns the company name (i.e. Autodesk). Mainly for branding purposes.
UtilExport const MCHAR* UtilityInterface::GetProductName ( )

Returns the product name (i.e. 3dsmax).

Returns
Returns the product name (i.e. 3dsmax).
UtilExport const MCHAR* UtilityInterface::GetCurrentVersion ( )

Returns the current release-number (major, minor release: #.#).

Returns
Returns the current release-number (major, minor release: #.#)
UtilExport bool UtilityInterface::GetBoolEnvironmentVariable ( const MCHAR pEnvVarName,
bool  defaultVal 
)

Returns the true/false value of an environment variable.

Returns the true/false value of a specified environment variable, or the specified default value if the environment variable does not exist or the first character of its value is not one of "yYtT1" (true) or "nNfF0" (false)

Parameters
[in]pEnvVarNamePointer to a null-terminated string that specifies the name of the environment variable
[in]defaultValThe default value used if the environment variable is not present, or doesn't contain a valid value
Returns
Returns the true/false value of the environment variable or default
UtilExport void UtilityInterface::DisplayOutOfMemoryWarning ( )

Display a warning telling the user the application is out of memory.

UtilExport bool UtilityInterface::DisplayOutOfMemoryWarning ( const MCHAR message)

Displays a warning telling the user the application is out of memory.

Overloaded method that displays an extra message, and returns a value indicating if the user doesn't want to see this message again.

Parameters
message- An additional message
Returns
- true if the user checked that they don't want to show this warning, false otherwise.