okutil_make_origin_registry_key

 

Description

Creates the Origin registry string, for any version of Origin

Syntax

BOOL okutil_make_origin_registry_key( string * pstrKey, LPCSTR lpszAppTitle, LPCSTR lpcszSubVersionName = NULL, LPCSTR lpcszSpecialChar = NULL, BOOL bAppendLang = TRUE, LPCSTR lpcszLanguage = NULL )

Parameters

pstrKey
[output] Origin key formed.
lpszAppTitle
[input] title used in registry ex "Origin 7.5", "Origin 8"
lpcszSubVersionName
[input] Default NULL. Example: "Beta 4" "Academic"
lpcszSpecialChar
[input] Default NULL. Special Character. For Origin 8, only D allowed. Example: "S" for Server, "C" for Client, "A" for Student (Academic) in 7.5, or "D" for Debug. Can combine "SD"
bAppendLang
[input] Default TRUE. TRUE means append the language specified by lpcszLanguage. FALSE means lpcszLanguage is ignored.
lpcszLanguage
[input] Default NULL. Use language strings: "English", Japanese", "German" for < Origin 8. For Origin 8+ use NULL to append "International". bAppendLang must be TRUE to append.

Return

Return TRUE always.

Examples

EX1

#include <oUtils.h>
void okutil_find_path_from_origin_registry_key_ex2()
{    
    string strKey;
    okutil_make_origin_registry_key(&strKey, "Origin 8");
    // strKey might now be HKEY_CURRENT_USER/Software/OriginLab/Origin 8/International
    // If HKEY_CURRENT_USER/Software/OriginLab has key Origin 8 set to 1 (means append SR<N>), then result might be
    // HKEY_CURRENT_USER/Software/OriginLab/Origin 8SR1/International

    okutil_make_origin_registry_key(&strKey, "Origin 7.5", NULL, NULL, TRUE, "English");
    // strKey might now be HKEY_CURRENT_USER/Software/OriginLab/Origin 7.5S/English    for a server Origin 7.5
}

Remark

See Also

okutil_find_path_from_origin_registry_key

header to Include

origin.h

Reference