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

📄 generalutils.h

📁 COM编程接口处理方法 多个方法调用COM库函数
💻 H
字号:

#ifndef _GENERALUTILS_H
#define _GENERALUTILS_H

const CComBSTR g_sExt(L".spt");
const CComBSTR g_sExtUpper(L".SPT");
const CComBSTR g_sShapeFieldName(L"Shape");

// Function name	: isDirectory
// Description	    : determine if the specified path is a directory or not
// Return type		: bool (return true if the specified path is a directoy false if not)
bool IsDirectory(LPCTSTR path);

// Function name	: returnFileExtension
// void returnFileExtension(LPCTSTR path, _TCHAR * extension);
void ReturnFileExtension(LPCTSTR path, BSTR * extension);

// Function name	: fileTypeExists
// Return type		: bool (true if file exists / false if not)
// Argument         : LPCTSTR dirpath (in format c:\temp)
// Argument         : LPCTSTR filter  (filter *.abc )
bool FileTypeExists(LPCTSTR dirpath, LPCTSTR filter);

// Function name	: fileExists
// Description	    : Return the existance of a file
// Return type		: bool (TRUE if exists FALSE if not)
bool FileExists(LPCTSTR filePath);

// Function name	: returnFilesystemPath
// Description	    : return the path part of a file name including the trailing slash
void ReturnFilesystemPath(BSTR fileLoc, BSTR * path);

// Function name	: returnFile
// Description	    : return the file from a provide path 'c:\temp\file.ext becomes' 'file.ext'
void ReturnFile(BSTR loc, BSTR * fileName);

#endif // _GENERALUTILS_H

⌨️ 快捷键说明

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