
Description | Cautions | Example | Errors | See Also
Name: |
dx_libinit ( flags ) | |
Inputs: |
unsigned short flags |
|
Returns: |
0 if success | |
|
-1 if failure | |
Includes: |
srllib.h | |
|
dxxxlib.h | |
The dx_libinit( ) function initializes the Voice Library DLL by loading and resolving all entry points in LIBDXXMT.DLL. .
This function has the following parameter:
Parameter |
Description |
flags |
This flag has two possible values: DLGC_MT - Specify if using a multi-threaded or window callback model. DLGC_ST - Specify if using the single-threaded model. |
The sr_libinit( ) function must be called prior to using the dx_libinit( ) function.
/*$ dx_libinit( ) example $*/
#include <windows.h>
#include <srllib.h>
#include <dxxxlib.h>
int InitDevices( )
{
DWORD dwfilever, dwprodver;
/************************************************************************
* Initialize all the DLLs required. This will cause the DLLs to be
* loaded and entry points to be resolved. Entry points not resolved
* are set up to point to a default not implemented function in the
* `C' library. If the DLL is not found all functions are resolved
* to not implemented.
************************************************************************/
if (sr_libinit(DLGC_MT) == -1) {
/* Must be already loaded, only reason if sr_libinit( ) was already called */
}
/* Call technology specific dx_libinit( ) functions to load Voice DLL */
if (dx_libinit(DLGC_MT) == -1) {
/* Must be already loaded, only reason if dx_libinit( ) was already called */
}
/*********************************************************************************
* Voice library initialized so all other Voice functions may be called
* as normal. Display the version number of the DLL
**********************************************************************************/
dx_GetDllVersion(&dwfilever, &dwprodver);
printf("File Version for Voice DLL is %d.%02d\n",
HIWORD(dwfilever), LOWORD(dwfilever));
printf("Product Version for Voice DLL is %d.%02d\n",
HIWORD(dwprodver), LOWORD(dwprodver));
/* Now open all the Voice devices */
}
The dx_libinit( ) function fails if the library has already been initialized. For example, if you try to make a second call to sr_libinit( ), it fails.
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation