//헤더에 일단 정의 부터
HMODULE hInst;
//CPP파일에서..
......
......
#pragma package(smart_init)
#pragma resource "*.dfm"
typedef int (*TTestDll)(char *TestValue);
TTestDll TestDll;
.
.
.
// 폼로드에서 (폼크레이트)
hInst = ::LoadLibrary("test.dll");
TestDll= (TTestDll)GetProcAddress(hInst,"TestDll");
TestDll("안녕하세요");
저는 이렇게 쓰는데용;;;
겟프록 어드레스로....
함수가 많으면 많이 써줘야 하는 번거러움이....
|