[UxTheme.dll] GetThemeBitmap function is outdated
See original GitHub issueHello, according to the MSDN, the GetThemeBitmap pinvoke is outdated.
Probably there are more functions that don’t need the hDc argument.
According to the MSDN:
HRESULT GetThemeBitmap(
_In_ HTHEME hTheme,
_In_ int iPartId,
_In_ int iStateId,
_In_ int iPropId,
_In_ ULONG dwFlags,
_Out_ HBITMAP *phBitmap
);
Your P/Invoke:
HRESULT GetThemeBitmap(
UxTheme.SafeThemeHandle hTheme,
Gdi32.SafeDCHandle hdc,
int iPartId,
int iStateId,
int iPropId,
int dwFlags,
out IntPtr phBitmap
);
When running the code, this can be confirmed by Visual Sudio’s Managed Debugging Assistant:
Managed Debugging Assistant 'PInvokeStackImbalance' :
'A call to PInvoke function 'Vanara.PInvoke.UxTheme!Vanara.PInvoke.UxTheme::GetThemeBitmap' has unbalanced the stack.
This is likely because the managed PInvoke signature does not match the unmanaged target signature.
Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.'
Thank you for the time you put to make this project into something really good and usable.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Windows 10 DLL File Information - uxtheme.dll
This means that when uxtheme.dll is loaded, the above files are automatically loaded too. If one of these files is corrupted or missing,...
Read more >GetThemeBitmap function (uxtheme.h) - Win32 apps
Retrieves the bitmap associated with a particular theme, part, state, and property.
Read more >Windows 8 DLL File Information - uxtheme.dll
This means that when uxtheme.dll is loaded, the above files are automatically loaded too. If one of these files is corrupted or missing,...
Read more >Blank Desktop after trying to Change Theme, missing ...
After getting the new dll from withinwindows.com (under the windows vista SP0 pack) i went into my system32 folder, then changed my original...
Read more >Uxtheme.dll: What It Is & How To Fix Errors
Uxtheme.dll: What It Is & How To Fix Errors · 1. Run the DISM and SFC scans · 2. Check for faulty software....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Took a few days, but the update (1.0.15) is now available on NuGet. Thanks for pushing me to fully unit test this module.
I’m the one that needs to thank your for this amazing project.