Beispiel #1
0
        protected override bool InitFunctions()
        {
            d_NLPIR_Init = (D_NLPIR_Init)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_Init", typeof(D_NLPIR_Init));

            d_NLPIR_GetLastErrorMsg = (D_NLPIR_GetLastErrorMsg)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_GetLastErrorMsg", typeof(D_NLPIR_GetLastErrorMsg));

            d_NLPIR_ParagraphProcess = (D_NLPIR_ParagraphProcess)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_ParagraphProcess", typeof(D_NLPIR_ParagraphProcess));

            d_NLPIR_FileProcess = (D_NLPIR_FileProcess)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_FileProcess", typeof(D_NLPIR_FileProcess));

            d_NLPIR_FinerSegment = (D_NLPIR_FinerSegment)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_FinerSegment", typeof(D_NLPIR_FinerSegment));

            d_NLPIR_GetKeyWords = (D_NLPIR_GetKeyWords)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_GetKeyWords", typeof(D_NLPIR_GetKeyWords));

            d_NLPIR_GetFileKeyWords = (D_NLPIR_GetFileKeyWords)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_GetFileKeyWords", typeof(D_NLPIR_GetFileKeyWords));

            d_NLPIR_GetNewWords = (D_NLPIR_GetNewWords)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_GetNewWords", typeof(D_NLPIR_GetNewWords));

            d_NLPIR_GetFileNewWords = (D_NLPIR_GetFileNewWords)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_GetFileNewWords", typeof(D_NLPIR_GetFileNewWords));

            d_NLPIR_AddUserWord = (D_NLPIR_AddUserWord)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_AddUserWord", typeof(D_NLPIR_AddUserWord));

            d_NLPIR_ImportUserDict = (D_NLPIR_ImportUserDict)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_ImportUserDict", typeof(D_NLPIR_ImportUserDict));

            d_NLPIR_Exit = (D_NLPIR_Exit)DllWrapper.GetFunctionAddress(
                 DllWrapper.hModule, "NLPIR_Exit", typeof(D_NLPIR_Exit));

            d_NLPIR_ImportKeyBlackList = (D_NLPIR_ImportKeyBlackList)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_ImportKeyBlackList", typeof(D_NLPIR_ImportKeyBlackList));

            d_NLPIR_FingerPrint = (D_NLPIR_FingerPrint)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_FingerPrint", typeof(D_NLPIR_FingerPrint));

            d_NLPIR_GetWordPOS = (D_NLPIR_GetWordPOS)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_GetWordPOS", typeof(D_NLPIR_GetWordPOS));

            d_NLPIR_IsWord = (D_NLPIR_IsWord)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_IsWord", typeof(D_NLPIR_IsWord));

            d_NLPIR_WordFreqStat = (D_NLPIR_WordFreqStat)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_WordFreqStat", typeof(D_NLPIR_WordFreqStat));

            d_NLPIR_FileWordFreqStat = (D_NLPIR_FileWordFreqStat)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_FileWordFreqStat", typeof(D_NLPIR_FileWordFreqStat));

            d_NLPIR_GetEngWordOrign = (D_NLPIR_GetEngWordOrign)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_GetEngWordOrign", typeof(D_NLPIR_GetEngWordOrign));

            d_NLPIR_SaveTheUsrDic = (D_NLPIR_SaveTheUsrDic)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_SaveTheUsrDic", typeof(D_NLPIR_SaveTheUsrDic));

            d_NLPIR_DelUsrWord = (D_NLPIR_DelUsrWord)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_DelUsrWord", typeof(D_NLPIR_DelUsrWord));

            if (d_NLPIR_Init == null || d_NLPIR_GetLastErrorMsg == null || d_NLPIR_ParagraphProcess == null || d_NLPIR_FileProcess == null
                || d_NLPIR_FinerSegment == null || d_NLPIR_GetKeyWords == null || d_NLPIR_GetFileKeyWords == null || d_NLPIR_GetNewWords == null
                || d_NLPIR_GetFileNewWords == null || d_NLPIR_AddUserWord == null || d_NLPIR_ImportUserDict == null || d_NLPIR_Exit == null
                || d_NLPIR_ImportKeyBlackList == null || d_NLPIR_FingerPrint == null || d_NLPIR_GetWordPOS == null || d_NLPIR_IsWord == null
                || d_NLPIR_WordFreqStat == null || d_NLPIR_FileWordFreqStat == null || d_NLPIR_GetEngWordOrign == null || d_NLPIR_DelUsrWord == null)
            {
                return false;
            }
            else
            {
                return true;
            }

        }
