Created
January 21, 2019 15:57
-
-
Save TheWover/f2f2b05478ade6594741b22b5b082c23 to your computer and use it in GitHub Desktop.
DLLMain test code
This file contains hidden or 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
// TestLoad.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include "pch.h" | |
#include <iostream> | |
#include <windows.h> | |
typedef bool(*testFunction)(); | |
testFunction dllFunction; | |
int main() | |
{ | |
HINSTANCE hDll = LoadLibraryA("DllMainTest.dll"); | |
if (hDll) | |
{ | |
dllFunction = (testFunction)GetProcAddress(hDll, "example"); | |
dllFunction(); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment