DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
DllMain.cpp
Go to the documentation of this file.
1/*
2 DiscordCoreAPI, A bot library for Discord, written in C++, and featuring explicit multithreading through the usage of custom, asynchronous C++ CoRoutines.
3
4 Copyright 2021, 2022, 2023 Chris M. (RealTimeChris)
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 Street, Fifth Floor, Boston, MA 02110-1301
19 USA
20*/
21/// DllMain.cpp : Defines the entry point for the DLL application.
22/// Feb 18, 2022
23/// https://discordcoreapi.com
24/// \file DllMain.cpp
25
27
28#ifdef _WIN32
29bool __stdcall DllMain(void*, uint64_t fdwReason, void*) {
30 switch (fdwReason) {
31 case DLL_PROCESS_ATTACH: {
32 [[fallthrough]];
33 }
34 case DLL_THREAD_ATTACH: {
35 [[fallthrough]];
36 }
37 case DLL_THREAD_DETACH: {
38 [[fallthrough]];
39 }
40 case DLL_PROCESS_DETACH: {
41 [[fallthrough]];
42 }
43 default: {
44 return TRUE;
45 }
46 }
47}
48#endif