这些天研究ffmpeg的解码部分,感觉不知从何入手,甚是郁闷故请教于各位大侠,望各位不吝赐教!我现在已经将ffmpeg的工程在minsys+mingw 下编译通过了,但不知道在window下如何使用DLL文件,最好有调用的例子。谢谢
解决方案 »
- 栈的使用问题
- 点对点文件传输 postthreadmessage错误,帮帮忙
- ADO访问ACCESS中遇到问题,帮帮忙~~~
- 关于VirtualQueryEx的使用(发在汇编版没人回,没什么分了)
- 如何把一个程序注册成系统服务呢?
- 谁要是解决了,分贴给分,保证给尽我所有可用分!!!!!
- SDK编程中,如何使用ActiveX控件??
- 发送方连续send 4 个 struct USERINFO 类型的数据,接收方是否可以用 struct USERINFO buf[4] 来接收???
- 在console下如何用cl 编译 windows 程序?
- VC是如何管理不同DIALOG里资源ID相同的控件的,RC文件里只有一份记录啊!
- 如何在派生类中再次激活OnClick()
- CTime t = CTime::GetCurrentTime(); //获取系统日期
// GetProcAddress to access myPuts from Myputs.dll.
#include <windows.h>
#include <stdio.h>
typedef int (__cdecl *MYPROC)(LPWSTR);
VOID main(VOID)
{
HINSTANCE hinstLib;
MYPROC ProcAdd;
BOOL fFreeResult, fRunTimeLinkSuccess = FALSE;
// Get a handle to the DLL module.
hinstLib = LoadLibrary(TEXT("myputs"));
// If the handle is valid, try to get the function address.
if (hinstLib != NULL)
{
ProcAdd = (MYPROC) GetProcAddress(hinstLib, "myPuts");
// If the function address is valid, call the function.
if (NULL != ProcAdd)
{
fRunTimeLinkSuccess = TRUE;
(ProcAdd) (L"Message sent to the DLL function\n"); //<====这里就是调用
}
// Free the DLL module.
fFreeResult = FreeLibrary(hinstLib);
}
// If unable to call the DLL function, use an alternative.
if (! fRunTimeLinkSuccess)
printf("Message printed from executable\n");
}
if (hLib != NULL)
{
ProcAdd = (MYPROC) GetProcAddress(hLib, "myPuts");
if (NULL != ProcAdd)
{
fRunTimeLinkSuccess = TRUE;
(ProcAdd) (L"Message sent to the DLL function\n"); //<====这里就是调用
}
//如果需要调用其他的接口函数,重复上述的 GetProcAddress 及调用过程即可 FreeLibrary(hLib);
}
if (hLib != NULL)
{
ProcAdd = (MYPROC) GetProcAddress(hLib, "myPuts"); if (NULL != ProcAdd)
{
fRunTimeLinkSuccess = TRUE;
(ProcAdd) (L"Message sent to the DLL function\n"); // <====这里就是调用
}
//如果需要调用其他的接口函数,重复上述的 GetProcAddress 及调用过程即可 FreeLibrary(hLib);
}