修改RS232通信
This commit is contained in:
@@ -5,4 +5,20 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
CString GetAppPath(void)
|
||||
{
|
||||
CWinApp* pApp=AfxGetApp();
|
||||
if(pApp==0)
|
||||
return _T("");
|
||||
|
||||
TCHAR buf[256];
|
||||
GetModuleFileName(0,buf,256);
|
||||
|
||||
CString sAppPath(buf);
|
||||
int nPos=sAppPath.ReverseFind('\\');
|
||||
if(nPos)
|
||||
sAppPath=sAppPath.Left(nPos);
|
||||
return sAppPath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user