-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
add_library(D2MCPClient | ||
SHARED | ||
src/DllMain.cpp | ||
|
||
include/D2MCPClient.h | ||
) | ||
target_include_directories(D2MCPClient PUBLIC include) | ||
|
||
# The definition file that matches functions with their ordinals | ||
target_sources(D2MCPClient PRIVATE definitions/D2MCPClient.${D2MOO_ORDINALS_VERSION}.def) | ||
|
||
# If not defined, we use declspec(dllimport), so only define it to build the .dll | ||
target_compile_definitions(D2MCPClient PRIVATE D2MCP_IMPL) | ||
|
||
get_target_property(D2MCPClientSources D2MCPClient SOURCES) | ||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} | ||
FILES ${D2MCPClientSources} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
LIBRARY D2MCP | ||
EXPORTS | ||
D2MCPClientCloseMCP @10001 NONAME | ||
|
||
; TODO REST OF THE FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#pragma once | ||
|
||
#include <Windows.h> | ||
|
||
#ifdef D2MCP_IMPL | ||
#define D2MCP_DLL_DECL | ||
#else | ||
#define D2MCP_DLL_DECL __declspec( dllimport ) | ||
#endif | ||
|
||
|
||
void __cdecl D2MCPClientCloseMCP(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include <Windows.h> | ||
|
||
#include <cstdint> | ||
|
||
//stubs | ||
void __cdecl D2MCPClientCloseMCP(){} | ||
|
||
// NOLINTBEGIN(bugprone-branch-clone) | ||
BOOL __stdcall DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) | ||
{ | ||
switch (fdwReason) | ||
{ | ||
case DLL_PROCESS_ATTACH: | ||
break; | ||
case DLL_PROCESS_DETACH: | ||
break; | ||
case DLL_THREAD_ATTACH: | ||
break; | ||
case DLL_THREAD_DETACH: | ||
break; | ||
} | ||
|
||
return TRUE; | ||
} | ||
// NOLINTEND(bugprone-branch-clone) |