Skip to content

Commit

Permalink
✅Release 1.5.6.1 for QTQuick & PInvoke
Browse files Browse the repository at this point in the history
  • Loading branch information
indiff committed Jan 10, 2024
1 parent a64cc10 commit ad3ecc2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 15 deletions.
34 changes: 20 additions & 14 deletions Plugins/QTQuick/QTQuick.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public void OnDropDownOpening(ToolStripDropDownMenu menu) {
// menu.Items.Add(new ToolStripMenuItem("设置当前目录ANT_HOME"));
// menu.Items.Add(new ToolStripMenuItem("设置当前目录MVND_HOME"));

menu.Items.Add(new ToolStripMenuItem("启动设置Path"));
menu.Items.Add(new ToolStripMenuItem("设置Path"));
menu.Items.Add(new ToolStripMenuItem("删除QTTabGroup(启动项)"));
menu.Items.Add(new ToolStripMenuItem("打开QTTabBar异常日志"));

Expand Down Expand Up @@ -706,21 +706,27 @@ public void OnDropDownItemClick(ToolStripItem item, MouseButtons mouseButton) {
exePath = @"H:\ProgramData\QTTabBar\SetHome.exe";
}


if (File.Exists(exePath))
{
var process = new Process
{
StartInfo =
{
WorkingDirectory = selectedPath,
UseShellExecute = true,
FileName = exePath,
CreateNoWindow = true,
Verb = "runas"
}
};
process.Start();
try
{
var process = new Process
{
StartInfo =
{
WorkingDirectory = selectedPath,
UseShellExecute = true,
FileName = exePath,
CreateNoWindow = true,
Verb = "runas"
}
};
process.Start();
}
catch (Exception e)
{
QTUtility2.MakeErrorLog(e, "Setting Path");
}

/*new Thread(() =>
{
Expand Down
8 changes: 7 additions & 1 deletion QTTabBar/Interop/IShellView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ public interface IShellView {
int SaveViewState();
[PreserveSig]
int SelectItem(IntPtr pidlItem, SVSIF uFlags);
void GetItemObject(uint uItem, ref Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppv);
// void GetItemObject(uint uItem, ref Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppv);

[PreserveSig]
QTTabBarLib.Common.HResult GetItemObject(
uint uItem,
ref Guid riid,
[MarshalAs(UnmanagedType.IUnknown)] out object ppv);
}
}
4 changes: 4 additions & 0 deletions QTTabBar/Interop/PInvoke.cs
Original file line number Diff line number Diff line change
Expand Up @@ -646,5 +646,9 @@ public static extern IntPtr DefWindowProc(
int Msg,
IntPtr wParam,
IntPtr lParam);


[DllImport("ntdll.dll", SetLastError = true)]
static extern int NtQueryInformationProcess(IntPtr processHandle, int processInformationClass, IntPtr processInformation, uint processInformationLength, IntPtr returnLength);
}
}

0 comments on commit ad3ecc2

Please sign in to comment.