VC++
.h
_declspec(dllexport) void __stdcall Stringdccode(char * lhcode,char * lhdecode);
.cpp
void __stdcall Stringdccode(char * lhcode,char * lhdecode){
Base64 bs;
LPCTSTR stringcodet = lhdecode;
string strDecode = bs.base64_decode(stringcodet);
strcpy(lhcode,strDecode.c_str());
}
VB调用
Private Declare Sub Stringdccode Lib "FileCode.dll" (ByVal lhcodes As String,ByVal lhdecode As String)
Dim s As String s = String(255,Chr(0)) Stringdccode s,"suLK1Gh0dHA6Ly8xOTIuMTY4LjAuMTgwOjgwODAvaHAucGRmL7rOxfSy4srU" '' Debug.Print Left$(s,InStr(s,Chr(0)))
原文链接:https://www.f2er.com/vb/262924.html