Initial Commit
This commit is contained in:
73
.gitignore
vendored
Normal file
73
.gitignore
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
## Build output
|
||||
bin/
|
||||
obj/
|
||||
out/
|
||||
artifacts/
|
||||
|
||||
## Visual Studio / JetBrains Rider / VS Code
|
||||
.vs/
|
||||
.idea/
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
## NuGet
|
||||
*.nupkg
|
||||
*.snupkg
|
||||
packages/
|
||||
.nuget/
|
||||
**/project.lock.json
|
||||
**/project.fragment.lock.json
|
||||
**/artifacts/
|
||||
|
||||
## Logs
|
||||
*.log
|
||||
*.tlog
|
||||
|
||||
## Cache
|
||||
*.cache
|
||||
*.db
|
||||
*.db-shm
|
||||
*.db-wal
|
||||
|
||||
## Backup files
|
||||
*.bak
|
||||
*.orig
|
||||
|
||||
## OS junk
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
Desktop.ini
|
||||
|
||||
## ASP.NET / IIS (if added later)
|
||||
App_Data/
|
||||
*.pubxml
|
||||
*.publishsettings
|
||||
|
||||
## dotnet user secrets
|
||||
**/secrets.json
|
||||
*.secret
|
||||
|
||||
## .NET generated
|
||||
*.deps.json
|
||||
*.runtimeconfig.json
|
||||
*.runtimeconfig.dev.json
|
||||
|
||||
## F# specific
|
||||
*.fsi
|
||||
*.fsjs
|
||||
|
||||
## Rider
|
||||
.idea/
|
||||
*.DotSettings.user
|
||||
|
||||
## VS Code
|
||||
.vscode/
|
||||
.history/
|
||||
|
||||
## JetBrains / ReSharper
|
||||
_ReSharper.Caches/
|
||||
_ReSharper*/
|
||||
*.DotSettings.user
|
||||
16
TuneBladeFixer.sln
Normal file
16
TuneBladeFixer.sln
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TuneBladeFixer", "TuneBladeFixer\TuneBladeFixer.fsproj", "{32FAC1E4-2EE4-4365-8185-8732F70E983B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{32FAC1E4-2EE4-4365-8185-8732F70E983B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{32FAC1E4-2EE4-4365-8185-8732F70E983B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{32FAC1E4-2EE4-4365-8185-8732F70E983B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{32FAC1E4-2EE4-4365-8185-8732F70E983B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
45
TuneBladeFixer/Program.fs
Normal file
45
TuneBladeFixer/Program.fs
Normal file
@@ -0,0 +1,45 @@
|
||||
open System
|
||||
open System.Runtime.InteropServices
|
||||
open System.Text
|
||||
|
||||
[<DllImport("user32.dll", SetLastError = true)>]
|
||||
extern IntPtr FindWindow(string lpClassName, string lpWindowName)
|
||||
|
||||
[<DllImport("user32.dll", SetLastError = true)>]
|
||||
extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow)
|
||||
|
||||
[<DllImport("user32.dll", SetLastError = true)>]
|
||||
extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount)
|
||||
|
||||
[<DllImport("user32.dll", SetLastError = true)>]
|
||||
extern bool PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam)
|
||||
|
||||
let WM_CLOSE = 0x0010u
|
||||
|
||||
let getClassName (hWnd: IntPtr) =
|
||||
let sb = StringBuilder(256)
|
||||
if GetClassName(hWnd, sb, sb.Capacity) > 0 then
|
||||
sb.ToString()
|
||||
else
|
||||
""
|
||||
|
||||
[<EntryPoint>]
|
||||
let main _ =
|
||||
printfn "Running TuneBlade error suppressor..."
|
||||
while true do
|
||||
let hwnd = FindWindow(null, "TuneBlade")
|
||||
|
||||
if hwnd <> IntPtr.Zero then
|
||||
let cls = getClassName hwnd
|
||||
if cls = "#32770" then
|
||||
printfn "TuneBlade error dialog detected — closing."
|
||||
PostMessage(hwnd, WM_CLOSE, IntPtr.Zero, IntPtr.Zero) |> ignore
|
||||
|
||||
let mutable child = FindWindowEx(IntPtr.Zero, IntPtr.Zero, "#32770", "TuneBlade")
|
||||
while child <> IntPtr.Zero do
|
||||
printfn "Closing TuneBlade dialog window..."
|
||||
PostMessage(child, WM_CLOSE, IntPtr.Zero, IntPtr.Zero) |> ignore
|
||||
child <- FindWindowEx(IntPtr.Zero, child, "#32770", "TuneBlade")
|
||||
|
||||
System.Threading.Thread.Sleep(2000)
|
||||
0
|
||||
12
TuneBladeFixer/TuneBladeFixer.fsproj
Normal file
12
TuneBladeFixer/TuneBladeFixer.fsproj
Normal file
@@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.fs"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user