VC++(MFC) CFile 寫入/讀取 二進位檔

VC++(MFC) CFile 寫入/讀取 二進位檔

VC++(MFC) CFile 寫入/讀取 二進位檔

 

CFile m_File;
m_File.Open( m_strFilePath,CFile::modeCreate | CFile::modeWrite | CFile::typeBinary);
m_File.Write( gbyTemplate, s_MouldeInfo.m_nTemplateSize);
m_File.Close();

//————-

CFile m_File;
m_File.Open( m_strFilePath,CFile::modeRead | CFile::typeBinary);
int nLength = m_File.GetLength();
m_File.Read( gbyTemplate, nLength);
m_File.Close();

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *