求助一个PB与C++方面的问题
答案:1 悬赏:60 手机版
解决时间 2021-03-29 04:49
- 提问者网友:佞臣
- 2021-03-28 06:20
求助一个PB与C++方面的问题
最佳答案
- 五星知识达人网友:雪起风沙痕
- 2021-03-28 06:49
#include "stdafx.h"
#include
typedef int(__stdcall *pDES)(char* inStr, char* key, char* outStr, int);
int _tmain(int argc, _TCHAR* argv[])
{
HMODULE loadLib;
loadLib=LoadLibraryA("NetDiskDLL.dll");
if (loadLib == NULL){
printf("函数加载未成功!\n");
}
else{
printf("函数加载成功!\n");
printf("ADD=0x%xh\n", loadLib);
}
pDES pd;
pd = (pDES)::GetProcAddress(loadLib, "DES");
if (pd == NULL)
{
printf("DES未加载成功\n");
}
else
{
printf("DES加载成功!\n");
printf("ADD=0x%xh\n", pd);
}
char* outStr = (char*)malloc(sizeof(char) * 512);
char* inStr = "sa";
char* key = "M";
int mode = 1;
pd(inStr, key, outStr, mode);
//printf("%d", succ);
printf("%s", outStr);
FreeLibrary(loadLib);
getchar();
return 0;
}
#include
typedef int(__stdcall *pDES)(char* inStr, char* key, char* outStr, int);
int _tmain(int argc, _TCHAR* argv[])
{
HMODULE loadLib;
loadLib=LoadLibraryA("NetDiskDLL.dll");
if (loadLib == NULL){
printf("函数加载未成功!\n");
}
else{
printf("函数加载成功!\n");
printf("ADD=0x%xh\n", loadLib);
}
pDES pd;
pd = (pDES)::GetProcAddress(loadLib, "DES");
if (pd == NULL)
{
printf("DES未加载成功\n");
}
else
{
printf("DES加载成功!\n");
printf("ADD=0x%xh\n", pd);
}
char* outStr = (char*)malloc(sizeof(char) * 512);
char* inStr = "sa";
char* key = "M";
int mode = 1;
pd(inStr, key, outStr, mode);
//printf("%d", succ);
printf("%s", outStr);
FreeLibrary(loadLib);
getchar();
return 0;
}
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