windows - Maximum Path Length Limitation

Maximum Path Length Limitation

In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character. For example, the maximum path on drive D is "D:\some 256-character path string<NUL>" where "<NUL>" represents the invisible terminating null character for the current system codepage. (The characters < > are used here for visual clarity and cannot be part of a valid path string.)

Note  File I/O functions in the Windows API convert "/" to "\" as part of converting the name to an NT-style name, except when using the "\\?\" prefix as detailed in the following sections.

The Windows API has many functions that also have Unicode versions to permit an extended-length path for a maximum total path length of 32,767 characters. This type of path is composed of components separated by backslashes, each up to the value returned in the lpMaximumComponentLength parameter of theGetVolumeInformation function (this value is commonly 255 characters). To specify an extended-length path, use the "\\?\" prefix. For example, "\\?\D:\very long path".

Note  The maximum path of 32,767 characters is approximate, because the "\\?\" prefix may be expanded to a longer string by the system at run time, and this expansion applies to the total length.

The "\\?\" prefix can also be used with paths constructed according to the universal naming convention (UNC). To specify such a path using UNC, use the "\\?\UNC\" prefix. For example, "\\?\UNC\server\share", where "server" is the name of the computer and "share" is the name of the shared folder. These prefixes are not used as part of the path itself. They indicate that the path should be passed to the system with minimal modification, which means that you cannot use forward slashes to represent path separators, or a period to represent the current directory, or double dots to represent the parent directory. Because you cannot use the "\\?\" prefix with a relative path, relative paths are always limited to a total of MAX_PATH characters.

There is no need to perform any Unicode normalization on path and file name strings for use by the Windows file I/O API functions because the file system treats path and file names as an opaque sequence of WCHARs. Any normalization that your application requires should be performed with this in mind, external of any calls to related Windows file I/O API functions.

When using an API to create a directory, the specified path cannot be so long that you cannot append an 8.3 file name (that is, the directory name cannot exceedMAX_PATH minus 12).

The shell and the file system have different requirements. It is possible to create a path with the Windows API that the shell user interface is not able to interpret properly.

http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: ST Motor FOC库中的Circle Limitation功能是一种用于电机控制的功能。它主要用于限制电机运动范围,确保电机在特定圆内运动。这个功能的设计初衷是为了避免电机在运行过程中超出特定半径的范围,从而保护电机及其驱动系统。 使用Circle Limitation功能时,首先需要定义一个半径,表示电机在运动过程中所允许的最大范围。当电机开始运行时,控制算法会监测电机位置,并通过调整电机的控制信号来确保电机保持在定义的圆内。 具体而言,Circle Limitation功能通过控制电机的速度和加速度来达到限制电机运动范围的目的。一旦电机接近或超出了定义的圆半径,控制算法会减小电机的速度或加速度,使电机返回到圆内。这个过程是自动进行的,无需人为干预。 Circle Limitation功能在许多应用中都很有用,特别是在需要限制电机运动范围的场景下。比如在机器人控制中,当电机控制机器人的手臂或移动平台时,该功能可以确保机器人不会超出特定范围,从而防止机械部件的碰撞或损坏。 总之,ST Motor FOC库中的Circle Limitation功能是一种用于限制电机运动范围的控制功能,通过调整电机的控制信号来确保电机保持在定义的圆内,以保护电机及其驱动系统的安全运行。 ### 回答2: ST Motor FOC库中的Circle Limitation(圆限制)功能是一种用于控制电机转动的特殊功能。圆限制功能主要用于保持电机在特定范围内旋转,避免超过设定的限制范围。 Circle Limitation功能通常在机器人、无人机和电动车等应用中使用。在这些应用中,电机通常需要在特定的路径或轨迹中移动,并且不能超出规定的圆形工作区域。 使用Circle Limitation功能,我们可以在代码中指定电机的工作区域的半径和中心坐标。电机控制系统将会监测电机的位置,一旦电机越过设定的工作区域,控制系统就会采取措施将电机强制限制在工作区域内。 Circle Limitation功能通过使用电机的位置反馈来实现。电机控制系统会持续测量电机的位置,并与设定的工作区域进行比较。如果电机的位置超出了工作区域,控制系统将会调整电机的速度和/或方向,确保电机继续在限制范围内运动。 使用Circle Limitation功能,我们可以有效地控制电机在预定的圆形区域内运动。这对于需要精确控制电机的应用非常重要,因为它可以防止电机超过规定的工作区域,从而保护设备和提供更稳定的性能。 总而言之,ST Motor FOC库中的Circle Limitation功能是一种用于控制电机旋转范围的特殊功能,可以保持电机在指定的工作区域内移动。它通过监测电机的位置并调整电机的速度和方向,以确保电机始终保持在限制范围内。 ### 回答3: ST Motor FOC库中的Circle Limitation功能是一种电机控制功能,旨在限制电机运行时的速度。它可以通过限制电机的速度范围来保护电机和驱动器。具体来说,Circle Limitation功能可以将电机的转速限制在一个设定的范围内,防止超过设定范围导致电机受损。 Circle Limitation功能的原理是通过对电机的电流控制,来限制电机的转速。当电机的转速接近或超过限制范围时,控制算法会自动调整电机的电流控制使其保持在限制范围内。这样一来,即使在高负载或者异常情况下,电机也能保持在安全的转速范围内。 通过Circle Limitation功能,用户可以设置电机的最大和最小转速限制,以满足特定应用的需求。当电机的运行速度超过最大转速限制时,系统将自动降低电机的输出电流,从而限制电机的转速。当电机的运行速度低于最小转速限制时,系统将自动增加电机的输出电流,以提供足够的扭矩将电机带动起来。 总结来说,Circle Limitation功能是ST Motor FOC库中的一项重要功能,可以提供对电机转速的限制和保护。它通过控制电机的电流,保持电机的转速在一个设定的范围内,避免了转速过高或过低对电机和驱动器的损坏。这项功能可以根据应用需求进行设置和调整,为电机的安全和稳定运行提供保障。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值