SetupComm, PurgeComm Function
SetupComm function
_In_ HANDLE hFile,
_In_ DWORD dwInQueue,
_In_ DWORD dwOutQueue
);
지정된 통신 장치의 통신 파라메타를 초기화
입출력 버퍼의 크기를 정한다.
Parameters
- hFile [in]
-
A handle to the communications device. The CreateFile function returns this handle.
- dwInQueue [in]
-
The recommended size of the device's internal input buffer, in bytes.
- dwOutQueue [in]
-
The recommended size of the device's internal output buffer, in bytes.
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
참조 : https://msdn.microsoft.com/en-us/library/windows/desktop/aa363439(v=vs.85).aspx
PurgeComm function
_In_ HANDLE hFile,
_In_ DWORD dwFlags
);
특정한 통신 자원의 입출력 버퍼의 모든 데이터를 삭제한다.
보류된 입출력 함수의 자원을 종료시킨다.
Parameters
- hFile [in]
-
A handle to the communications resource. The CreateFile function returns this handle.
- dwFlags [in]
-
이 매개변수는 1개 이상 올 수 있음
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
참조 : https://msdn.microsoft.com/en-us/library/windows/desktop/aa363428(v=vs.85).aspx