Consultor Eletrônico



Kbase 17148: How to Call WIN32 API Function: InitAtomTable
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
How to Call WIN32 API Function: InitAtomTable

DISCLAIMER:
===========
The code example in this knowledgebase is for informational purposes
only. If you have specific questions about which API calls would be
best suited to your design goals, please consult your Microsoft
documentation.

INTRODUCTION:
=============
The following sample code shows how to call the Win32 API function
called InitAtomTable. This function allows the application to set the
number of top-level entries in the local atom table. The default
number (if InitAtomTable() is not called or NULL is specified in the
parameter list) is 37. This is adequate to efficiently store several
hundred character strings. Larger values can be set if you plan to
store a large number of strings in the local atom table.

This code has been tested on Windows NT 4.0 Workstation only.


DEFINE VARIABLE intResult AS INTEGER NO-UNDO.

PROCEDURE InitAtomTable EXTERNAL "KERNEL32.DLL":
DEFINE INPUT PARAMETER intSize AS LONG.
DEFINE RETURN PARAMETER intResult AS SHORT.
END PROCEDURE.

RUN InitAtomTable (INPUT 37, OUTPUT intResult).

IF intResult = 1 THEN
MESSAGE "Atom Table Initialized" VIEW-AS ALERT-BOX.
ELSE
MESSAGE "Function call failed, not sure why" VIEW-AS ALERT-BOX.

Progress Software Technical Support Note # 17148