Closed harborsiem closed 8 months ago
I don't think we can add overloads here, for a few reasons.
What if instead, CsWin32 were willing to generated MAKEINTRESOURCE
(on request) so that you can do this:
HMODULE resourceHandle = ...;
HRSRC hResource = PInvoke.FindResource(resourceHandle, MAKEINTRESOURCE(2), "IMAGE");
Would that suffice?
Duplicate of #486
Is your feature request related to a problem? Please describe.
Functions FindResource, LoadImage (maybe more functions ?) should have an additional overload for the second parameter because the second parameter can be a value from the macro MAKEINTRESOURCE. But one have only a PCWSTR or a String for this parameter. So the user have to cast the int value when he had to use macro MAKEINTRESOURCE. For FindResource it is also necessary to have an overload for the 3. parameter. Example:
Describe the solution you'd like Additional friendly overloads:
Describe alternatives you've considered
Additional context