| GetOriginPath
 DescriptionGet Origin program path or user file path or group path.
 Syntaxstring GetOriginPath( int nPathType = ORIGIN_PATH_SYSTEM, bool bCheckExistsAndDiffFromUserPath = false ) Parameters nPathType[input] can be one of the following enum constantstypedef enum tagORIGIN_PATH_TYPE{ORIGIN_PATH_SYSTEM,ORIGIN_PATH_USER,ORIGIN_PATH_GROUP,ORIGIN_PATH_SERVER_GROUP_FOLDER,ORIGIN_PATH_APPS_ROOT}The default value is ORIGIN_PATH_SYSTEM. bCheckExistsAndDiffFromUserPathif false, the folder is retured whether it exists or not.if true, then the function will return empty string if1) the folder does not existor2) it exists but is equal to the USER path AND nPathType!=ORIGIN_PATH_USER.(bCheckExistsAndDiffFromUserPath has no effect if nPathType=ORIGIN_PATH_USER)Set to true if searching ORIGIN_PATH_USER folder first, then other folders, and you don't want to bother searching if not needed.
 ReturnA string containing the requested path, including the final backslash.
 ExamplesEX1
 void    GetOriginPath_ex1()
{
    string strFile = GetOriginPath(ORIGIN_PATH_SYSTEM) + "originc\\system\\wksheet.h";
    ASSERT(strFile.IsFile());  // system header should be installed only in program path
    strFile = GetOriginPath(ORIGIN_PATH_USER) + "originc\\system\\wksheet.h";
    ASSERT(!strFile.IsFile()); // should not have this in user files path
    strFile = GetOriginPath() + "origin.ini";
    ASSERT(strFile.IsFile());
}RemarkGet one of 4 main Origin paths: System, User, Group or App paths, including final backslash character.
 Origin's system path is where Origin's EXE and DLL files are located. Origin C system files are always installed inside the program path.
 Origin's User path is assigned by the user when running Origin for the first time. This is where all the files related to a particular customization of Origin is located. You will find origin.ini and other templates and CNF files in this location.
 Origin's Group path is where files shared between users are located. ORIGIN_PATH_GROUP : get the path of group folder in Member Machine; ORIGIN_PATH_SERVER_GROUP_FOLDER : get the path of group folder in Group Leader Machine.
 Origin's App path is where the installed Apps are located.
 See Alsookutil_get_origin_path, okutil_get_origin_path_type
 Header to Includeorigin.h
 Reference |