Sample IDL file  Global data structures

Chapter 2: Developing Custom Applications

Defining DFC behavior

NoteBecause there is no pass-by-reference in C function calling, you must use pointers for the changes made in the callee to be reflected at the caller. Due to the nature of the [out] attribute, all DFC arguments declared with the [out] attribute are treated as a pointer internally within the stub code, even if the argument itself is declared as a regular variable within the DFC signature in the IDL file. When you call a DFC with any [out] attributes in the code, you must pass in a pointer for the corresponding argument. To minimize errors and confusion, define [out] arguments as pointers in DFCs.

See the sample file, below, for an example of how to define the DFCs listed in your IDL file. If you use strings (struct istr) or blobs (struct iblob), you must include the following:

#include <IMPACT/Structs.h>

If you are developing a C++ or C-based AIM, you must include:

#include “CustomAcquirePluginImpl.h” //client
#include “CustomAcquirePluginDef.ht” //UNIX client only
#include “CustomServerPluginImpl.h” 	//server
#include “CustomSeriverPluinDef.h” //UNIX server only




Copyright © 2005. Sybase Inc. All rights reserved. Global data structures

View this book as PDF