All event handlers, error handlers, and any other function that is installed as a callback in the EAServer runtime must be coded according to the following rules:
The function must use the C link-object naming convention. C++ programmers must declare EAServer callbacks in an extern C block. You will get link errors otherwise.
Callback prototypes must include the CS_PUBLIC macro as shown by the examples in this chapter. On platforms such as Windows, the C compiler supports a broad collection of calling conventions for C functions. On these platforms, the CS_PUBLIC macro encapsulates the appropriate compiler keywords to ensure that the same calling convention is used by both EAServer and your callbacks. If the calling convention used by your callback and the calling convention used by EAServer do not match, the server will probably crash when the callback is called or soon after it returns.
WARNING! Declare your callback functions with the CS_PUBLIC macro to avoid server crashes.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |