加载DLL库 [英] Load DLL Library

查看:145
本文介绍了加载DLL库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用C加载DLL并使用它的函数?

Is it possible to load a DLL with C and use its functions?

我是C中的新手,我试图在Internet上搜索一些很好的引用为了这;但我找不到任何。

I am new in C, and I am trying to search some good references on the internet for this; but I can't find any.

任何帮助将不胜感激!

我在使用GNU GCC Code :: Blocks on Windows 7,64 Bit。

I am using GNU GCC in Code::Blocks on Windows 7, 64 Bit.

推荐答案

HMODULE hModule = LoadLibrary(< dll文件名称>) ,后面跟着< a href =http://msdn.microsoft.com/en-us/library/ms683212.aspx =nofollow noreferrer> GetProcAddress(hModule,< function name>) 将使用WinAPI完成这项工作。

HMODULE hModule = LoadLibrary(<dll file name>) followed by GetProcAddress(hModule, <function name>) will do this job using the WinAPI.

一个例子可能在这里找到。

这篇关于加载DLL库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