Moving out all PInvoke Methods to its Independent Hi3Helper.Win32 ass… #1235
build.yml
on: push
Matrix: build-nativeaot
Matrix: build
notify-discord
4s
Annotations
21 warnings
build (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.GeneratedIcons.System.Drawing/SystemDrawingIconGenerator.cs#L73
Populate switch (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0010)
|
build (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.GeneratedIcons.System.Drawing/SystemDrawingIconGenerator.cs#L99
Populate switch (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0010)
|
build (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L102
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L103
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L104
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L105
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L106
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L107
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L108
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L109
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build-nativeaot (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.GeneratedIcons.System.Drawing/SystemDrawingIconGenerator.cs#L73
Populate switch (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0010)
|
build-nativeaot (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.GeneratedIcons.System.Drawing/SystemDrawingIconGenerator.cs#L99
Populate switch (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0010)
|
build-nativeaot (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L102
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build-nativeaot (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L103
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build-nativeaot (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L104
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build-nativeaot (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L105
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build-nativeaot (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L106
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build-nativeaot (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L107
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build-nativeaot (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L108
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
build-nativeaot (Debug, x64, net9.0-windows10.0.22621.0):
H.NotifyIcon/src/libs/H.NotifyIcon/PopupMenus/PopupMenu.cs#L109
Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
|
notify-discord
embed field value must be shorter than 1024, got 1888
[`8c3e282`](https://github.com/CollapseLauncher/Collapse/commit/8c3e282fb34256a475ef6675724af0c77f058f56) Moving out all PInvoke Methods to its Independent Hi3Helper.Win32 assembly (#606)
# Main Goal
As you might already know, Collapse heavily relies on native invocation
for some libraries, especially when it is communicating with Win32 APIs.
For more than two years, we have been using the ``[DllImport]``
attribute to define the external method to call the native functions of
certain libraries (especially when it comes to `Win32` calls).
In .NET 7, ``[LibraryImport]`` was introduced, which is the
``[DllImport]`` alternative that provides the source-generated
invocation to native functions, instead of using a JIT-ed approach. The
``[LibraryImport]`` brings some invocation features which aren't
available for NativeAOT compilations, for example:
``GetLastWin32Error()``, which is useful when diagnosing what's wrong
when a `Win32` function is getting called.
Read more about ``[LibraryImport]`` here:
https://learn.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke-source-generation
https://learn.microsoft.com/en-us/dotnet/standard/native-interop/best-practices
Another reason for these changes are for maintainability and to share
some of the same functionality between our projects. This changes can
improve the work time efficiency and reusability of the functions
between methods without making or implementing the same methods with the
same functionality between modules.
## PR Status :
- Overall Status : Completed
- Commits : Completed
- Synced to base (Collapse:main) : Yes
- Build status : OK
- Crashing : No
- Bug found caused by PR : Unsure
### Templates
<details>
<summary>Changelog Prefixes</summary>
```
**[New]**
**[Imp]**
**[Fix]**
**[Loc]**
**[Doc]**
```
</details>
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
aot-experimental_collapse_x64-Debug_net9.0-windows10.0.22621.0_8c3e282fb34256a475ef6675724af0c77f058f56
|
57.1 MB |
|
collapse_x64-Debug_net9.0-windows10.0.22621.0_8c3e282fb34256a475ef6675724af0c77f058f56
|
71.5 MB |
|