Why does it load my DLL but the pointer to the Proc returns 0? It loads the DLL and says "DLL Loaded" but it just won't say "Function Found." Help me please :)?
#include <windows.h>
#include <iostream>
//DLL Function: void DLL_EXPORT Theading(HANDLE hThread, DWORD ThreadID, void* FunctionToPass);
typedef void (*CThread)(HANDLE hTThread, DWORD TThreadID, void* FuncToPass);
void FunctionToPassX()
{
std::cout<<"meh";
}
int main()
{
HINSTANCE h = LoadLibrary(TEXT("Threading.dll"));
if (h)
{
std::cout<<"DLL Loaded";
CThread* TThread = (CThread*)(GetProcAddress(h, "Threading"));
if (NULL != TThread)
{
std::cout<<"Function Found";
}
FreeLibrary(h);
}
std::cin.get();
return 0;
}