vortesys / ntstyle Goto Github PK
View Code? Open in Web Editor NEWVintage window borders for modern Windows.
License: MIT License
Vintage window borders for modern Windows.
License: MIT License
Please add screenshots off NTStyle running on multiple Windows versions to README.md.
The links in README.md that should open up the releases and issues page return error 404.
Hello, I was looking through the code in srchook/ntsdlfn.c
, which temporarily loads a few DWM API functions in during runtime, and have a few questions about the existing design. Notably, I believe that the existing code has a tiny resource leak in successful instances.
Current code is structured something like this for both function imports:
HMODULE hLib = LoadLibrary(L"Dwmapi.dll");
HRESULT hRet = 0;
if (hLib)
{
FARPROC fLib = GetProcAddress(hLib, <FUNCTION>);
if (hRet = (HRESULT)fLib(<ARGUMENTS>))
{
FreeLibrary(hLib);
return hRet;
}
}
return 0;
I believe that the FreeLibrary
call should be ran in both cases. Otherwise, what would happen here is that the library is loaded by the application and never freed. Note that S_OK (a successful HRESULT) is equal to 0, so the if condition is passed and the function always returns successful if hRet
is 0, without freeing the library. In general, the macros SUCCEEDED()
or FAILED()
should be used for HRESULTs, for clarity.
If this is the intended behaviour, then it'd be good to add a comment documenting this. Otherwise, appropriate adjustments should be made.
When I try to open the executable (ntstyle.exe), the process appears in the task manager for a second, then disappears.
I used Visual Studio Build Tool 2022 for the compilation; the compilation did not encounter any errors, but there may be a parameter that I forget to enter.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.