
Description | Cautions | Example | Errors | See Also
Name: |
fx_libinit ( flags ) | |
Inputs: |
unsigned short flags |
programming model |
Returns: |
0 if success | |
|
-1 if failure | |
Includes: |
srllib.h | |
|
dxxxlib.h | |
|
faxlib.h | |
Category: |
miscellaneous | |
Mode |
synchronous | |
The fx_libinit( ) function initializes the fax library DLL by loading and resolving all entry points in libfaxmt.dll.
|
||
Parameter |
Description | |
flags |
Specifies the programming model. Valid values: | |
DLGC_MT |
Specifies a multi-threaded or window callback model. | |
DLGC_ST |
Specifies a single-threaded model. | |
You must call sr_libinit( ) prior to using fx_libinit( ).
/*$ fx_libinit( ) example $*/
#include <windows.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <faxlib.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 */
}
/* Call technology specific fx_libinit( ) functions to load VFX Fax DLL */
if (fx_libinit(DLGC_MT) == -1) {
/* Must be already loaded, only reason if dx_libinit( ) was already called */
}
/*********************************************************************************
* Fax library initialized so all other VFX functions may be called as normal.
* Display the version number of the DLL
**********************************************************************************/
fx_GetDllVersion(&dwfilever, &dwprodver);
printf("File Version for FAX DLL is %d.%02d\n",
HIWORD(dwfilever), LOWORD(dwfilever));
printf("Product Version for FAX DLL is %d.%02d\n",
HIWORD(dwprodver), LOWORD(dwprodver));
/* Now open all the Voice devices */
}
The fx_libinit( ) function fails if the library has already been initialized; for example, if you try to make a second call to sr_libinit( ).
Click here to contact Dialogic Customer Engineering
Copyright 2002, Intel Corporation