Skip to content

Commit 4851a8e

Browse files
committed
Improved
1 parent 11328cf commit 4851a8e

6 files changed

+84
-137
lines changed

src/Files.App.CsWin32/IStorageProviderQuotaUI.cs

+3-19
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace Windows.Win32.System.WinRT
1111
{
12-
public unsafe struct IStorageProviderQuotaUI : IComIID
12+
public unsafe partial struct IStorageProviderQuotaUI : IComIID
1313
{
1414
#pragma warning disable CS0649 // Field 'field' is never assigned to, and will always have its default value 'value'
1515
private void** lpVtbl;
@@ -27,23 +27,7 @@ public HRESULT GetQuotaUsedInBytes(ulong* value)
2727
return ((delegate* unmanaged[Stdcall]<IStorageProviderQuotaUI*, ulong*, HRESULT>)(lpVtbl[8]))((IStorageProviderQuotaUI*)Unsafe.AsPointer(ref this), value);
2828
}
2929

30-
public static ref readonly Guid Guid
31-
{
32-
get
33-
{
34-
// BA6295C3-312E-544F-9FD5-1F81B21F3649
35-
ReadOnlySpan<byte> data =
36-
[
37-
0xC3, 0x95, 0x62, 0xBA,
38-
0x2E, 0x31,
39-
0x4F, 0x54,
40-
0x9F, 0xD5,
41-
0x1F, 0x81, 0xB2, 0x1F, 0x36, 0x49
42-
];
43-
44-
Debug.Assert(data.Length == sizeof(Guid));
45-
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
46-
}
47-
}
30+
[GuidRVAGen.Guid("BA6295C3-312E-544F-9FD5-1F81B21F3649")]
31+
public static partial ref readonly Guid Guid { get; }
4832
}
4933
}

src/Files.App.CsWin32/IStorageProviderStatusUI.cs

+3-19
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace Windows.Win32.System.WinRT
1111
{
12-
public unsafe struct IStorageProviderStatusUI : IComIID
12+
public unsafe partial struct IStorageProviderStatusUI : IComIID
1313
{
1414
#pragma warning disable CS0649 // Field 'field' is never assigned to, and will always have its default value 'value'
1515
private void** lpVtbl;
@@ -21,23 +21,7 @@ public HRESULT GetQuotaUI(IStorageProviderQuotaUI** result)
2121
return ((delegate* unmanaged[Stdcall]<IStorageProviderStatusUI*, IStorageProviderQuotaUI**, HRESULT>)lpVtbl[14])((IStorageProviderStatusUI*)Unsafe.AsPointer(ref this), result);
2222
}
2323

24-
public static ref readonly Guid Guid
25-
{
26-
get
27-
{
28-
// d6b6a758-198d-5b80-977f-5ff73da33118
29-
ReadOnlySpan<byte> data =
30-
[
31-
0x58, 0xa7, 0xb6, 0xd6,
32-
0x8d, 0x19,
33-
0x80, 0x5b,
34-
0x97, 0x7f,
35-
0x5f, 0xf7, 0x3d, 0xa3, 0x31, 0x18
36-
];
37-
38-
Debug.Assert(data.Length == sizeof(Guid));
39-
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
40-
}
41-
}
24+
[GuidRVAGen.Guid("D6B6A758-198D-5B80-977F-5FF73DA33118")]
25+
public static partial ref readonly Guid Guid { get; }
4226
}
4327
}

src/Files.App.CsWin32/IStorageProviderStatusUISource.cs

+3-19
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace Windows.Win32.System.WinRT
1111
{
12-
public unsafe struct IStorageProviderStatusUISource : IComIID
12+
public unsafe partial struct IStorageProviderStatusUISource : IComIID
1313
{
1414
#pragma warning disable CS0649 // Field 'field' is never assigned to, and will always have its default value 'value'
1515
private void** lpVtbl;
@@ -21,23 +21,7 @@ public HRESULT GetStatusUI(IStorageProviderStatusUI** result)
2121
return ((delegate* unmanaged[Stdcall]<IStorageProviderStatusUISource*, IStorageProviderStatusUI**, HRESULT>)lpVtbl[6])((IStorageProviderStatusUISource*)Unsafe.AsPointer(ref this), result);
2222
}
2323

24-
public static ref readonly Guid Guid
25-
{
26-
get
27-
{
28-
// A306C249-3D66-5E70-9007-E43DF96051FF
29-
ReadOnlySpan<byte> data =
30-
[
31-
0x49, 0xc2, 0x06, 0xa3,
32-
0x66, 0x3d,
33-
0x70, 0x5e,
34-
0x90, 0x07,
35-
0xe4, 0x3d, 0xf9, 0x60, 0x51, 0xff
36-
];
37-
38-
Debug.Assert(data.Length == sizeof(Guid));
39-
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
40-
}
41-
}
24+
[GuidRVAGen.Guid("A306C249-3D66-5E70-9007-E43DF96051FF")]
25+
public static partial ref readonly Guid Guid { get; }
4226
}
4327
}

src/Files.App.CsWin32/IStorageProviderStatusUISourceFactory.cs

