l函數原型:
int WINAPI ice pub _ dictionary code transfer(char * strdictionary filename,char *strSrc,char *strCode)
輸入:strDictionaryFilename的字典文件名。
StrSrc待定詞
輸出:strCode strSrc對應的信息
返回代碼:
L VC連接庫模式語句
__declspec(dllexport)
int WINAPI ice pub _ dictionaryCodeTransfer(char * strDictionaryFilename,char *strSrc,char * strCode);
動態調用程序
VC示例代碼:
char strCode[1024];
typedef int(WINAPI ICEPUB _ DICTIONARYCODETRANSFER)(char * strDictionaryFilename,char *strSrc,char * strCode);
ICEPUB _ DICTIONARYCODETRANSFER * ICEPUB _ DICTIONARYCODETRANSFER = 0;
h instance hDLLDrv = LoadLibrary(" icepubdll . dll ");
中頻(hDLLDrv)
{
icePub _ dictionaryCodeTransfer =(icePub _ dictionaryCodeTransfer *)GetProcAddress(hDLLDrv," icePub _ dictionaryCodeTransfer ");
}
if(icePub _ dictionaryCodeTransfer)
IcePub_dictionaryCodeTransfer("漢英詞典。txt”,“I”,strCode);
中頻(hDLLDrv)
free library(hDLLDrv);
AfxMessagBox(strCode);
VB示例代碼:
private Declare Function icePub _ dictionaryCodeTransfer Lib“icepubdll . dll”(ByVal strDictionaryFilename為字符串,ByVal strSrc為字符串,ByVal strCode為字符串)作為整數
將a2標註為整數
Dim strCode作為字符串
strCode=Space(1024)
a2 = icepub _ dictionary code transfer("漢英詞典。txt "," I ",strCode)
MsgBox strCode
=============================
3.87 ice pub _ dictionaryCodeTransferString
批量轉換
l函數原型:
int WINAPI ice pub _ dictionaryCodeTransferString(char * strDictionaryFilename,char *strSrcString,char *strCode,int srcWordLen,char *strFenge)
輸入:strDictionaryFilename的字典文件名。
要處理的字符串
SrcWordLen要處理的單詞串中每個單詞的長度(意思是必須是固定長度)
strFenge strCode中的每個結果都分隔字符串。
輸出:strCode strSrcString對應的信息字符串。
返回代碼:
L VC連接庫模式語句
__declspec(dllexport)
int WINAPI ice pub _ dictionaryCodeTransferString(char * strDictionaryFilename,char *strSrcString,char *strCode,int srcWordLen,char * strFenge);
動態調用程序
VC示例代碼:
char strCode[1024];
typedef int(WINAPI ICEPUB _ DICTIONARYCODETRANSFERSTRING)(char * strDictionaryFilename,char *strSrcString,char *strCode,int srcWordLen,char * strFenge);
ice pub _ DICTIONARYCODETRANSFERSTRING * ice pub _ DICTIONARYCODETRANSFERSTRING = 0;
h instance hDLLDrv = LoadLibrary(" icepubdll . dll ");
中頻(hDLLDrv)
{
icePub _ dictionaryCodeTransferString =(icePub _ dictionaryCodeTransferString *)GetProcAddress(hDLLDrv," icePub _ dictionaryCodeTransferString ");
}
if(icePub _ dictionaryCodeTransferString)
icepub _ DictionaryCodeTransferString("內部代碼字典。txt”,“悲哀”,2,strCode,“”;
中頻(hDLLDrv)
free library(hDLLDrv);
AfxMessagBox(strCode);
VB示例代碼:
private Declare Function icePub _ dictionaryCodeTransferString Lib“icepubdll . dll”(ByVal strDictionaryFilename為字符串、ByVal strSrcString為字符串、ByVal srcWordLen為整數、ByVal strCode為字符串、ByVal strFenge為字符串)為整數
將a2標註為整數
Dim strCode作為字符串
strCode=Space(1024)
a2 = icepub _ dictionarycodetransferstring("內部代碼字典。txt ","陰雲",2,strocode,"")
MsgBox strCode
===========
拿著郵件。