Beispiel #2
0
        protected override bool InitFunctions()
        {
            d_NLPIR_Init = (D_NLPIR_Init)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_Init", typeof(D_NLPIR_Init));

            d_NLPIR_GetLastErrorMsg = (D_NLPIR_GetLastErrorMsg)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_GetLastErrorMsg", typeof(D_NLPIR_GetLastErrorMsg));

            d_NLPIR_ParagraphProcess = (D_NLPIR_ParagraphProcess)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_ParagraphProcess", typeof(D_NLPIR_ParagraphProcess));

            d_NLPIR_FileProcess = (D_NLPIR_FileProcess)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_FileProcess", typeof(D_NLPIR_FileProcess));

            d_NLPIR_FinerSegment = (D_NLPIR_FinerSegment)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_FinerSegment", typeof(D_NLPIR_FinerSegment));

            d_NLPIR_GetKeyWords = (D_NLPIR_GetKeyWords)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_GetKeyWords", typeof(D_NLPIR_GetKeyWords));

            d_NLPIR_GetFileKeyWords = (D_NLPIR_GetFileKeyWords)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_GetFileKeyWords", typeof(D_NLPIR_GetFileKeyWords));

            d_NLPIR_GetNewWords = (D_NLPIR_GetNewWords)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_GetNewWords", typeof(D_NLPIR_GetNewWords));

            d_NLPIR_GetFileNewWords = (D_NLPIR_GetFileNewWords)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_GetFileNewWords", typeof(D_NLPIR_GetFileNewWords));

            d_NLPIR_AddUserWord = (D_NLPIR_AddUserWord)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_AddUserWord", typeof(D_NLPIR_AddUserWord));

            d_NLPIR_ImportUserDict = (D_NLPIR_ImportUserDict)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_ImportUserDict", typeof(D_NLPIR_ImportUserDict));

            d_NLPIR_Exit = (D_NLPIR_Exit)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_Exit", typeof(D_NLPIR_Exit));

            d_NLPIR_ImportKeyBlackList = (D_NLPIR_ImportKeyBlackList)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_ImportKeyBlackList", typeof(D_NLPIR_ImportKeyBlackList));

            d_NLPIR_FingerPrint = (D_NLPIR_FingerPrint)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_FingerPrint", typeof(D_NLPIR_FingerPrint));

            d_NLPIR_GetWordPOS = (D_NLPIR_GetWordPOS)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_GetWordPOS", typeof(D_NLPIR_GetWordPOS));

            d_NLPIR_IsWord = (D_NLPIR_IsWord)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_IsWord", typeof(D_NLPIR_IsWord));

            d_NLPIR_WordFreqStat = (D_NLPIR_WordFreqStat)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_WordFreqStat", typeof(D_NLPIR_WordFreqStat));

            d_NLPIR_FileWordFreqStat = (D_NLPIR_FileWordFreqStat)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_FileWordFreqStat", typeof(D_NLPIR_FileWordFreqStat));

            d_NLPIR_GetEngWordOrign = (D_NLPIR_GetEngWordOrign)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_GetEngWordOrign", typeof(D_NLPIR_GetEngWordOrign));

            d_NLPIR_SaveTheUsrDic = (D_NLPIR_SaveTheUsrDic)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_SaveTheUsrDic", typeof(D_NLPIR_SaveTheUsrDic));

            d_NLPIR_DelUsrWord = (D_NLPIR_DelUsrWord)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "NLPIR_DelUsrWord", typeof(D_NLPIR_DelUsrWord));

            if (d_NLPIR_Init == null || d_NLPIR_GetLastErrorMsg == null || d_NLPIR_ParagraphProcess == null || d_NLPIR_FileProcess == null ||
                d_NLPIR_FinerSegment == null || d_NLPIR_GetKeyWords == null || d_NLPIR_GetFileKeyWords == null || d_NLPIR_GetNewWords == null ||
                d_NLPIR_GetFileNewWords == null || d_NLPIR_AddUserWord == null || d_NLPIR_ImportUserDict == null || d_NLPIR_Exit == null ||
                d_NLPIR_ImportKeyBlackList == null || d_NLPIR_FingerPrint == null || d_NLPIR_GetWordPOS == null || d_NLPIR_IsWord == null ||
                d_NLPIR_WordFreqStat == null || d_NLPIR_FileWordFreqStat == null || d_NLPIR_GetEngWordOrign == null || d_NLPIR_DelUsrWord == null)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }