Я предоставил весь правильный путь и данные.
Код: Выделить всё
Myexe.cpp< /code>: < /p>
#include "stdafx.h"
#include
int _tmain(int argc, _TCHAR* argv[])
{
HMODULE hInstLibrary = LoadLibrary(L("..\\Debug\\LoadDLL\\LoadDLL.dll"));// I have checked with complete path as well.
if(hInstLibrary)
{
printf("Hello World");
}
return 0;
}
< /code>
MyDLL.cpp< /code>: < /p>
#include "MyDLL.h"
#include
MyDLL::MyDLL(void)
{
}
MyDLL::~MyDLL(void)
{
}
extern "C" __declspec(dllexport) void HelloWorld()
{
printf("Hello DLL");
}
< /code>
MyDLL.h< /code>: < /p>
#pragma once
class __declspec(dllexport) MyDLL
{
public:
MyDLL(void);
~MyDLL(void);
};
extern "C" __declspec(dllexport) void HelloWorld();
< /code>
I have tried providing the complete pathКод: Выделить всё
HMODULE hInstLibrary = LoadLibrary(_T("C:\\Windows\\System32\\aeinv.dll"));
< /code>
it does load the DLLПодробнее здесь: https://stackoverflow.com/questions/206 ... ot-working
Мобильная версия