如我们在使用REGSVR32.exe注册控件时,如果这个控件的路径中有空格或者文件名太长,就会注册不成功,因为REGSVR32.exe不支持长文件名,下面的函数就是解决这样的类似的问题 '------------------------------------------------------------ Option Compare Database Private Declare Function GetShortPathName32 Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long Public Function getShortPath(ByVal strFullPath As String) As String Dim strShortPath As String strShortPath = Space(256) End Function |
|站长邮箱|小黑屋|手机版|Office中国/Access中国
( 粤ICP备10043721号-1 )
GMT+8, 2025-4-4 05:17 , Processed in 0.071022 second(s), 17 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.