int OpenPort(CString port); void ClosePort(void); UINT ReadPort(UINT len, BYTE* data); int ProcessData(UINT len, BYTE* data, int& count, int*& times, short int*& counts, UINT& freq); UINT WriteFile(CString file_name, int count, int* times, short int* counts);