开发者

GetModuleHandle(NULL) on Linux

Is there a way to GetMo开发者_如何学编程duleHandle(NULL) on Linux to be able to pass that handle into dlsym 3


The documentation for dlopen(3) states:

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.

Therefore, you can use the value returned by dlopen(NULL) as the handle argument to dlsym().


dlopen(NULL) will give you a handle for the executable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