你是要获得system32目录。还是Program Files里的那个system啊 ?

解决方案 »

  1.   


    Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
    Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
    Public Sub GetSysFolders(WinSysPath As String, WinPath As String)    cValue = Space(260)
        eValue = GetSystemDirectory(cValue, Len(cValue)) 'get the path
        WinSysPath = Left(cValue, eValue)                'parse the path into the global string
        
        iValue = GetWindowsDirectory(cValue, Len(cValue)) 'get the path
        WinPath = Left(cValue, iValue)                    'parse the path to the global string
       
    End Sub
      

  2.   

    unruledboy:
    这个我试过,但是不可以,它默认的是找大写的System,我还是无法取得\WINNT\system32
      

  3.   

    应该不会吧,我刚试过,而且是试过n次了,我特地做了跟踪,还是去找Program Files\Common Files\System的