当前位置:网站首页>dlopen调用动态库
dlopen调用动态库
2022-04-22 05:40:00 【Q446512799】
/*头文件*/
#include<dlfcn.h>
void *handle;
handle = dlopen("libKeyDerive.so",RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
if (!handle)
{
return ( -1 );
}
/*定义库中需要调用的接口*/
typedef int (*https_client_batchpost)(char *info,int infolen,char *resp);
https_client_batchpost batchpost_func = dlsym(handle, "https_client_batchpost");
if (batchpost_func)
{
i_ret = batchpost_func(batchinfo,strlen(batchinfo),&responseinfo);
}
else
{
dlclose(handle);
return ( -1 );
}
dlclose(handle);
版权声明
本文为[Q446512799]所创,转载请带上原文链接,感谢
https://blog.csdn.net/woailp___2005/article/details/119597455
边栏推荐
- 08 - program input and output
- Introduction to machine learning -- Arg operation in numpy
- Miniconda source swap (add image)
- Blue Bridge Cup 31 day sprint Day17
- ifix问题汇总Q&A(个人记录)
- LeetCode 2049. Count the number of nodes with the highest score -- traversal of the tree
- ip数据报中首部 总长度 片偏移的单位
- 07- 运算符
- golang 合并两个有序的数组(笔试题)
- Convolutional neural network
猜你喜欢

TCGA database Ensembl ID is transformed into gene symbol to extract the required RNA species expression profile list information

ubuntu20.0.4下在终端安装数据库

写一篇关于ddt数据驱动的自动化测试

Apple CMS builds a video website and collects videos regularly

C語言--經典100題

geojson文件与shapefile文件 单个 互转 小工具

Langue C - 100 questions classiques

TCGA downloads RNA SEQ data from GBM patients

蓝桥杯31天冲刺 Day14

Alist简单使用指南
随机推荐
抓包工具mitmproxy和Anyproxy
STM32学习笔记3——GPIO的输入引脚
03-pycharm
03-pycharm
蓝桥杯31天冲刺 Day16
Reading package list Finished analyzing dependency tree of package. Reading status information Some packages cannot be installed after completion. If you are using an unstable distribution, this may b
蓝桥杯冲刺——并查集
PyQT5总结
Leetcode interview question 17.09 Number k -- dynamic programming
15 - container - Dictionary
Blue Bridge Cup 31 day sprint day23
Layer closes the pop-up window and refreshes the parent page
Introduction to machine learning -- comparison and fancy indexing in numpy
Digital DP (template)
09 - process control - judgment statement
Pytorch environment preparation
CONDA command
LeetCode 2044. Count the number of subsets that can get the maximum value by bit -- depth traversal
考研结束了
12 - 容器-字符串