diff --git a/.gitignore b/.gitignore
index a6e0a23..844d133 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,7 @@
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# Custom files
-src/
+src/Riverside.Win32*
# User-specific files
*.rsuser
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..71181dd
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "src/Riverside.Private.CsWin32"]
+ path = src/Riverside.Private.CsWin32
+ url = https://github.com/Lamparter/CsWin32
diff --git a/Directory.Build.props b/Directory.Build.props
index 4cb7679..1b38e9c 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -13,6 +13,9 @@
12.0
enable
true
+
+ $(MSBuildThisFileDirectory)
+ $(RootDirectory)\src\Riverside.Private.CsWin32.props
@@ -65,13 +68,14 @@
+
-
+
diff --git a/GenerateSolution.ps1 b/GenerateSolution.ps1
index 2190cbc..c315998 100644
--- a/GenerateSolution.ps1
+++ b/GenerateSolution.ps1
@@ -3,7 +3,9 @@ param(
)
if (Test-Path $WorkingDirectory) {
- Remove-Item -Path $WorkingDirectory -Recurse -Force
+ Get-ChildItem -Path $WorkingDirectory | Where-Object {
+ $_.Name -notlike '*Riverside.Private.CsWin32*'
+ } | Remove-Item -Recurse -Force
}
# Dictionary of DLLs with 'pretty' names
@@ -94,6 +96,7 @@ foreach ($dll in $dlls.Keys) {
# Add .csproj content
$csprojContent = @"
+
Win32 P/Invoke ($dll.dll) bindings for .NET Standard
`$(PackageTags); $dll
@@ -109,9 +112,10 @@ foreach ($dll in $dlls.Keys) {
# NativeMethods.json
$nativeMethodsConfigContent = @"
{
- "`$schema": "https://aka.ms/CsWin32.schema.json",
+ "`$schema": "..\\Riverside.Private.CsWin32\\src\\Microsoft.Windows.CsWin32\\settings.schema.json",
"allowMarshaling": false,
"public": true,
+ "namespace": "$projectName",
"comInterop": {
"preserveSigMethods": [
"*"
@@ -155,4 +159,8 @@ $mainCsprojContent | Set-Content -Path $mainProjectFile
dotnet sln $solutionFile add $mainProjectFile
+$CsWin32ProjectDir = Join-Path $WorkingDirectory "Riverside.Private.CsWin32\src\Microsoft.Windows.CsWin32\Microsoft.Windows.CsWin32.csproj"
+
+dotnet sln $solutionFile add $CsWin32ProjectDir
+
Write-Host "Solution and projects have been successfully created in $WorkingDirectory."
\ No newline at end of file
diff --git a/README.md b/README.md
index efabf30..f07f224 100644
--- a/README.md
+++ b/README.md
@@ -10,57 +10,57 @@ You can then use the packages just as you would with CsWin32, but installing the
| Package | Latest | Associated DLL |
|--------|--------|--------|
| `Riverside.Win32` | [](https://nuget.org/packages/Riverside.Win32) | * |
-| `Riverside.Win32.NewTechnology` | [](https://nuget.org/packages/Riverside.Win32.NewTechnology) | ntdll.dll |
-| `Riverside.Win32.DirectX.Direct3D.12` | [](https://nuget.org/packages/Riverside.Win32.DirectX.Direct3D.12) | d3d12.dll |
-| `Riverside.Win32.Security` | [](https://nuget.org/packages/Riverside.Win32.Security) | secur32.dll |
-| `Riverside.Win32.PEImage` | [](https://nuget.org/packages/Riverside.Win32.PEImage) | imagehlp.dll |
-| `Riverside.Win32.Setup` | [](https://nuget.org/packages/Riverside.Win32.Setup) | setupapi.dll |
-| `Riverside.Win32.Installer` | [](https://nuget.org/packages/Riverside.Win32.Installer) | msi.dll |
-| `Riverside.Win32.InputMethod` | [](https://nuget.org/packages/Riverside.Win32.InputMethod) | imm32.dll |
+| `Riverside.Win32.DirectX.DirectSound` | [](https://nuget.org/packages/Riverside.Win32.DirectX.DirectSound) | dsound.dll |
+| `Riverside.Win32.Cryptography.Legacy` | [](https://nuget.org/packages/Riverside.Win32.Cryptography.Legacy) | crypt32.dll |
+| `Riverside.Win32.RemoteDesktop` | [](https://nuget.org/packages/Riverside.Win32.RemoteDesktop) | wtsapi32.dll |
+| `Riverside.Win32.ObjectLinking.Automation` | [](https://nuget.org/packages/Riverside.Win32.ObjectLinking.Automation) | oleaut32.dll |
+| `Riverside.Win32.Shell.Lightweight` | [](https://nuget.org/packages/Riverside.Win32.Shell.Lightweight) | shlwapi.dll |
+| `Riverside.Win32.Usb` | [](https://nuget.org/packages/Riverside.Win32.Usb) | winusb.dll |
+| `Riverside.Win32.Hardware` | [](https://nuget.org/packages/Riverside.Win32.Hardware) | cfgmgr32.dll |
| `Riverside.Win32.Multimedia.Realtime` | [](https://nuget.org/packages/Riverside.Win32.Multimedia.Realtime) | avrt.dll |
+| `Riverside.Win32.Debugging` | [](https://nuget.org/packages/Riverside.Win32.Debugging) | dbghelp.dll |
+| `Riverside.Win32.NETFramework` | [](https://nuget.org/packages/Riverside.Win32.NETFramework) | mscoree.dll |
+| `Riverside.Win32.Network` | [](https://nuget.org/packages/Riverside.Win32.Network) | netapi32.dll |
+| `Riverside.Win32.Magnification` | [](https://nuget.org/packages/Riverside.Win32.Magnification) | magnification.dll |
+| `Riverside.Win32.Graphics` | [](https://nuget.org/packages/Riverside.Win32.Graphics) | gdi32.dll |
| `Riverside.Win32.MediaFoundation.Platform` | [](https://nuget.org/packages/Riverside.Win32.MediaFoundation.Platform) | mfplat.dll |
-| `Riverside.Win32.Networking.Internet` | [](https://nuget.org/packages/Riverside.Win32.Networking.Internet) | wininet.dll |
+| `Riverside.Win32.CommonControls` | [](https://nuget.org/packages/Riverside.Win32.CommonControls) | comctl32.dll |
| `Riverside.Win32.MediaFoundation` | [](https://nuget.org/packages/Riverside.Win32.MediaFoundation) | mf.dll |
-| `Riverside.Win32.ObjectLinking.Automation` | [](https://nuget.org/packages/Riverside.Win32.ObjectLinking.Automation) | oleaut32.dll |
-| `Riverside.Win32.Rpc` | [](https://nuget.org/packages/Riverside.Win32.Rpc) | rpcrt4.dll |
-| `Riverside.Win32.MultipleProviderRouter` | [](https://nuget.org/packages/Riverside.Win32.MultipleProviderRouter) | mpr.dll |
-| `Riverside.Win32.Multimedia` | [](https://nuget.org/packages/Riverside.Win32.Multimedia) | winmm.dll |
-| `Riverside.Win32.Themes` | [](https://nuget.org/packages/Riverside.Win32.Themes) | uxtheme.dll |
-| `Riverside.Win32.ObjectLinking` | [](https://nuget.org/packages/Riverside.Win32.ObjectLinking) | ole32.dll |
-| `Riverside.Win32.Debugging` | [](https://nuget.org/packages/Riverside.Win32.Debugging) | dbghelp.dll |
-| `Riverside.Win32.DirectX.Direct3D.10.1` | [](https://nuget.org/packages/Riverside.Win32.DirectX.Direct3D.10.1) | d3d10_1.dll |
-| `Riverside.Win32.DirectX.GraphicsInfrastructure` | [](https://nuget.org/packages/Riverside.Win32.DirectX.GraphicsInfrastructure) | dxgi.dll |
-| `Riverside.Win32.Hardware` | [](https://nuget.org/packages/Riverside.Win32.Hardware) | cfgmgr32.dll |
| `Riverside.Win32.NewDevice` | [](https://nuget.org/packages/Riverside.Win32.NewDevice) | newdev.dll |
-| `Riverside.Win32.Network` | [](https://nuget.org/packages/Riverside.Win32.Network) | netapi32.dll |
+| `Riverside.Win32.Process` | [](https://nuget.org/packages/Riverside.Win32.Process) | psapi.dll |
+| `Riverside.Win32.Cryptography.BCrypt` | [](https://nuget.org/packages/Riverside.Win32.Cryptography.BCrypt) | bcrypt.dll |
+| `Riverside.Win32.UserEnvironment` | [](https://nuget.org/packages/Riverside.Win32.UserEnvironment) | userenv.dll |
+| `Riverside.Win32.DirectX.DirectInput` | [](https://nuget.org/packages/Riverside.Win32.DirectX.DirectInput) | dinput8.dll |
+| `Riverside.Win32.DirectX.Direct3D.12` | [](https://nuget.org/packages/Riverside.Win32.DirectX.Direct3D.12) | d3d12.dll |
+| `Riverside.Win32.Multimedia` | [](https://nuget.org/packages/Riverside.Win32.Multimedia) | winmm.dll |
+| `Riverside.Win32.Installer` | [](https://nuget.org/packages/Riverside.Win32.Installer) | msi.dll |
+| `Riverside.Win32.KernelStreaming` | [](https://nuget.org/packages/Riverside.Win32.KernelStreaming) | ksuser.dll |
+| `Riverside.Win32.Rpc` | [](https://nuget.org/packages/Riverside.Win32.Rpc) | rpcrt4.dll |
+| `Riverside.Win32.Cryptography.NCrypt` | [](https://nuget.org/packages/Riverside.Win32.Cryptography.NCrypt) | ncrypt.dll |
| `Riverside.Win32.DirectX.Direct3D.11` | [](https://nuget.org/packages/Riverside.Win32.DirectX.Direct3D.11) | d3d11.dll |
-| `Riverside.Win32.Network.IPHelper` | [](https://nuget.org/packages/Riverside.Win32.Network.IPHelper) | iphlpapi.dll |
+| `Riverside.Win32.Setup` | [](https://nuget.org/packages/Riverside.Win32.Setup) | setupapi.dll |
+| `Riverside.Win32.Shell` | [](https://nuget.org/packages/Riverside.Win32.Shell) | shell32.dll |
| `Riverside.Win32.MediaFoundation.ReadWrite` | [](https://nuget.org/packages/Riverside.Win32.MediaFoundation.ReadWrite) | mfreadwrite.dll |
| `Riverside.Win32.Desktop` | [](https://nuget.org/packages/Riverside.Win32.Desktop) | dwmapi.dll |
-| `Riverside.Win32.Cabinet` | [](https://nuget.org/packages/Riverside.Win32.Cabinet) | cabinet.dll |
-| `Riverside.Win32.Graphics.OpenGL` | [](https://nuget.org/packages/Riverside.Win32.Graphics.OpenGL) | opengl32.dll |
-| `Riverside.Win32.Cryptography.BCrypt` | [](https://nuget.org/packages/Riverside.Win32.Cryptography.BCrypt) | bcrypt.dll |
-| `Riverside.Win32.UserInterface` | [](https://nuget.org/packages/Riverside.Win32.UserInterface) | user32.dll |
+| `Riverside.Win32.Kernel` | [](https://nuget.org/packages/Riverside.Win32.Kernel) | kernel32.dll |
+| `Riverside.Win32.Networking.Internet` | [](https://nuget.org/packages/Riverside.Win32.Networking.Internet) | wininet.dll |
+| `Riverside.Win32.Graphics.OpenGLUtility` | [](https://nuget.org/packages/Riverside.Win32.Graphics.OpenGLUtility) | glu32.dll |
+| `Riverside.Win32.DirectX.GraphicsInfrastructure` | [](https://nuget.org/packages/Riverside.Win32.DirectX.GraphicsInfrastructure) | dxgi.dll |
+| `Riverside.Win32.InputMethod` | [](https://nuget.org/packages/Riverside.Win32.InputMethod) | imm32.dll |
+| `Riverside.Win32.Networking.Sockets` | [](https://nuget.org/packages/Riverside.Win32.Networking.Sockets) | ws2_32.dll |
+| `Riverside.Win32.PEImage` | [](https://nuget.org/packages/Riverside.Win32.PEImage) | imagehlp.dll |
| `Riverside.Win32.Advanced` | [](https://nuget.org/packages/Riverside.Win32.Advanced) | advapi32.dll |
-| `Riverside.Win32.KernelStreaming` | [](https://nuget.org/packages/Riverside.Win32.KernelStreaming) | ksuser.dll |
-| `Riverside.Win32.Cryptography.Legacy` | [](https://nuget.org/packages/Riverside.Win32.Cryptography.Legacy) | crypt32.dll |
-| `Riverside.Win32.Graphics` | [](https://nuget.org/packages/Riverside.Win32.Graphics) | gdi32.dll |
-| `Riverside.Win32.Magnification` | [](https://nuget.org/packages/Riverside.Win32.Magnification) | magnification.dll |
+| `Riverside.Win32.Themes` | [](https://nuget.org/packages/Riverside.Win32.Themes) | uxtheme.dll |
+| `Riverside.Win32.DirectX.Direct3D.10.1` | [](https://nuget.org/packages/Riverside.Win32.DirectX.Direct3D.10.1) | d3d10_1.dll |
| `Riverside.Win32.DirectX.Direct3D.10` | [](https://nuget.org/packages/Riverside.Win32.DirectX.Direct3D.10) | d3d10.dll |
-| `Riverside.Win32.NETFramework` | [](https://nuget.org/packages/Riverside.Win32.NETFramework) | mscoree.dll |
-| `Riverside.Win32.RemoteDesktop` | [](https://nuget.org/packages/Riverside.Win32.RemoteDesktop) | wtsapi32.dll |
-| `Riverside.Win32.Shell` | [](https://nuget.org/packages/Riverside.Win32.Shell) | shell32.dll |
-| `Riverside.Win32.Cryptography.NCrypt` | [](https://nuget.org/packages/Riverside.Win32.Cryptography.NCrypt) | ncrypt.dll |
-| `Riverside.Win32.Networking.Sockets` | [](https://nuget.org/packages/Riverside.Win32.Networking.Sockets) | ws2_32.dll |
-| `Riverside.Win32.Usb` | [](https://nuget.org/packages/Riverside.Win32.Usb) | winusb.dll |
-| `Riverside.Win32.CommonControls` | [](https://nuget.org/packages/Riverside.Win32.CommonControls) | comctl32.dll |
-| `Riverside.Win32.UserEnvironment` | [](https://nuget.org/packages/Riverside.Win32.UserEnvironment) | userenv.dll |
-| `Riverside.Win32.Graphics.OpenGLUtility` | [](https://nuget.org/packages/Riverside.Win32.Graphics.OpenGLUtility) | glu32.dll |
+| `Riverside.Win32.ObjectLinking` | [](https://nuget.org/packages/Riverside.Win32.ObjectLinking) | ole32.dll |
+| `Riverside.Win32.MultipleProviderRouter` | [](https://nuget.org/packages/Riverside.Win32.MultipleProviderRouter) | mpr.dll |
+| `Riverside.Win32.Cabinet` | [](https://nuget.org/packages/Riverside.Win32.Cabinet) | cabinet.dll |
+| `Riverside.Win32.NewTechnology` | [](https://nuget.org/packages/Riverside.Win32.NewTechnology) | ntdll.dll |
| `Riverside.Win32.Usb.HumanInterface` | [](https://nuget.org/packages/Riverside.Win32.Usb.HumanInterface) | hid.dll |
-| `Riverside.Win32.Shell.Lightweight` | [](https://nuget.org/packages/Riverside.Win32.Shell.Lightweight) | shlwapi.dll |
-| `Riverside.Win32.Kernel` | [](https://nuget.org/packages/Riverside.Win32.Kernel) | kernel32.dll |
-| `Riverside.Win32.Version` | [](https://nuget.org/packages/Riverside.Win32.Version) | version.dll |
-| `Riverside.Win32.DirectX.DirectInput` | [](https://nuget.org/packages/Riverside.Win32.DirectX.DirectInput) | dinput8.dll |
+| `Riverside.Win32.Security` | [](https://nuget.org/packages/Riverside.Win32.Security) | secur32.dll |
+| `Riverside.Win32.UserInterface` | [](https://nuget.org/packages/Riverside.Win32.UserInterface) | user32.dll |
+| `Riverside.Win32.Graphics.OpenGL` | [](https://nuget.org/packages/Riverside.Win32.Graphics.OpenGL) | opengl32.dll |
+| `Riverside.Win32.Network.IPHelper` | [](https://nuget.org/packages/Riverside.Win32.Network.IPHelper) | iphlpapi.dll |
| `Riverside.Win32.DirectX.Direct3D.9` | [](https://nuget.org/packages/Riverside.Win32.DirectX.Direct3D.9) | d3d9.dll |
-| `Riverside.Win32.DirectX.DirectSound` | [](https://nuget.org/packages/Riverside.Win32.DirectX.DirectSound) | dsound.dll |
-| `Riverside.Win32.Process` | [](https://nuget.org/packages/Riverside.Win32.Process) | psapi.dll |
+| `Riverside.Win32.Version` | [](https://nuget.org/packages/Riverside.Win32.Version) | version.dll |
diff --git a/src/Riverside.Private.CsWin32 b/src/Riverside.Private.CsWin32
new file mode 160000
index 0000000..3b4291a
--- /dev/null
+++ b/src/Riverside.Private.CsWin32
@@ -0,0 +1 @@
+Subproject commit 3b4291aa5b0910ae220d334cfc572fbb3fd3cffc
diff --git a/src/Riverside.Private.CsWin32.props b/src/Riverside.Private.CsWin32.props
new file mode 100644
index 0000000..4272680
--- /dev/null
+++ b/src/Riverside.Private.CsWin32.props
@@ -0,0 +1,27 @@
+
+
+
+
+ $(RootDirectory)\src\Riverside.Private.CsWin32\
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file