|
ipsl 님이 쓰신 글 :
: 기본적인 질문인거 같은데 해외 싸이트를 검색해 보니
: 안된다고 대부분 되있는거같아서
:
: 여쭤봅니다.
BC6 에서 만든 dll을 VC2008에서 실제 사용하고 있는 루틴입니다..
저도 어디선가 찾아서 한거같은데,, 잘되더라구요..
선언하실때는,,,, 메인다이얼로그나 뭐 그론곳 cpp파일 상단에 대충 이런형식으로....
HINSTANCE hDll = 0;
typedef int ( __stdcall *LABEL_DLL_SetParent_FN_Type )( HANDLE );
LABEL_DLL_SetParent_FN_Type LABEL_DLL_SetParent;
typedef int ( __stdcall *LABEL_DLL_ShowForm_FN_Type )(char* strCellID, char* strModel, char* strDeffect,
char* strOper, char* strDate, char* strShift, char* strEqp, char* strHdRjRw);
LABEL_DLL_ShowForm_FN_Type LABEL_DLL_ShowForm;
void BuilderDLLInit()
{
hDll = LoadLibrary(L"LabelPrintProject.dll");
LABEL_DLL_SetParent = (LABEL_DLL_SetParent_FN_Type)GetProcAddress(hDll, (LPSTR)"LABEL_DLL_SetParent");
LABEL_DLL_ShowForm = (LABEL_DLL_ShowForm_FN_Type)GetProcAddress(hDll, (LPSTR)"LABEL_DLL_ShowForm");
}
void BuilderDLLFree()
{
FreeLibrary(hDll);
}
사용하실때는.... 요렇게..
BuilderDLLInit();
HANDLE mp;
mp = AfxGetMainWnd()->m_hWnd;
LABEL_DLL_SetParent(mp);
LABEL_DLL_ShowForm(strCellID,strModel,strDeffect,strOper,strADate,strAShift,strEqp,strHdRjRw);
BuilderDLLFree();
|