示例#1
0
文件: Summary.cs 项目: Eliaine/NLPIR
        protected override bool InitFunctions()
        {
            d_DS_Init = (D_DS_Init)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "DS_Init", typeof(D_DS_Init));

            d_DS_SingleDoc = (D_DS_SingleDoc)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "DS_SingleDoc", typeof(D_DS_SingleDoc));

            d_DS_Exit = (D_DS_Exit)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "DS_Exit", typeof(D_DS_Exit));

            d_DS_GetLastErrMsg = (D_DS_GetLastErrMsg)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "DS_GetLastErrMsg", typeof(D_DS_GetLastErrMsg));

            if (d_DS_Init == null || d_DS_SingleDoc == null
                || d_DS_Exit == null || d_DS_GetLastErrMsg == null)
            {
                return false;
            }

            return true;
        }
示例#2
0
        protected override bool InitFunctions()
        {
            d_DS_Init = (D_DS_Init)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "DS_Init", typeof(D_DS_Init));

            d_DS_SingleDoc = (D_DS_SingleDoc)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "DS_SingleDoc", typeof(D_DS_SingleDoc));

            d_DS_Exit = (D_DS_Exit)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "DS_Exit", typeof(D_DS_Exit));

            d_DS_GetLastErrMsg = (D_DS_GetLastErrMsg)DllWrapper.GetFunctionAddress(
                DllWrapper.hModule, "DS_GetLastErrMsg", typeof(D_DS_GetLastErrMsg));

            if (d_DS_Init == null || d_DS_SingleDoc == null ||
                d_DS_Exit == null || d_DS_GetLastErrMsg == null)
            {
                return(false);
            }

            return(true);
        }