c++builer的openglg的filename的最大长度被限制被260,怎么破?

楚男人dh哦 2013-07-05 04:18:29
OpenDlg->Filter = "文件类型:所有文件|*.*|文件类型:rvf文件|*.rvf";
OpenDlg->FilterIndex==1;

if (TsdModalHelper::Show(Handle,OpenDlg))
{
MessageBox(NULL,IntToStr(OpenDlg->FileName.Length()).c_str(),IntToStr(OpenDlg>FileName.Length()).c_str(),MB_OK) ;//这里260
sepk00209->Text=ExtractFileName(OpenDlg->FileName);
FFileName=ExtractFileName(OpenDlg->FileName);
sepk00209->Hint=ExtractFilePath(OpenDlg->FileName);
怎么办?还是hpp文件 米法改 也没有属性可以设置
...全文
65 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2013-07-05
  • 打赏
  • 举报
回复
CreateFile The CreateFile function creates or opens the following objects and returns a handle that can be used to access the object: files pipes mailslots communications resources disk devices (Windows NT only) consoles directories (open only) HANDLE CreateFile( LPCTSTR lpFileName, // pointer to name of the file DWORD dwDesiredAccess, // access (read-write) mode DWORD dwShareMode, // share mode LPSECURITY_ATTRIBUTES lpSecurityAttributes, // pointer to security attributes DWORD dwCreationDisposition, // how to create DWORD dwFlagsAndAttributes, // file attributes HANDLE hTemplateFile // handle to file with attributes to // copy ); Parameters lpFileName Pointer to a null-terminated string that specifies the name of the object (file, pipe, mailslot, communications resource, disk device, console, or directory) to create or open. If *lpFileName is a path, there is a default string size limit of MAX_PATH characters. This limit is related to how the CreateFile function parses paths. Windows NT: You can use paths longer than MAX_PATH characters by calling the wide (W) version of CreateFile and prepending "\\?\" to the path. The "\\?\" tells the function to turn off path parsing. This lets you use paths that are nearly 32,000 Unicode characters long. However, each component in the path cannot be more than MAX_PATH characters long. You must use fully-qualified paths with this technique. This also works with UNC names. The "\\?\" is ignored as part of the path. For example, "\\?\C:\myworld\private" is seen as "C:\myworld\private", and "\\?\UNC\tom_1\hotstuff\coolapps" is seen as "\\tom_1\hotstuff\coolapps". dwDesiredAccess Specifies the type of access to the object. An application can obtain read access, write access, read-write access, or device query access. This parameter can be any combination of the following values. Value Meaning 0 Specifies device query access to the object. An application can query device attributes without accessing the device. GENERIC_READ Specifies read access to the object. Data can be read from the file and the file pointer can be moved. Combine with GENERIC_WRITE for read-write access. GENERIC_WRITE Specifies write access to the object. Data can be written to the file and the file pointer can be moved. Combine with GENERIC_READ for read-write access. dwShareMode Set of bit flags that specifies how the object can be shared. If dwShareMode is 0, the object cannot be shared. Subsequent open operations on the object will fail, until the handle is closed. To share the object, use a combination of one or more of the following values: Value Meaning FILE_SHARE_DELETE Windows NT: Subsequent open operations on the object will succeed only if delete access is requested. FILE_SHARE_READ Subsequent open operations on the object will succeed only if read access is requested. FILE_SHARE_WRITE Subsequent open operations on the object will succeed only if write access is requested. lpSecurityAttributes Pointer to a SECURITY_ATTRIBUTES structure that determines whether the returned handle can be inherited by child processes. If lpSecurityAttributes is NULL, the handle cannot be inherited. Windows NT: The lpSecurityDescriptor member of the structure specifies a security descriptor for the object. If lpSecurityAttributes is NULL, the object gets a default security descriptor. The target file system must support security on files and directories for this parameter to have an effect on files. dwCreationDisposition Specifies which action to take on files that exist, and which action to take when files do not exist. For more information about this parameter, see the Remarks section. This parameter must be one of the following values: Value Meaning CREATE_NEW Creates a new file. The function fails if the specified file already exists. CREATE_ALWAYS Creates a new file. If the file exists, the function overwrites the file and clears the existing attributes. OPEN_EXISTING Opens the file. The function fails if the file does not exist. See the Remarks section for a discussion of why you should use the OPEN_EXISTING flag if you are using the CreateFile function for devices, including the console. OPEN_ALWAYS Opens the file, if it exists. If the file does not exist, the function creates the file as if dwCreationDisposition were CREATE_NEW. TRUNCATE_EXISTING Opens the file. Once opened, the file is truncated so that its size is zero bytes. The calling process must open the file with at least GENERIC_WRITE access. The function fails if the file does not exist. dwFlagsAndAttributes Specifies the file attributes and flags for the file. Any combination of the following attributes is acceptable for the dwFlagsAndAttributes parameter, except all other file attributes override FILE_ATTRIBUTE_NORMAL. Attribute Meaning FILE_ATTRIBUTE_ARCHIVE The file should be archived. Applications use this attribute to mark files for backup or removal. FILE_ATTRIBUTE_HIDDEN The file is hidden. It is not to be included in an ordinary directory listing. FILE_ATTRIBUTE_NORMAL The file has no other attributes set. This attribute is valid only if used alone. FILE_ATTRIBUTE_OFFLINE The data of the file is not immediately available. Indicates that the file data has been physically moved to offline storage. FILE_ATTRIBUTE_READONLY The file is read only. Applications can read the file but cannot write to it or delete it. FILE_ATTRIBUTE_SYSTEM The file is part of or is used exclusively by the operating system. FILE_ATTRIBUTE_TEMPORARY The file is being used for temporary storage. File systems attempt to keep all of the data in memory for quicker access rather than flushing the data back to mass storage. A temporary file should be deleted by the application as soon as it is no longer needed ……

64,644

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