第一:
SetPrintport(strPort,iBaudrate);
DWORD dwRet = GetLastError();
CString strText(_T(""));
strText.Format(_T("%d"), dwRet);
cout<<strText;
第二:
SetInit();
DWORD dwRet = GetLastError();
CString strText(_T(""));
strText.Format(_T("%d"), dwRet);
cout<<strText;
这两个函数都是从dll中调用的,然而第一的SetPrintport没出错,第二的SetInit就出现Getlasterror 5 的拒绝访问的错误。。。。
调用SetInit函数之前是需要先调用SetPrintport函数,