2.1.10.51 okutil_set_custom_path


Description

This function is to set current working directory.

Syntax

string okutil_set_custom_path( LPCSTR lpcszNew = NULL, bool bDoUpdate = true )

Parameters

lpcszNew
[input]it contains the directory used to set current working directory, default for user directory.
bDoUpdate
[input]if TRUE then update map for ORIGIN_PATH_CUSTOM, otherwise not.

Return

Current working directory.

Examples

EX1

void okutil_set_custom_path_Ex1()
{
    string str = okutil_set_custom_path();//default for user directory
    out_str(str);
}

EX2

void okutil_set_custom_path_Ex2()
{
    LPCSTR lpcszNew = GetAppPath(TRUE);//get Origin's program path
    bool bDoUpdate=false;
    string str = okutil_set_custom_path(lpcszNew, bDoUpdate);
    out_str(str);
}

Remark

See Also

okutil_get_custom_path

Header to Included

origin.h

Reference