Programming/C Win32 MFC2016. 4. 4. 09:20

엥.. 왜 이런거 관련 내용이 검색이 안되지 -ㅁ-?


    hInst = LoadLibrary("SmallDll.dll");

    if(hInst == NULL)

        return 1;


    // 호출한 함수를 맵핑

    fAPlusB = (APlusB)GetProcAddress(hInst, "APlusB");

    fAMinusB = (AMinusB)GetProcAddress(hInst, "AMinusB"); 

[링크 : http://wwwi.tistory.com/72]



HMODULE WINAPI LoadLibrary(

  _In_ LPCTSTR lpFileName

);

[링크 : https://msdn.microsoft.com/en-us/library/windows/desktop/ms684175(v=vs.85).aspx]



FARPROC WINAPI GetProcAddress(

  _In_ HMODULE hModule,

  _In_ LPCSTR  lpProcName

);

[링크 : https://msdn.microsoft.com/ko-kr/library/windows/desktop/ms683212(v=vs.85).aspx]



lib로 하는거네...

// MathFuncsDll.h

#ifdef MATHFUNCSDLL_EXPORTS

#define MATHFUNCSDLL_API __declspec(dllexport) 

#else

#define MATHFUNCSDLL_API __declspec(dllimport) 

#endif


// MyExecRefsDll.cpp

// compile with: /EHsc /link MathFuncsDll.lib 


[링크 : https://msdn.microsoft.com/ko-kr/library/ms235636.aspx]

'Programming > C Win32 MFC' 카테고리의 다른 글

MFC / stdlib / qsort example  (0) 2016.12.19
MFC UpdateData()  (0) 2016.12.16
가변 매크로 __VA_ARGS__  (0) 2016.03.18
#import ?  (0) 2015.12.21
"\n" 의 cpu 점유율?  (0) 2015.10.12
Posted by 구차니