Windows cannot find 'C'. Make sure you typed the name correctly, and then try again.
#Region "Shell Execute" <Runtime.InteropServices.DllImport("shell32.dll")> _ Public Function ShellExecuteEx(ByRef lpExecInfo As SHELLEXECUTEINFO) As Boolean End Function Public Const SW_SHOW As Integer = 5 Public Const SEE_MASK_INVOKEIDLIST As UInteger = &HC Public Const SEE_MASK_NOCLOSEPROCESS As UInteger = &H40 Public Const SEE_MASK_FLAG_NO_UI As UInteger = &H400 <Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential)> _ Public Structure SHELLEXECUTEINFO Public cbSize As Integer Public fMask As Integer Public hwnd As IntPtr <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPTStr)> Public lpVerb As String <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPTStr)> Public lpFile As String <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPTStr)> Public lpParameters As String <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPTStr)> Public lpDirectory As String Dim nShow As Integer Dim hInstApp As IntPtr Dim lpIDList As IntPtr <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPTStr)> Public lpClass As String Public hkeyClass As IntPtr Public dwHotKey As Integer Public hIcon As IntPtr Public hProcess As IntPtr End Structure #End Region Dim fi As New IO.FileInfo("C:\InstallHistory.log") 'Code for opening the file properties Dim info As New SHELLEXECUTEINFO() info.cbSize = Runtime.InteropServices.Marshal.SizeOf(info) info.fMask = SEE_MASK_NOCLOSEPROCESS info.hwnd = Nothing info.lpVerb = Nothing info.lpFile = fi.FullName info.lpParameters = "" info.lpDirectory = Nothing info.nShow = SW_SHOW info.hInstApp = Nothing ShellExecuteEx(info) 'I have tried this also but same error info.cbSize = Runtime.InteropServices.Marshal.SizeOf(info) info.lpVerb = "properties" info.lpFile = fi.Name info.lpDirectory = fi.DirectoryName info.nShow = SW_SHOW info.fMask = SEE_MASK_INVOKEIDLIST ShellExecuteEx(info)
LPWStr
Public Function ShellExecuteExW(ByRef lpExecInfo As SHELLEXECUTEINFO) As Boolean
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)