Namespaces | Functions

systemutilities.h File Reference

#include "strbasic.h"
#include "strclass.h"

Go to the source code of this file.

Namespaces

namespace   MaxSDK
namespace   MaxSDK::Util

Defines

AppPaths

These are the ID's of max's system paths

#define  APP_MAP_DIR   -1
  System directory that points to <max data>/maps.
#define  APP_FOLIAGE_DIR   -2
#define  APP_XREF_DIR   -3
#define  APP_PLUGIN_INI_DIR   -4
#define  APP_STDPLUGS_DIR   -5
#define  APP_PLUGINS_DIR   -6
#define  APP_FILELINK_DIR   -7
#define  APP_CATALOGS_DIR   -8
#define  APP_CUI_SCRIPTS_DIR   -9
#define  APP_INT_OFFSET   0
#define  APP_CUI_DIR   -10 + APP_INT_OFFSET
#define  APP_FX_DIR   -11 + APP_INT_OFFSET
  Returns the hardware shader directory set in Configure Paths.
#define  APP_CUI_WRITE_DIR   -12 + APP_INT_OFFSET
#define  APP_MARKET_DEF_WRITE_DIR   -13 + APP_INT_OFFSET
#define  APP_LAST_SPEC_DIR   -13 + APP_INT_OFFSET

Functions

UtilExport bool  IsDebugging ()
  Returns true if 3ds Max is running under a debbuger.
UtilExport int  NumberOfProcessors ()
  Returns the number of processors in the system.
UtilExport bool  IsWindows9x ()
  Returns true if the current operating system is Windows 9x?, otherwise false.
UtilExport bool  IsWindows98or2000 ()
  Returns true if the current operating system is Windows 98 or 2000, otherwise false.
UtilExport int  GetScreenWidth ()
  Returns the width of the screen (including multiple monitors)
UtilExport int  GetScreenHeight ()
  Returns the height of the screen (including multiple monitors)
UtilExport bool  IsGetACPAsian ()
  Returns true if the current ANSI codepage is for an asian language.
UtilExport WORD  GetLanguageID ()
  Returns the identifier of the language used by 3ds Max.
UtilExport const MCHAR *  GetLanguageTLA ()
  Returns the "tree letter acronym" (TLA) of the language used by 3ds Max.
UtilExport bool  CopyToClipBoard (const MCHAR *text, HWND hwnd)
  copies a string to the system wide clipboard
UtilExport HRESULT  UtilGetFolderPath (HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath)
UtilExport bool  IsUsingProfileDirectories ()
  Returns a value indicating whether the application is configured to use User Profiles or not.
UtilExport bool  IsUsingRoamingProfiles ()
  Returns a value indicating whether the application is configured to use romaing User Profiles or not.
UtilExport bool  GetSpecDir (int index, const MCHAR *dirName, MCHAR *buf)
  This function is used to convert a path relative to the 3ds max install to an absolute path.
UtilExport bool  TryCSIDLDir (int csidl, const MCHAR *dirName, MCHAR *buf)
  This is a helper for creating standard windows CSIDL directories.
UtilExport BOOL  IsSSE ()
UtilExport bool  ScanDirectoryTree (const MCHAR *treeroot, const MCHAR *filename, MSTR &targetpath)

Define Documentation

#define APP_MAP_DIR   -1

System directory that points to <max data>/maps.

Definition at line 95 of file systemutilities.h.

#define APP_FOLIAGE_DIR   -2

Definition at line 96 of file systemutilities.h.

#define APP_XREF_DIR   -3

Definition at line 97 of file systemutilities.h.

#define APP_PLUGIN_INI_DIR   -4

Definition at line 98 of file systemutilities.h.

#define APP_STDPLUGS_DIR   -5

Definition at line 99 of file systemutilities.h.

#define APP_PLUGINS_DIR   -6

Definition at line 100 of file systemutilities.h.

#define APP_FILELINK_DIR   -7

