ILaunchSourceAppUserModelId::GetAppUserModelId
https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ilaunchsourceappusermodelid-getappusermodelid
ComObj := ComObject(CLSID , IID)
Where should I find CLSID and IID?
Unable to search on Google
Where to find CLSID, IID
Re: Where to find CLSID, IID
CLSID
Additional CLSIDs may be found in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID.
-
- Posts: 4411
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: Where to find CLSID, IID
@gekunfei
https://www.magnumdb.com/
https://www.magnumdb.com/search?q=*LaunchSourceAppUserModelId
@thqby
I tried to install ILSpy, however: .NET 8.0 was also installed. What could be the problem?
Other constants are found, but sometimes in this form:
https://www.magnumdb.com/
https://www.magnumdb.com/search?q=*LaunchSourceAppUserModelId
@thqby
I tried to install ILSpy, however: .NET 8.0 was also installed. What could be the problem?
Other constants are found, but sometimes in this form:
Re: Where to find CLSID, IID
https://www.nuget.org/packages/Microsoft.Windows.SDK.Win32Metadata/
You need to download the metadata file and open it in ILSpy.
The guid is not defined in the metadata of your search.
You need to download the metadata file and open it in ILSpy.
The guid is not defined in the metadata of your search.
-
- Posts: 4411
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: Where to find CLSID, IID
Thanks, figured it out, it's all showing up now!
Re: Where to find CLSID, IID
Thank you to all those who have provided assistance
Re: Where to find CLSID, IID
@thqby @teadrinker
sid := "{2ce78010-74db-48bc-9c6a-10f372495723}"
iid := "{989191ac-28ff-4cf0-9584-e0d078bc2396}"
obj := ComObject(sid, iid)
error (0x80040154) 没有注册类
Windows.Win32.Foundation.Metadata.Guid(2559676844u, 10495, 19696, 149, 132, 224, 208, 120, 188, 35, 150)
ILaunchSourceAppUserModelId
Guid(753369104u, 29915, 18620, 156, 106, 16, 243, 114, 73, 87, 35)
SID_LaunchSourceAppUserModelId
How to convert this Guid into something that can be used in ahk?
sid := "{2ce78010-74db-48bc-9c6a-10f372495723}"
iid := "{989191ac-28ff-4cf0-9584-e0d078bc2396}"
obj := ComObject(sid, iid)
error (0x80040154) 没有注册类
Windows.Win32.Foundation.Metadata.Guid(2559676844u, 10495, 19696, 149, 132, 224, 208, 120, 188, 35, 150)
ILaunchSourceAppUserModelId
Guid(753369104u, 29915, 18620, 156, 106, 16, 243, 114, 73, 87, 35)
SID_LaunchSourceAppUserModelId
How to convert this Guid into something that can be used in ahk?
-
- Posts: 4411
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: Where to find CLSID, IID
Code: Select all
#Requires AutoHotkey v2
str1 := 'Windows.Win32.Foundation.Metadata.Guid(2559676844u, 10495, 19696, 149, 132, 224, 208, 120, 188, 35, 150)'
str2 := 'Guid(753369104u, 29915, 18620, 156, 106, 16, 243, 114, 73, 87, 35)'
str3 := 'GUID ExampleGUID = {0x12345678, 0x1234, 0x5678, {0x12, 0x34, 0x56, 0x78, 0x12, 0x34, 0x56, 0x78}};'
MsgBox GuidByteArrayToCanonical(str1) . '`n'
. GuidByteArrayToCanonical(str2) . '`n'
. GuidByteArrayToCanonical(str3)
GuidByteArrayToCanonical(guidByteArray) {
guidByteArray := StrReplace(guidByteArray, 'byte.MaxValue', '255')
RegExMatch(guidByteArray, 'i)((?:0x)?[\da-f]+)u?' . RepeatStr(',\s?\{?((?1))', 10), &m)
try {
sGuid := Format("{{2:08X}-{:04X}-{:04X}-{:02X}{:02X}-" . RepeatStr('{:02X}', 6) . "}", m*)
if !RegExMatch(sGuid, '([\dA-F]){8}(-(?1){4})(?2)(?2)-(?1){12}') {
throw Error()
}
return "'" . sGuid . "'"
} catch {
MsgBox 'Could not find inline correct representation of GUID as a byte array'
}
RepeatStr(str, count) => StrReplace(Format('{:' . count . '}', ''), ' ', str)
}
In this case, the problem is that you need the CLSID, not the SID.
Last edited by teadrinker on 24 May 2024, 08:43, edited 1 time in total.
Re: Where to find CLSID, IID
No more information about this interface was found. What do you want to do?
The calling method is as follows.
The calling method is as follows.
Code: Select all
serviceProvider := ComObjQuery( ??, IID_IServiceProvider)
ComCall(3, serviceProvider, 'ptr', SID_LaunchSourceAppUserModelId, 'ptr', IID_LaunchSourceAppUserModelId, 'ptr*', obj := ComValue(0xd, 0))
Re: Where to find CLSID, IID
OK,I'll try it on Monday. There is no computer outside on weekends.
Re: Where to find CLSID, IID
I can't find CLSID. Let me try another method to implement it
Who is online
Users browsing this forum: Bing [Bot], vmech and 61 guests