
Description | Cautions | Example | Errors | See Also
Name: |
long sr_libinit(flags) | |
Inputs: |
unsigned short flags |
|
Returns: |
0 if success | |
|
-1 if failure | |
Includes: |
srllib.h | |
The sr_libinit( ) function initializes the Standard Runtime Library DLL by loading and resolving all entry points in LIBSRLMT.DLL.
This function has the following parameter:
Parameter |
Description |
flags |
This flag has two possible values:
|
This function need only be used if you are linking with the Cross-Compabibility Library.
The sr_libinit( ) function must be called prior to using any other technology specific xx_libinit( ) functions.
/* sr_libinit( ) example */
#include <windows.h>
#include <srllib.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 */
}
/*********************************************************************************
* SRL library initialized so all other SRL functions may be called as normal.
* Display the version number of the DLL
**********************************************************************************/
sr_GetDllVersion(&dwfilever, &dwprodver);
printf("File Version for SRL is %d.%02d\n",
HIWORD(dwfilever), LOWORD(dwfilever));
printf("Product Version for SRL is %d.%02d\n",
HIWORD(dwprodver), LOWORD(dwprodver));
/* Call technology specific xx_libinit( ) functions */
}
The sr_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 2001, Dialogic Corporation