## Printer Device Driver

[prev][next][parent][TOC]

### GplStringSorterCreateInstance

Description

This function creates a string sorter instance (memory resource allocated) and returns a handle that must be used by all other string sorter package functions.

The default heap size that is created is based on current printer driver media sizes and application text usage. A parameter is supplied so that the user can increase the initial memory area that is created to hold text strings. Otherwise a default value, based on test averages, will be used.

Format

    APIRET APIENTRY GplStringSorterCreateInstance( HDC       hdc,

                                                   PHSORTER  phStrSort,

                                                   ULONG     ulHeapSize,

                                                   ULONG     ulOptions );

Parameters

hdc (HDC) Handle to current DC.

phStrSort (PHSORTER) Pointer to the location where string-sorter handle will be placed.

ulHeapSize (ULONG) Initial size of heap to allocate for strings. This can be zero. A default memory area will be created.

ulOptions (ULONG) Creation options (for example, DBCS and TTY). This parameter is reserved for future use. This parameter must be zero.

Returns

Success NO_ERROR
Failure ERROR_xxx