+3-9
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace Windows.Win32.System.WinRT
1111
{
12-
public unsafe struct IStorageProviderStatusUISourceFactory : IComIID
12+
public unsafe partial struct IStorageProviderStatusUISourceFactory : IComIID
1313
{
1414
#pragma warning disable CS0649 // Field 'field' is never assigned to, and will always have its default value 'value'
1515
private void** lpVtbl;
@@ -21,13 +21,7 @@ public HRESULT GetStatusUISource(nint syncRootId, IStorageProviderStatusUISource
2121
return ((delegate* unmanaged[Stdcall]<IStorageProviderStatusUISourceFactory*, nint, IStorageProviderStatusUISource**, HRESULT>)lpVtbl[6])((IStorageProviderStatusUISourceFactory*)Unsafe.AsPointer(ref this), syncRootId, result);
2222
}
2323

24-
public static ref readonly Guid Guid
25-
{
26-
get
27-
{
28-
var iid = *IID.IID_IStorageProviderStatusUISourceFactory;
29-
return ref iid;
30-
}
31-
}
24+
[GuidRVAGen.Guid("12E46B74-4E5A-58D1-A62F-0376E8EE7DD8")]
25+
public static partial ref readonly Guid Guid { get; }
3226
}
3327
}

src/Files.App.CsWin32/ManualGuid.cs

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
// Licensed under the MIT License.
33

44
using System;
5+
using System.Runtime.CompilerServices;
6+
using Windows.Win32.System.WinRT;
57

68
namespace Windows.Win32
79
{
810
public static unsafe partial class IID
911
{
12+
public static Guid* IID_IStorageProviderStatusUISourceFactory
13+
=> (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IStorageProviderStatusUISourceFactory.Guid));
14+
1015
[GuidRVAGen.Guid("000214E4-0000-0000-C000-000000000046")]
1116
public static partial Guid* IID_IContextMenu { get; }
1217

@@ -33,9 +38,6 @@ public static unsafe partial class IID
3338

3439
[GuidRVAGen.Guid("2E941141-7F97-4756-BA1D-9DECDE894A3D")]
3540
public static partial Guid* IID_IApplicationActivationManager { get; }
36-
37-
[GuidRVAGen.Guid("12E46B74-4E5A-58D1-A62F-0376E8EE7DD8")]
38-
public static partial Guid* IID_IStorageProviderStatusUISourceFactory { get; }
3941
}
4042

4143
public static unsafe partial class CLSID
+67-68
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
11
// Copyright (c) Files Community
22
// Licensed under the MIT License.
33

