You are here: C++ API > Functions > dtssGetOptions2 Function
Close
dtSearch Text Retrieval Engine Programmer's Reference
dtssGetOptions2 Function

Retrieve current option settings

File: dtsearch.h

Syntax
C++
void DLLFUNC dtssGetOptions2(dtsOptions2& dest, char * dataBuf, int dataBufSize, int * pDataSize);

Call dtssGetOptions2 first with a null buffer and pointer to an int to get the size of the variable-length data, then allocate the buffer and call again with a buffer large enough to hold the data. The dtsOptionsReader class provides a simple wrapper around this process. Example:

dtsOptions2 options; int sizeNeeded = 0; dtssGetOptions2(options, 0, 0, &sizeNeeded); char *dataBuffer = new char[sizeNeeded]; if (dataBuffer) dtssGetOptions2(options, dataBuffer, sizeNeeded, &sizeNeeded);
Copyright (c) 1995-2022 dtSearch Corp. All rights reserved.