National Instruments 320682C Musical Toy Instrument User Manual


 
DDE Library Chapter 6
LabWindows/CVI Standard Libraries 6-16 © National Instruments Corporation
Return Value
message
string Explanation of error.
RegisterDDEServer
int status = RegisterDDEServer (char serverName[],
ddeFuncPtr serverCallbackFunction,
void *callbackData);
Purpose
Registers your program as a valid DDE server, allowing other Windows applications to connect
to it for interprocess communication.
Parameters
Input
serverName
string Name of the server application.
serverCallbackFunction
DDE function
pointer
Pointer to the user callback
function.
callbackData
void pointer Pointer to the user data.
Return Value
status
integer Refer to error codes in
Table 6-3.
Parameter Discussion
serverName must be a string of length from 1 to 255. It is used without regard to case.
The serverCallbackFunction is the name of the callback function that will be invoked to
process client requests.
The callback function must be of the following form:
int (*ddeFuncPtr) (int handle, char *topicName, char *itemName,
int xType, int dataFmt, int dataSize,
void *dataPtr, void *callbackData);
The xType (transaction type) parameter specifies the type of request received from the client.
The following transaction types are supported:
DDE_CONNECT