C++编写动态链接库供VFP调用

这篇博客介绍了如何使用C++编写动态链接库(DLL),其中包含两个函数:enciphering和deciphering,分别用于字符串加密和解密。这些函数接受一个字符指针和一个整数密钥作为参数,并返回处理后的字符串。DLL编译完成后,可以被Visual FoxPro(VFP)应用程序调用来实现加密和解密功能。
摘要由CSDN通过智能技术生成

//C++代码 dll.h

#ifndef LIB_H
#define LIB_H
extern "C" _declspec(dllexport) char* enciphering(char *ch,int &key);
extern "C" _declspec(dllexport) char* deciphering(char *ch,int &key);
#endif

 

//C++代码 Sercret.cpp

#include <iostream>
#include "dll.h"
using namespace std;
char* enciphering(char *ch,int &key)
{
    char *str=new char[100];
    int i=0,x;
    bool decide=true;
    while(ch[i])
    {
        if(ch[i]>='a'&&ch[i]<='z')
        {
            x = ch[i] + i + key + 1;
            while(decide)
            {
                if(x>'z')
                    x-=26;
                else
                    decide=false;
            }
            decide=true;<

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
ReFox XI+ for VFP9 and all older versions ComPro (CZ) Jan Brebera info@refox.net jan.brebera@email.cz Seven steps to install ReFox XI+ 1. download ReFox XI+ files • ReFox_INST - download and save the .zip archive to your local disk - do not unpack it directly from the browser 2. create new folder for ReFox (e.g. "C:\ReFox XI+") and unpack the archive. Attention: Some zip-extractors (incl. the WinXP internal one) do not set the time of created file correctly and running ReFox.exe fails with error message: xxxxxxxx – Program violation In this case please use another extractor e.g. WinZip, pkunzip or Total Commander internal unzip 3. run ReFox.setup.exe to install ReFox 4. fill out your details in the form fill out the field 'Serial Number' do not change the fields 'Activation Key', modify the fields 'User name' and 'Company' if necessary after clicking 'OK' ReFox prepares data for generating the full activation key: created data sample: see ReFox.~~~ and ReFox~~~.zip files in your ReFox folder 5. send the data for generating activation key please create and send the e-mail message now (this version can send the data automatically) copy the text of ReFox.~~~ to the e-mail message body and the file ReFox~~~.zip send as an attachement 6. wait for sending the activation key back this can take several hours depending on daytime 7. copy the new activation key to ReFox folder and run ReFox.exe again Copyright © 1992-2007 by Jan Brebera, ComPro (CZ) ReFox is a property of its author - Jan Brebera Jan Brebera is holder of all rights regarding ReFox
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值