how find name of default app for file extension (OpenInsight 32-bit)
At 12 APR 2024 02:28:36AM Barry Stevens wrote:
How can I get the name of the windows default app for a given file extension?
I do believe it is in the registry, but, not sure how to format the command that I need.
At 12 APR 2024 04:13AM Carl Pates wrote:
Try the SYSTEM FINDEXE method
At 12 APR 2024 04:36PM Barry Stevens wrote:
Try the SYSTEM FINDEXE method
Brilliant - this works in OI10, is there a similar function in OI9
At 12 APR 2024 05:02PM Carl Pates wrote:
The docs for that method mention the WIndows API function that it wraps, so you coudl use the latter in v9.
At 12 APR 2024 05:09PM Barry Stevens wrote:
The docs for that method mention the WIndows API function that it wraps, so you coudl use the latter in v9.
Yep, saw that, now working on it.
appears has not been declared.
I see it in "DLL_WINAPI_SHELL32" with a lot of others that I know are currently used, so, will do run DECLARE_FCNS "DLL_WINAPI_SHELL32" and hope I dont break anything!!
At 12 APR 2024 05:56PM Barry Stevens wrote:
The docs for that method mention the WIndows API function that it wraps, so you coudl use the latter in v9.
Yep, saw that, now working on it.
appears has not been declared.
I see it in "DLL_WINAPI_SHELL32" with a lot of others that I know are currently used, so, will do run DECLARE_FCNS "DLL_WINAPI_SHELL32" and hope I dont break anything!!
Git it working now in OI9, thanks.
#ifndef REVENG64 // Compiled in v9 declare function ShellExecuteA declare subroutine winapi_FindExecutableW execname = str(' ',255) xFile =file[-1,"B\"]:\00\ xdirectory =file[1,col1()]:\00\ WinApi_FindExecutableW(xfile,xdirectory,execname) if indexc(ExecName[-1,"B\"],'mspaint',1) then xVerb ='edit' end return ShellExecuteA( hwnd, xVerb, file, parameters, directory, nShow ) #endif