Linux上的GetModuleHandle(NULL) [英] GetModuleHandle(NULL) on Linux
本文介绍了Linux上的GetModuleHandle(NULL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Linux上是否有一种方法可以将GetModuleHandle(NULL)
传递给dlsym 3
Is there a way to GetModuleHandle(NULL)
on Linux to be able to pass that handle into dlsym 3
推荐答案
文档对于dlopen
(3)状态:
函数
dlopen()
加载由 以null终止的字符串filename
,并为该字符串返回一个不透明的句柄" 动态库.如果filename
是NULL
,则返回的句柄用于 主程序.
The function
dlopen()
loads the dynamic library file named by the null-terminated stringfilename
and returns an opaque "handle" for the dynamic library. Iffilename
isNULL
, then the returned handle is for the main program.
因此,您可以将dlopen(NULL)
返回的值用作dlsym()
的handle
参数.
Therefore, you can use the value returned by dlopen(NULL)
as the handle
argument to dlsym()
.
这篇关于Linux上的GetModuleHandle(NULL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文