Definition at line 101 of file systemutilities.h.

#define APP_CATALOGS_DIR   -8

Definition at line 102 of file systemutilities.h.

#define APP_CUI_SCRIPTS_DIR   -9

Definition at line 103 of file systemutilities.h.

#define APP_INT_OFFSET   0

Definition at line 109 of file systemutilities.h.

#define APP_CUI_DIR   -10 + APP_INT_OFFSET

Definition at line 111 of file systemutilities.h.

#define APP_FX_DIR   -11 + APP_INT_OFFSET

Returns the hardware shader directory set in Configure Paths.

Definition at line 112 of file systemutilities.h.

#define APP_CUI_WRITE_DIR   -12 + APP_INT_OFFSET

Definition at line 113 of file systemutilities.h.

#define APP_MARKET_DEF_WRITE_DIR   -13 + APP_INT_OFFSET

Definition at line 114 of file systemutilities.h.

#define APP_LAST_SPEC_DIR   -13 + APP_INT_OFFSET

Definition at line 115 of file systemutilities.h.


Function Documentation

UtilExport bool IsDebugging ( )

Returns true if 3ds Max is running under a debbuger.

UtilExport int NumberOfProcessors ( )

Returns the number of processors in the system.

UtilExport bool IsWindows9x ( )

Returns true if the current operating system is Windows 9x?, otherwise false.

UtilExport bool IsWindows98or2000 ( )

Returns true if the current operating system is Windows 98 or 2000, otherwise false.

UtilExport int GetScreenWidth ( )

Returns the width of the screen (including multiple monitors)

UtilExport int GetScreenHeight ( )

Returns the height of the screen (including multiple monitors)

UtilExport bool IsGetACPAsian ( )

Returns true if the current ANSI codepage is for an asian language.

UtilExport HRESULT UtilGetFolderPath ( HWND  hwndOwner,
int  nFolder,
HANDLE  hToken,
DWORD  dwFlags,
LPTSTR  pszPath 
)
UtilExport bool IsUsingProfileDirectories ( )

Returns a value indicating whether the application is configured to use User Profiles or not.

The application can be configured to use User Profiles.

Returns:
true if the application uses User Profile directories
UtilExport bool IsUsingRoamingProfiles ( )

Returns a value indicating whether the application is configured to use romaing User Profiles or not.

The application can be configured to use roaming User Profiles. This value is dependent on whether the application uses User Profiles at all. Even if this returns true, if IsUsingProfileDirectories() returns false, then the application will default to the legacy path configuration locations under the application root install directory.

Returns:
true if the application uses User Profile directories
UtilExport bool GetSpecDir ( int  index,
const MCHAR *  dirName,
MCHAR *  buf 
)

This function is used to convert a path relative to the 3ds max install to an absolute path.

This function is used to convert a path relative to the 3ds max install to an absolute path. For instance, this will yield the absolute path of the downloads directory:

    GetSpecDir(APP_DOWNLOAD_DIR, _M("downloads"), buf);\n 
Parameters:
[in] index - The ID of the directory to return. This value should be one of AppPaths.
[in] dirName - The subdirectory to look for
[out] buf - The buffer to return the absolute path in. This buffer should be large enough to contain the maximum path length.
UtilExport bool TryCSIDLDir ( int  csidl,
const MCHAR *  dirName,
MCHAR *  buf 
)

This is a helper for creating standard windows CSIDL directories.

This function is a helper for creating standard windows CSIDL directories The list of possible root directories is shown in the windows header SHLOBJ.h. In particular, the TryCSIDLDir() function can be used to create CSIDL_LOCAL_APPDATA paths, where you can put application-specific data tailored to the current windows user.

Parameters:
[in] index - The ID of the directory to return. Should be one of the windows CSIDL defines.
[in] dirName - specifies the relative pathname.
[out] buf - The buffer to return the absolute path in. This buffer should be large enough to contain the maximum path length.
UtilExport BOOL IsSSE ( )