CDSetApplicationPreference

Applies To:

ChemDraw Menu Extensions Interface:  Access Functions

Description:

Sets an application-wide preference setting for the given key.

Syntax:

long CDAPI CDSetApplicationPreference( char *settingKey,
                                                                        HANDLE settingData,
                                                                        long dataLength
);

settingKey a null-terminated, segmented string of the form "Company:DatumName\0" indicating the preference to set.
settingData a handle containing the preference data.
dataLength the size of the preference data handle, in bytes.

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

Remarks:

The preference data will be stored with the application. If a setting with the same settingKey already exists in the application, the setting data will be replaced with the new setting data.

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

The DLL is responsible for deallocating the handle after the call returns.

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

Example:

See Also:

CDGetApplicationErrorString


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