pupy/client/sources/ReflectiveDllInjection.h

53 lines
2.7 KiB
C
Raw Normal View History

2015-09-21 19:53:37 +00:00
//===============================================================================================//
// Copyright (c) 2012, Stephen Fewer of Harmony Security (www.harmonysecurity.com)
// All rights reserved.
2019-09-07 15:51:30 +00:00
//
// Redistribution and use in source and binary forms, with or without modification, are permitted
2015-09-21 19:53:37 +00:00
// provided that the following conditions are met:
2019-09-07 15:51:30 +00:00
//
// * Redistributions of source code must retain the above copyright notice, this list of
2015-09-21 19:53:37 +00:00
// conditions and the following disclaimer.
2019-09-07 15:51:30 +00:00
//
// * Redistributions in binary form must reproduce the above copyright notice, this list of
// conditions and the following disclaimer in the documentation and/or other materials provided
2015-09-21 19:53:37 +00:00
// with the distribution.
2019-09-07 15:51:30 +00:00
//
2015-09-21 19:53:37 +00:00
// * Neither the name of Harmony Security nor the names of its contributors may be used to
// endorse or promote products derived from this software without specific prior written permission.
2019-09-07 15:51:30 +00:00
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
2015-09-21 19:53:37 +00:00
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
2019-09-07 15:51:30 +00:00
// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2015-09-21 19:53:37 +00:00
// POSSIBILITY OF SUCH DAMAGE.
//===============================================================================================//
#ifndef _REFLECTIVEDLLINJECTION_REFLECTIVEDLLINJECTION_H
#define _REFLECTIVEDLLINJECTION_REFLECTIVEDLLINJECTION_H
//===============================================================================================//
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
// we declare some common stuff in here...
#define DLL_QUERY_HMODULE 6
#define DEREF( name )*(UINT_PTR *)(name)
#define DEREF_64( name )*(DWORD64 *)(name)
#define DEREF_32( name )*(DWORD *)(name)
#define DEREF_16( name )*(WORD *)(name)
#define DEREF_8( name )*(BYTE *)(name)
2019-09-07 15:51:30 +00:00
typedef ULONG_PTR (WINAPI * REFLECTIVELOADER)( PVOID );
2015-09-21 19:53:37 +00:00
typedef BOOL (WINAPI * DLLMAIN)( HINSTANCE, DWORD, LPVOID );
2019-09-07 15:51:30 +00:00
#define DLLEXPORT __declspec( dllexport )
2015-09-21 19:53:37 +00:00
//===============================================================================================//
#endif
//===============================================================================================//