xref: /aosp_15_r20/external/mdnsresponder/mDNSWindows/DLLStub/DLLStub.h (revision 48a54d368dc4fa860885eef7b70b6c53499e7c25)
1*48a54d36SAndroid Build Coastguard Worker /* -*- Mode: C; tab-width: 4 -*-
2*48a54d36SAndroid Build Coastguard Worker  *
3*48a54d36SAndroid Build Coastguard Worker  * Copyright (c) 2009, Apple Computer, Inc. All rights reserved.
4*48a54d36SAndroid Build Coastguard Worker  *
5*48a54d36SAndroid Build Coastguard Worker  * Redistribution and use in source and binary forms, with or without
6*48a54d36SAndroid Build Coastguard Worker  * modification, are permitted provided that the following conditions are met:
7*48a54d36SAndroid Build Coastguard Worker  *
8*48a54d36SAndroid Build Coastguard Worker  * 1.  Redistributions of source code must retain the above copyright notice,
9*48a54d36SAndroid Build Coastguard Worker  *     this list of conditions and the following disclaimer.
10*48a54d36SAndroid Build Coastguard Worker  * 2.  Redistributions in binary form must reproduce the above copyright notice,
11*48a54d36SAndroid Build Coastguard Worker  *     this list of conditions and the following disclaimer in the documentation
12*48a54d36SAndroid Build Coastguard Worker  *     and/or other materials provided with the distribution.
13*48a54d36SAndroid Build Coastguard Worker  * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of its
14*48a54d36SAndroid Build Coastguard Worker  *     contributors may be used to endorse or promote products derived from this
15*48a54d36SAndroid Build Coastguard Worker  *     software without specific prior written permission.
16*48a54d36SAndroid Build Coastguard Worker  *
17*48a54d36SAndroid Build Coastguard Worker  * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18*48a54d36SAndroid Build Coastguard Worker  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19*48a54d36SAndroid Build Coastguard Worker  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20*48a54d36SAndroid Build Coastguard Worker  * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21*48a54d36SAndroid Build Coastguard Worker  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22*48a54d36SAndroid Build Coastguard Worker  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23*48a54d36SAndroid Build Coastguard Worker  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24*48a54d36SAndroid Build Coastguard Worker  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25*48a54d36SAndroid Build Coastguard Worker  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26*48a54d36SAndroid Build Coastguard Worker  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27*48a54d36SAndroid Build Coastguard Worker  */
28*48a54d36SAndroid Build Coastguard Worker 
29*48a54d36SAndroid Build Coastguard Worker #ifndef _DLLStub_h
30*48a54d36SAndroid Build Coastguard Worker #define _DLLStub_h
31*48a54d36SAndroid Build Coastguard Worker 
32*48a54d36SAndroid Build Coastguard Worker #include <windows.h>
33*48a54d36SAndroid Build Coastguard Worker #include <dns_sd.h>
34*48a54d36SAndroid Build Coastguard Worker 
35*48a54d36SAndroid Build Coastguard Worker class DLLStub
36*48a54d36SAndroid Build Coastguard Worker {
37*48a54d36SAndroid Build Coastguard Worker public:
38*48a54d36SAndroid Build Coastguard Worker 
39*48a54d36SAndroid Build Coastguard Worker 	DLLStub();
40*48a54d36SAndroid Build Coastguard Worker 	~DLLStub();
41*48a54d36SAndroid Build Coastguard Worker 
42*48a54d36SAndroid Build Coastguard Worker 	static bool
43*48a54d36SAndroid Build Coastguard Worker 	GetProcAddress( FARPROC * func, LPCSTR lpProcName );
44*48a54d36SAndroid Build Coastguard Worker 
45*48a54d36SAndroid Build Coastguard Worker private:
46*48a54d36SAndroid Build Coastguard Worker 
47*48a54d36SAndroid Build Coastguard Worker 	static DLLStub	*	m_instance;
48*48a54d36SAndroid Build Coastguard Worker 	HMODULE				m_library;
49*48a54d36SAndroid Build Coastguard Worker };
50*48a54d36SAndroid Build Coastguard Worker 
51*48a54d36SAndroid Build Coastguard Worker 
52*48a54d36SAndroid Build Coastguard Worker #endif