谁知道能随机生成二进制数字数千个的软件
发布网友
发布时间:2022-05-26 07:25
我来回答
共2个回答
热心网友
时间:2023-10-08 16:28
找这样现成的软件比较难找,但写一个这样的程序还是比较容易的.
热心网友
时间:2023-10-08 16:28
原型:
int WINAPI icePub_randomStrings(char *strIntergerBuff,int fromValue,int toValue,int num,char *fenge)
输入:fromValue 最小值
toValue 最大值
num 生成个数
fenge 分隔字符串
输出:strIntergerBuff num个随机数
返回码:
char buffer[1024*10];
buffer[0]=0;
typedef int (WINAPI ICEPUB_RANDOMSTRINGS)(char *strIntergerBuff,int fromValue,int toValue,int num,char *fenge);
ICEPUB_RANDOMSTRINGS *icePub_randomStrings = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_randomStrings = (ICEPUB_RANDOMSTRINGS *)GetProcAddress(hDLLDrv, "icePub_randomStrings");
}
if(icePub_randomStrings != NULL)
{
int a;
a=icePub_randomStrings(buffer,0,24,1500,"\r\n");
}
AfxMessageBox(buffer);
VB sample 代码:
Private Declare Function icePub_randomStrings Lib "icePubDll.dll" (ByVal strIntergerBuff As String, ByVal fromValue As Integer, ByVal toValue As Integer, ByVal num As Integer, ByVal strFenge As String) As Integer
str1 = Space(1024 * 30)
a=icePub_randomStrings(str1,0,24,1500,vbCrLf)
MsgBox str1