List of all members.
Detailed Description
Definition at line 1062 of file sc.c.
Constructor & Destructor Documentation
| cScDll::cScDll |
( |
const char * |
FileName | ) |
|
Definition at line 1072 of file sc.c.
{
fileName=strdup(FileName);
handle=0;
}
| cScDll::cScDll |
( |
const char * |
FileName | ) |
|
Member Function Documentation
| bool cScDll::Load |
( |
bool |
check | ) |
|
Definition at line 1084 of file sc.c.
References dlerror(), dlopen(), dlsym(), L_CORE_DYN, L_GEN_ERROR, PRINTF, and SCAPIVERS.
Referenced by cScDlls::Load().
{
char *base=rindex(fileName,'/');
if(base) base++; else base=fileName;
PRINTF(L_CORE_DYN,"loading library: %s",base);
if(!handle) {
handle=dlopen(fileName,RTLD_NOW|(check?RTLD_LOCAL:RTLD_GLOBAL));
if(handle) {
if(!check) return true;
dlerror();
int *libapivers=(int *)dlsym(handle,"ScLibApiVersion");
const char *error=dlerror();
if(!error && *libapivers==SCAPIVERS) return true;
else PRINTF(L_GEN_ERROR,"dload: %s: SCAPI version doesn't match (plugin=%d, library=%d)",base,SCAPIVERS,!error?*libapivers:0);
}
else PRINTF(L_GEN_ERROR,"dload: %s: %s",base,dlerror());
}
return false;
}
| bool cScDll::Load |
( |
bool |
check | ) |
|
The documentation for this class was generated from the following files:
- contrib/sasc-ng/sc/PLUGINS/src/sc-src/sc.c
- sc.c