ReactOS 0.4.15-dev-7942-gd23573b
dll_register.c
Go to the documentation of this file.
1/*
2 * DllRegisterServer default implementation
3 *
4 * Copyright 2021 Alexandre Julliard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include <stdarg.h>
22#define COBJMACROS
23#include "windef.h"
24#include "winbase.h"
25#include "olectl.h"
26#include "rpcproxy.h"
27
28static inline void *image_base(void)
29{
30#if defined(__MINGW32__) || defined(_MSC_VER)
32 return (void *)&__ImageBase;
33#else
34 extern IMAGE_NT_HEADERS __wine_spec_nt_header;
35 return (void *)((__wine_spec_nt_header.OptionalHeader.ImageBase + 0xffff) & ~0xffff);
36#endif
37}
38
40{
42}
43
45{
47}
#define __ImageBase
Definition: crt_handler.c:22
HRESULT WINAPI DllRegisterServer(void)
Definition: dll_register.c:39
HRESULT WINAPI DllUnregisterServer(void)
Definition: dll_register.c:44
static void * image_base(void)
Definition: dll_register.c:28
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98
IMAGE_OPTIONAL_HEADER32 OptionalHeader
Definition: ntddk_ex.h:184
#define WINAPI
Definition: msvc.h:6