From 78cc398e3085631664eaae89a10694dca2b66380 Mon Sep 17 00:00:00 2001 From: Maxim Logaev Date: Mon, 10 Jun 2024 01:08:22 +0300 Subject: [PATCH] Use pointer to int as HINSTANCE for ShellExecuteA Signed-off-by: Maxim Logaev --- libdino/src/service/util.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libdino/src/service/util.vala b/libdino/src/service/util.vala index 496994c8..22708c74 100644 --- a/libdino/src/service/util.vala +++ b/libdino/src/service/util.vala @@ -6,7 +6,7 @@ namespace Dino { public class Util { #if _WIN32 [CCode (cname = "ShellExecuteA", cheader_filename = "windows.h")] - private static extern int ShellExecuteA(int* hwnd, string operation, string file, string parameters, string directory, int showCmd); + private static extern int* ShellExecuteA(int* hwnd, string operation, string file, string parameters, string directory, int showCmd); [CCode (cname = "CoInitialize", cheader_filename = "windows.h")] private static extern int CoInitialize(void* reserved); @@ -14,7 +14,7 @@ public class Util { [CCode (cname = "CoUninitialize", cheader_filename = "windows.h")] private static extern void CoUninitialize(); - private static int ShellExecute(string operation, string file) { + private static int* ShellExecute(string operation, string file) { CoInitialize(null); var result = ShellExecuteA(null, operation, file, null, null, 1); CoUninitialize();