Skip to content

Instantly share code, notes, and snippets.

@TheWover
Created January 21, 2019 15:57
Show Gist options
  • Save TheWover/f2f2b05478ade6594741b22b5b082c23 to your computer and use it in GitHub Desktop.
Save TheWover/f2f2b05478ade6594741b22b5b082c23 to your computer and use it in GitHub Desktop.
DLLMain test code
// 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