⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 udiskdlg.h

📁 一个通过直接读取磁盘扇区的试验程序,对开发单片机读取U盘的程序员,可以了解FAT16的文件系统.
💻 H
字号:
// udiskDlg.h : header file
//

#if !defined(AFX_UDISKDLG_H__4259B184_C5BA_4C90_9B0D_B7BBF06EF367__INCLUDED_)
#define AFX_UDISKDLG_H__4259B184_C5BA_4C90_9B0D_B7BBF06EF367__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CUdiskDlg dialog

class CUdiskDlg : public CDialog
{
// Construction
public:
	int savefile(unsigned short first_clus,unsigned long file_length,CString File_name);
	unsigned short Find_next_clus(unsigned short now_clus );
	HANDLE hDevice;
	
	CUdiskDlg(CWnd* pParent = NULL);	// standard constructor
	HTREEITEM m_hRoot;
	unsigned long dbr_lba,fat1_lba,fdt_lba,data_lba,fat2_lba;
	typedef struct 
	{
		unsigned char	FileName[8];	//ofs:0.文件名
		unsigned char	ExtName[3];		//ofs:8.扩展名
		unsigned char	attribute;		//ofs:11.文件属性。典型值:存档(0x20),卷标(0x08),子目录(0x10)
		unsigned char	reserved[10];	//ofs:21.保留
		unsigned short	time;			//ofs:22.时间
		unsigned short	data;			//ofs:24.日期
		unsigned short	StartClus;		//ofs:26.开始簇号
		unsigned int	FileLength;		//ofs:28.文件长度
	} DIR_tag;
	void Get_dir_file( struct DIR_tag dir , HTREEITEM hitem);
//	struct  dbr * pdbr;
// Dialog Data
	//{{AFX_DATA(CUdiskDlg)
	enum { IDD = IDD_UDISK_DIALOG };
	CTreeCtrl	m_ctr_dir;
	CStatic	m_ctr_msg;
	CComboBox	m_u;
	long	m_sec_cnt;
	long	m_start_sec;
	CString	m_bps;
	CString	m_start_ser;
	CString	m_total_ser;
	CString	m_type;
	CString	m_fdt;
	CString	m_fat;
	CString	m_dbr;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CUdiskDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;
	// Generated message map functions
	//{{AFX_MSG(CUdiskDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButtonRead();
	afx_msg void OnButtonWrite();
	afx_msg void OnButtonReadDbr();
	afx_msg void OnButtonTest();
	afx_msg void OnBUTTONreadfile();
	afx_msg void OnBUTTONsavefile();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_UDISKDLG_H__4259B184_C5BA_4C90_9B0D_B7BBF06EF367__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -