VCEnumPresets


Version:

9.0.1

Description:

Returns a list of available preset names in a presets configuration file.

Declaration:

C/C++

extern "C" int WINAPI VCEnumPresets(short* iError, short iConfigFile, char* szList);

Delphi

function VCEnumPresets(var iError: SmallInt; iConfigFile: SmallInt; szList: PChar): LongInt; stdcall;

ActiveX/COM

Function EnumPresets(ByVal iConfigFile As Integer, ByVal szList As String) As Long

Parameters:

iConfigFile - an index to the presets file type:
0 - Print, Presets.vccfg
1 - Plot, Plot.vccfg
2 - PDF Export, PDF.vccfg
3 - Image Export, Graphics.vccfg
4 - XML Export, XML.vccfg
5 - Style Save, StyleOptions.vccfg
szList - pointer to a character buffer to receive the list

Return Value:

number of characters in the string, excluding the terminating NULL

iError Code:

0 - Success
1 - Configuration file has no presets
2 - Invalid iConfigFile index

Notes:

This function will fill a buffer passed to it with a list of the available preset names. The list is returned as a NULL terminated string, with each name separated by a newline character (0x0a). To determine the size of the buffer required, call VCEnumPresets with the szList parameter set to NULL.

See Also:

VCGetPresetValue, VCGetCurrentPreset, VCAddPreset, VCDeletePreset, VCCopyPreset