Пример #1
0
        private void PrintErrorMessage(int nRet)
        {
            IntPtr pszErrorMessage = Marshal.AllocCoTaskMem(256);

            KSJApiBase.KSJ_GetErrorInfo(nRet, pszErrorMessage);
            string strErrorMessage = Marshal.PtrToStringAnsi(pszErrorMessage);

            TextBox_ERROR_INFO.Text = strErrorMessage;
            Marshal.FreeCoTaskMem(pszErrorMessage);
        }