0ad/source/lib/sysdep/win/delay_load.h
janwas 836cd08d5e # add CppDoc file header to all files, along with their descriptions.
also:
- renamed wdll to delay_load, and wdll_ver to dll_ver
- removed empty wcpu

This was SVN commit r3751.
2006-04-11 23:59:08 +00:00

43 lines
1.1 KiB
C
Executable File

/**
* =========================================================================
* File : delay_load.h
* Project : 0 A.D.
* Description : allow delay-loading DLLs.
*
* @author Jan.Wassenberg@stud.uni-karlsruhe.de
* =========================================================================
*/
/*
* Copyright (c) 2004 Jan Wassenberg
*
* Redistribution and/or modification are also permitted under the
* terms of the GNU General Public License as published by the
* Free Software Foundation (version 2 or later, at your option).
*
* 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.
*/
struct DllLoadNotify;
extern void wdll_add_notify(DllLoadNotify*);
struct DllLoadNotify
{
const char* dll_name;
LibError (*func)(void);
DllLoadNotify* next;
DllLoadNotify(const char* _dll_name, LibError (*_func)(void))
{
dll_name = _dll_name;
func = _func;
wdll_add_notify(this);
}
};
#define WDLL_LOAD_NOTIFY(dll_name, func)\
static DllLoadNotify func##_NOTIFY(dll_name, func)