CDGetDocumentSetting

Applies To:

ChemDraw Menu Extensions Interface:  Access Functions

Description:

Gets setting data for the given document and the given key.

Syntax:

long CDAPI CDGetDocumentSetting( long documentToken,
                                                                char *settingKey,
                                                                HANDLE *psettingData,
                                                                long *pdataLength
);

documentToken a document token representing the document of interest, as provided to the DLL in a GetSubmenuItemName, GetSubmenuItemState or DoSubmenuChoice call.
settingKey a null-terminated, segmented string of the form "Company:DatumName\0" indicating the setting to retrieve.
psettingData a handle to a buffer containing the setting data requested.
pdataLength the size of the setting data handle, in bytes.

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

Remarks:

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

This function must have ordinal number 10 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.

Example:

See Also:

GetSubmenuItemName, GetSubmenuItemState, DoSubmenuChoice

, CDGetApplicationErrorString, CDReturnHandle



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