GetOptionEncString

Top  Previous  Next

The GetOptionEncString method retrieves a printing option of encrypted string type for a given profile.

 

HRESULT GetOptionEncString(

[in]  LPCWSTR p_wsOptionName,

[out] LPWSTR* p_pwsValue,

[in]  LPCWSTR p_wsProfileName,

[in]  BOOL    p_bPublicProfile

);

 

Parameters:

p_wsOptionName

[in] pointer to a null terminated Unicode string containing the name of the option to set

 

p_pwsValue

[out] pointer to a pointer to a null terminated Unicode string that will contain the value of the retrieved option. On success this value must be freed by the caller with CoTaskMemFree.

 

p_wsProfileName

[in] pointer to a null terminated Unicode string containing the profile to use. If this parameter is an empty string, the current active profile is used.

 

p_bPublicProfile

[in] Flag if the profile is a public or a private profile.

 

Return values:

S_OK on success or COM error code

NV_NOT_INITIALIZED - Initialize was not called

NV_PROFILE_NOT_FOUND - inexistent profile specified

NV_INVALID_OPTION - unknown option specified

 

Remarks:

This method must be called for strings that are kept encrypted in registry (for instance user and owner passwords for the security options).

 

The option names that you can use in the GetOptionXXXX and SetOptionXXXX functions are the names of the registry keys from the novaPDF profile. You can find the complete list of option names in the Registry keys chapter. In the Include folder of novaPDF SDK installation folder you can find the definitions for all options in the next files: novaOptions.h, novaOptions.pas, Globals.bas.