1
0
mirror of https://github.com/solemnwarning/ipxwrapper synced 2024-12-30 16:45:37 +01:00
ipxwrapper/src/common.h

57 lines
1.8 KiB
C
Raw Normal View History

2011-08-28 21:27:06 +00:00
/* IPXWrapper - Common header
* Copyright (C) 2011 Daniel Collins <solemnwarning@solemnwarning.net>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef IPXWRAPPER_COMMON_H
#define IPXWRAPPER_COMMON_H
#include <windows.h>
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
2012-10-21 10:26:52 +00:00
#include "addr.h"
2011-11-16 21:32:59 +00:00
enum ipx_log_level {
LOG_CALL = 1,
LOG_DEBUG,
LOG_INFO = 4,
LOG_WARNING,
LOG_ERROR
};
2011-08-28 21:27:06 +00:00
2011-11-16 21:32:59 +00:00
extern enum ipx_log_level min_log_level;
2011-08-28 21:27:06 +00:00
const char *w32_error(DWORD errnum);
2012-10-21 10:26:52 +00:00
HKEY reg_open_main(bool readwrite);
HKEY reg_open_subkey(HKEY parent, const char *path, bool readwrite);
void reg_close(HKEY key);
2011-08-28 21:27:06 +00:00
2012-10-21 10:26:52 +00:00
bool reg_get_bin(HKEY key, const char *name, void *buf, size_t size, const void *default_value);
DWORD reg_get_dword(HKEY key, const char *name, DWORD default_value);
2011-08-28 21:27:06 +00:00
void load_dll(unsigned int dllnum);
void unload_dlls(void);
void __stdcall *find_sym(unsigned int dllnum, const char *symbol);
void __stdcall log_call(unsigned int dllnum, const char *symbol);
2011-08-28 21:27:06 +00:00
void log_open(const char *file);
void log_close();
2011-11-16 21:32:59 +00:00
void log_printf(enum ipx_log_level level, const char *fmt, ...);
2011-08-28 21:27:06 +00:00
#endif /* !IPXWRAPPER_COMMON_H */