2
* Copyright (C) 2009 Sourcefire, Inc.
4
* Authors: aCaB <acab@clamav.net>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
23
static DWORD lasterr = 0;
24
const lt_dlinfo dlinfo = {"libclamunrar_iface", "unrar", 1, 0, 0, 0 };
30
lt_dlhandle lt_dlopen(const char *filename) {
31
lt_dlhandle h = LoadLibrary(filename);
32
if(!h) lasterr = GetLastError();
36
void *lt_dlsym(lt_dlhandle handle, const char *name) {
37
void *f = GetProcAddress(handle, name);
38
if(!f) lasterr = GetLastError();
42
const char *lt_dlerror(void) {
43
char *err = "NO ERROR";
45
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, lasterr, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&err, 0, NULL);
49
int lt_dladdsearchdir(const char *search_dir) {
53
const char *lt_dlgetsearchpath(void) {
57
const lt_dlinfo *lt_dlgetinfo(lt_dlhandle handle) {
b'\\ No newline at end of file'