Skip to content

Commit

Permalink
pinkvokegen
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Aug 20, 2024
1 parent 75a4d47 commit 67e690e
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ExtLibs/pinvokegen/NativeMethods.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FindWindow
ShowWindow
RegisterDeviceNotification
GetConsoleWindow
SetThreadExecutionState
LoadLibraryEx
S_OK
NTSTATUS
SW_HIDE
SW_SHOWNORMAL
ES_CONTINUOUS
ES_SYSTEM_REQUIRED
21 changes: 21 additions & 0 deletions ExtLibs/pinvokegen/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;

namespace pinvokegen
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Windows.Win32.PInvoke.FindWindow("Notepad", null);
Windows.Win32.PInvoke.GetConsoleWindow();
}
}
}
17 changes: 17 additions & 0 deletions ExtLibs/pinvokegen/pinvokegen.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net472</TargetFramework>
<LangVersion>9</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Memory" Version="4.5.5" />
</ItemGroup>

</Project>

0 comments on commit 67e690e

Please sign in to comment.