Y
YXQ
I want to get image path(c:\windows\system\regsvr32.exe) from full
path(c:\windows\system\regsvr32.exe /u aaa.dll) using API PathRemoveArgsA,
but the function returned args(/u aaa.dll) but no the image
path(c:\windows\system\regsvr32.exe) on Windows Vista. And the function
PathGetArgs returned also args(/u aaa.dll), why? the code is below:
///////////////////////////////////////////////////////
Private Declare Function PathRemoveArgs Lib "shlwapi.dll" Alias
"PathRemoveArgsA" (ByVal pszPath As String) As String
Private Declare Function PathGetArgs Lib "shlwapi.dll" Alias
"PathGetArgsA" (ByVal pszPath As String) As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim strOutBuffer As String = "c:\windows\system\regsvr32.exe /u
aaa.dll"
MessageBox.Show(PathRemoveArgs(strOutBuffer))
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Dim strOutBuffer As String = "c:\windows\system\regsvr32.exe /u
aaa.dll"
MessageBox.Show(PathGetArgs(strOutBuffer))
End Sub
path(c:\windows\system\regsvr32.exe /u aaa.dll) using API PathRemoveArgsA,
but the function returned args(/u aaa.dll) but no the image
path(c:\windows\system\regsvr32.exe) on Windows Vista. And the function
PathGetArgs returned also args(/u aaa.dll), why? the code is below:
///////////////////////////////////////////////////////
Private Declare Function PathRemoveArgs Lib "shlwapi.dll" Alias
"PathRemoveArgsA" (ByVal pszPath As String) As String
Private Declare Function PathGetArgs Lib "shlwapi.dll" Alias
"PathGetArgsA" (ByVal pszPath As String) As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim strOutBuffer As String = "c:\windows\system\regsvr32.exe /u
aaa.dll"
MessageBox.Show(PathRemoveArgs(strOutBuffer))
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Dim strOutBuffer As String = "c:\windows\system\regsvr32.exe /u
aaa.dll"
MessageBox.Show(PathGetArgs(strOutBuffer))
End Sub