Applies To:

ChemDraw Menu Extensions Interface:  Access Functions


Gets an application-wide preference setting for the given key


long CDAPI CDGetApplicationPreference( char *settingKey,
                                                                         HANDLE *psettingData,
                                                                         long *pdataLength

settingKey a null-terminated, segmented string of the form "Company:DatumName\0" indicating the preference to retrieve.
psettingData a handle to a buffer containing the preference data requested.
pdataLength the size of the preference data handle, in bytes.

Returns a long indicating success (0) or failure (!0) of the function.


If the setting does not exist, a new setting will NOT be generated. Use CDSetApplicationPreference with an empty setting string to create a null preference setting.

This function must have ordinal number 12 in the Import Definition File.

When the DLL is done using the handle, it must be returned to ChemDraw using CDReturnHandle.

If an error is returned, the DLL may call CDGetApplicationErrorString for a string explaining the error.


See Also:

CDGetApplicationErrorString, CDReturnHandle, CDSetApplicationPreference

2005 CambridgeSoft Corporation. All Rights Reserved. Privacy Statement
Tel  800 315-7300 / 617 588-9300     Fax  617 588-9390     Email
CambridgeSoft Corporation, 100 CambridgePark Drive, Cambridge, MA 02140 USA