.h includes the declaration of your function....
.lib includes the output function information ect...
.dll includes the code(bindary, can be executed.)
.lib includes the output function information ect...
.dll includes the code(bindary, can be executed.)
typedef int (FAR PASCAL * LPFN)(DWORD , DWORD );
AfxLoadLibrary
GetProcAddress
-----------------------------------
import(tlb,dll)
CoCreateInstance
GetHwndAndMsghandle
然后用一下就用明白的
比如自己的dll,一般有.h,.lib,.dll,.def等文件,可以尝试用
各种不同的方式来调用。
如:
在使用了
#import "your.tlb" raw_interfaces_only, no_namespace, named_guids
之后,用:
HRESULT hrt=CoCreateInstance(CLSIDyour,NULL,
CLSCTX_INPROC_SERVER,
IID_Iyours,
reinterpret_cast<void**>(&pyours));
再使用pyours->yourfunc();
当然也可以用#include "your.h"的方式进行调用。
2。.h市导出函数的申明。
3。dll是导出函数所在的位置,运行时使用。
明白了吗?