Linux上的GetModuleHandle(NULL) [英] GetModuleHandle(NULL) on Linux

查看:285
本文介绍了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,并为该字符串返回一个不透明的句柄" 动态库.如果filenameNULL,则返回的句柄用于 主程序.

The function dlopen() loads the dynamic library file named by the null-terminated string filename and returns an opaque "handle" for the dynamic library. If filename is NULL, 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屋!

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