4-
// Methods
5-
4+
WNDPROC
5+
WNDCLASSEXW
66
RegisterClassEx
77
CreateWindowEx
88
DestroyWindow
99
GetModuleHandle
10+
RECT
11+
NOTIFYICONIDENTIFIER
1012
Shell_NotifyIconGetRect
1113
RegisterWindowMessage
14+
NOTIFYICONDATAW
1215
Shell_NotifyIcon
1316
GetCursorPos
1417
DestroyMenu
1518
AppendMenu
1619
CreatePopupMenu
1720
SetForegroundWindow
1821
TrackPopupMenuEx
22+
TRACK_POPUP_MENU_FLAGS
1923
GetSystemMetricsForDpi
2024
DefWindowProc
25+
SYSTEM_METRICS_INDEX
2126
GetDpiForWindow
27+
HWND
28+
LRESULT
29+
WPARAM
30+
LPARAM
31+
WM_*
2232
SetForegroundWindow
2333
GetForegroundWindow
2434
GetCurrentThreadId
@@ -35,14 +45,29 @@ RemoveDirectoryFromApp
3545
GetKeyState
3646
CreateDirectoryFromApp
3747
WNetCancelConnection2
48+
NET_USE_CONNECT_FLAGS
49+
NETRESOURCEW
3850
WNetAddConnection3
51+
CREDENTIALW
3952
CredWrite
4053
WNetConnectionDialog1
54+
CONNECTDLGSTRUCTW
4155
DwmSetWindowAttribute
56+
WIN32_ERROR
4257
CoCreateInstance
58+
FileOpenDialog
59+
IFileOpenDialog
4360
SHCreateItemFromParsingName
61+
FileSaveDialog
62+
IFileSaveDialog
63+
D3D_DRIVER_TYPE
64+
D3D_FEATURE_LEVEL
65+
ID3D11Device
66+
ID3D11DeviceContext
4467
D3D11CreateDevice
68+
IDXGIDevice
4569
DCompositionCreateDevice
70+
IDCompositionDevice
4671
GetNamedSecurityInfo
4772
ConvertSidToStringSid
4873
ConvertStringSidToSid
@@ -51,125 +76,99 @@ GetAclInformation
5176
IsValidAcl
5277
GetAce
5378
SetEntriesInAcl
79+
ACL_SIZE_INFORMATION
5480
DeleteAce
81+
EXPLICIT_ACCESS
82+
ACCESS_ALLOWED_ACE
5583
LookupAccountSid
5684
GetComputerName
5785
AddAccessAllowedAceEx
5886
LocalAlloc
5987
InitializeAcl
6088
AddAce
6189
LocalFree
90+
IDesktopWallpaper
91+
DesktopWallpaper
6292
SHCreateShellItemArrayFromIDLists
6393
ILCreateFromPath
6494
CLSIDFromString
6595
FindWindow
6696
SendMessage
6797
IsWindowVisible
98+
COPYDATASTRUCT
99+
WINDOW_LONG_PTR_INDEX
68100
GetDpiForWindow
69101
CallWindowProc
102+
MINMAXINFO
103+
SUBCLASSPROC
70104
SetWindowPlacement
71105
GetWindowPlacement
106+
WINDOWPLACEMENT
72107
GetSystemMetrics
108+
MONITORENUMPROC
73109
EnumDisplayMonitors
110+
MONITORINFOEXW
74111
GetMonitorInfo
112+
CLASS_E_CLASSNOTAVAILABLE
113+
E_INVALIDARG
75114
RoInitialize
76115
RoRegisterActivationFactories
77116
RoRevokeActivationFactories
78117
WindowsCreateString
79118
WindowsDeleteString
119+
IPreviewHandler
80120
AssocQueryString
81121
GetModuleHandle
82122
SHEmptyRecycleBin
83123
SHFileOperation
84124
SHGetFolderPath
125+
SHGFP_TYPE
85126
SHGetKnownFolderItem
127+
SHQUERYRBINFO
86128
SHQueryRecycleBin
129+
FileOperation
130+
IFileOperation
131+
IShellItem2
87132
PSGetPropertyKeyFromName
88133
ShellExecuteEx
89134
CoTaskMemFree
90135
QueryDosDevice
91136
DeviceIoControl
137+
GetLastError
92138
CreateFile
93139
GetVolumeInformation
140+
COMPRESSION_FORMAT
141+
FILE_ACCESS_RIGHTS
94142
FindFirstFileEx
95143
FindNextFile
96144
CreateFile
97145
GetFileSizeEx
146+
WIN32_FIND_DATAW
147+
FILE_ACCESS_RIGHTS
98148
SHAddToRecentDocs
149+
SHARD
150+
BHID_EnumItems
151+
FOLDERID_RecycleBinFolder
99152
CoTaskMemFree
100153
SHGetIDListFromObject
101154
SHCreateItemFromIDList
102-
UnregisterClass
103-
104-
105-
// Structs
106-
107-
WNDPROC
108-
WNDCLASSEXW
109-
RECT
110-
NOTIFYICONIDENTIFIER
111-
NOTIFYICONDATAW
112-
HWND
113-
LRESULT
114-
WPARAM
115-
LPARAM
116-
NETRESOURCEW
117-
CREDENTIALW
118-
CONNECTDLGSTRUCTW
119-
WIN32_ERROR
120-
ACL_SIZE_INFORMATION
121-
ACCESS_ALLOWED_ACE
122-
COPYDATASTRUCT
123-
MINMAXINFO
124-
SUBCLASSPROC
125-
WINDOWPLACEMENT
126-
MONITORENUMPROC
127-
MONITORINFOEXW
128-
SHQUERYRBINFO
129-
WIN32_FIND_DATAW
130-
WINDOWPOS
131-
132-
133-
// COM interfaces & classes
134-
135-
IFileOpenDialog
136-
IFileSaveDialog
137-
ID3D11Device
138-
ID3D11DeviceContext
139-
IDXGIDevice
140-
IDCompositionDevice
141-
IDesktopWallpaper
142-
IPreviewHandler
143-
IFileOperation
144-
IShellItem2
155+
BHID_SFUIObject
145156
IContextMenu
157+
CMF_NORMAL
158+
CMF_OPTIMIZEFORINVOKE
159+
CMF_EXTENDEDVERBS
160+
CMF_DEFAULTONLY
146161
IApplicationDestinations
147-
IApplicationDocumentLists
148-
149-
FileOpenDialog
150-
FileSaveDialog
151-
DesktopWallpaper
152-
FileOperation
153162
ApplicationDestinations
163+
IApplicationDocumentLists
154164
ApplicationDocumentLists
155165
IApplicationActivationManager
156-
157-
158-
// Constants & Enums
159-
160-
WM_*
161-
CMF_*
162-
FSCTL_*
163-
CLASS_E_CLASSNOTAVAILABLE
164-
E_INVALIDARG
165-
SHARD
166166
MENU_ITEM_TYPE
167167
COMPRESSION_FORMAT
168+
FSCTL_SET_COMPRESSION
169+
FSCTL_DISMOUNT_VOLUME
170+
FSCTL_LOCK_VOLUME
168171
FILE_FILE_COMPRESSION
169-
FILE_ACCESS_RIGHTS
170-
SHGFP_TYPE
171-
WINDOW_LONG_PTR_INDEX
172-
D3D_DRIVER_TYPE
173-
D3D_FEATURE_LEVEL
174-
TRACK_POPUP_MENU_FLAGS
175-
SYSTEM_METRICS_INDEX
172+
WM_WINDOWPOSCHANGING
173+
WINDOWPOS
174+
UnregisterClass

0 commit comments

Comments
 (0)