I'm trying to make the first part of getting the buffer size of the GetCurrentApplicationUserModelId to work:
https://learn.microsoft.com/en-us/windows/win32/api/appmodel/nf-appmodel-getcurrentapplicationusermodelid
The second part already works if i set the buffersize manualy to an appropiate size like 256.
This is what i got so far but the output will be empty all the time. Even when starting from an MSIx environment.
Code: Select all
Length := 0
Length := Buffer(Length, 64)
RC := DllCall("GetCurrentApplicationUserModelId", "Ptr", Length, "UInt", 0)
Length := StrGet(Length)
MsgBox RC
MsgBox Length
Here some information for C++
LONG GetCurrentApplicationUserModelId(
[in, out] UINT32 *applicationUserModelIdLength,
[out] PWSTR applicationUserModelId
);
Parameters
[in, out] applicationUserModelIdLength
On input, the size of the applicationUserModelId buffer, in wide characters. On success, the size of the buffer used, including the null terminator.
[out] applicationUserModelId
A pointer to a buffer that receives the application user model ID.