WCAP.DLL
API
|
Client Automation Protocol DLL Reference version 5.0 AUG-2002 Download Changes since version 4 We've improved wcap.dll with the addition of several new API calls to enhance the interaction between your application and speedDIAL and make debugging easier. Autostart Debugging SDK updated Backward
compatible procedure WCAPRegisterReceive(RcvProcedure :FARPROC); stdcall; Register your callback procedure with this procedure. Your called-back procedure must have the following prototype: procedure(XMLDoc :LPSTR; Size :INT) Use this procedure *first* before issuing any other call so that your application may get all responses DIAL sends. More information about the role of the callback procedure in your application follows the general WCAPxxxx descriptions. Parameters:
Returns:
function WCAPConnectAS(Host :LPSTR; Port :UINT; Autostart :UINT) :BOOL; stdcall; Replaces procedures WCAPStartServer() and WCAPConnect(). Use WCAPConnectAS() to initiate communication between your application and speedDIAL. The Autostart parameter (unsigned integer) will accept 0, 1, or 2.
DIAL will allow a connection only from an application which is running on the SAME MACHINE as DIAL. Only 1 instance of DIAL may run on the same machine. When WCAPConnectAS() is called, and a successful connection is established, a "Hello" document is sent to your application. This is how your application knows DIAL is ready for other WCAP activity. Simply because the result of this call is successful, it is not an indication to begin sending other WCAP requests. Please see the WCAP specification for more info on what DIAL is sending in the "Hello" reply. Parameters:
Returns:
function WCAPConnect(Host :LPSTR; Port :UINT) :BOOL; stdcall; (not recomended) Use WCAPConnect() to initiate communication between your application and DIAL. To use WCAP, the user must be logged on to DIAL. DIAL is configured to allow a connection on port 17943. The user can change this by choosing "Options | More Options | WCAP Interface" in DIAL. "Allow connection" must be checked, or DIAL will not allow a connection. DIAL will allow a connection only from an application which is running on the SAME MACHINE as DIAL. Only 1 instance of DIAL may run on the same machine. If the connection attempt is successful, a Hello document is sent to your application. Otherwise, you will receive a Error document. Parameters:
Returns:
function WCAPStartServer :BOOL; stdcall; (not recomended) Use this function to start DIAL or speedDIAL. This function is not recommended. Use WCAPConnectAS instead to start speedDIAL automatically. Parameters:
Returns:
function WCAPConnected :BOOL; stdcall; Test whether a connection with DIAL is established. You can use this function before transmitting WCAP request documents. UPDATED: This function has been improved to provide better reliability. Parameters:
Returns:
procedure WCAPDisconnect; stdcall; End an active connection with DIAL. It's important that WCAPDisconnect() is issued BEFORE your application is destroyed. Otherwise, unfriendly Windows messages appear to your user. Parameters:
Returns:
procedure WCAPSend(XMLDoc :LPSTR); stdcall; You construct a string representation of the WCAP request and pass it to this procedure. You are responsible for allocating and freeing the memory associated with it. Parameters:
Returns:
procedure WCAPDebugEnable(EnableLevel :UINT); stdcall; Start debugging
WCAP by setting EnableLevel
to 0, 1, or 2. Setting the EnableLevel to 0 stops recording. Debug information is found in your application folder in file wcapdebug.txt. Parameters:
function WCAPDebugEnabled :UNIT; stdcall; Returns current debug level. Parameters:
procedure WCAPDebugWrite(DebugString :LPSTR); stdcall; User supplied text string to assist in trace. Parameters:
Callback Procedure Your application will require a callback procedure prototyped as: procedure(XMLDoc :LPSTR; Size :UINT) Parameters:
Pass the address of your callback procedure to WCAPRegisterReceive() function so your application can receive document events from DIAL. WCAP.DLL will use this procedure to send complete WCAP XML documents to your application. Each time your application receives a document with this callback you may assume:
|
WCAP Home