MakeMetaFile.h
资源名称:GGBT.rar [点击查看]
上传用户:lds876
上传日期:2013-05-25
资源大小:567k
文件大小:2k
源码类别:
P2P编程
开发平台:
Visual C++
- // MakeMetaFile.h: interface for the CMakeMetaFile class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_MAKEMETAFILE_H__ED8343D5_9AB9_41A1_B9A8_A63CDD30BD6D__INCLUDED_)
- #define AFX_MAKEMETAFILE_H__ED8343D5_9AB9_41A1_B9A8_A63CDD30BD6D__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class CVal;
- #define MAKE_METAFILE_PROGRESS (WM_USER+2089)
- #define MAKE_METAFILE_FINISHED (WM_USER+2090)
- class CMakeMetaFile
- {
- class CSubFilesItem
- {
- public:
- CSubFilesItem(CVal* pPathList, string strPath)
- {
- m_pPathList = pPathList;
- m_strPath = strPath;
- }
- CVal* m_pPathList ;
- string m_strPath;
- };
- typedef vector<CSubFilesItem> CSubFilesList;
- public:
- CMakeMetaFile();
- virtual ~CMakeMetaFile();
- bool IsMaking();
- bool Close();
- bool FormatSaveAS(string strFilePath, string& strToSavePath);
- bool MakeMetaFileEx(string strFilePath, string strSaveAs, string strUrl, string strComment, long lPieceLenExp, HWND hWnd);
- bool GetResult() const;
- string GetErrorMsg() const;
- string GetSavePath() const;
- string GetSrcPath() const;
- private:
- static DWORD WINAPI MakeMetaFiledProc(void *pParam);
- void MakeMetaFiledProcEx();
- bool MakeMetaFile();
- bool GetName(string strFilePath, string& strName);
- static bool SubFiles(string strPath, vector<string> vSubPaths, CSubFilesList& SubFilesList, HANDLE hevDone);
- CVal* makeinfo(string strFilePath, long lPieceLength );
- void ProgressInfo(float fPercent);
- HANDLE m_hevDone;
- HANDLE m_hThreadDone;
- string m_strFilePath;
- string m_strSaveAs;
- string m_strUrl;
- string m_strComment;
- long m_lPieceLenExp;
- HWND m_hWnd;
- bool m_bResult;
- string m_strErr;
- };
- #endif // !defined(AFX_MAKEMETAFILE_H__ED8343D5_9AB9_41A1_B9A8_A63CDD30BD6D__INCLUDED_)