69,382
社区成员
发帖
与我相关
我的任务
分享
#define BUILD_DLL
#ifdef BUILD_DLL
/* DLL export */
#define EXPORT __declspec(dllexport)
#else
/* EXE import */
#define EXPORT __declspec(dllimport)
#endif
void EXPORT TestFunction()
{
int i=0;
for( i=0;i<4;i++)
{
//printf("pInput[%d]:%d\n",i,pInput[i]);
};
ENCODE_PARAM EncodeParam;
EncodeParam.nGop = 8;
EncodeParam.iHeight = 176;
EncodeParam.iWidth = 240;
EncodeParam.nBitRate = 80000;
EncodeParam.nFrameRate = 8;
ENCODE_CONTEXT *pEncodeContext = H264Init(&EncodeParam);
H264Encode(pEncodeContext);
printf("Hello Dll");
};
typedef void (* TF)();
// TODO: 在此处为应用程序的行为编写代码。
HMODULE hDll = ::LoadLibrary ("E:\\MyProgram\\CDT\\TestDLL\\Debug\\libTestCDT.dll");
TF TestFunction = (TF)::GetProcAddress (hDll,"TestFunction");
TestFunction();
FreeLibrary (hDll);