Checks registry key for stored origin user path or executible path, for any version of Origin. These paths may not be associated with the currently running origin.
BOOL okutil_find_path_from_origin_registry_key( string * pstrPath, LPCTSTR lpszPathKey, LPCSTR lpszAppTitle, LPCSTR lpcszSubVersionName = NULL, LPCSTR lpcszSpecialChar = NULL, LPCSTR lpcszLanguage = NULL )
Return TRUE if the path string can be found in registry and path exists on disk.
EX1
#include <oUtils.h> void okutil_find_path_from_origin_registry_key_ex1() { string strPath; BOOL bExists = okutil_find_path_from_origin_registry_key(&strPath, "Path", "Origin 7.5", NULL, NULL, "English"); if(!bExists) // try Server bExists = okutil_find_path_from_origin_registry_key(&strPath, "Path", "Origin 7.5", NULL, "S", "English"); if(!bExists) // try Client bExists = okutil_find_path_from_origin_registry_key(&strPath, "Path", "Origin 7.5", NULL, "C", "English"); }
origin.h