My app is a WPF application and it already has code for the older type of System DPI awareness that works well in every version of windows except 8.1. It turns out that Microsoft added a number of functions to Windows 8.1 as part of their implementation of per-monitor DPI awareness. I need to implement code in my program to support this type of DPI awareness.
I have documentation that lists the per-monitor DPI awareness functions and what their parameters are. I need to import those into C# and call them from my window class. But I don't know which DLLs contain those functions! The documentation for the GetProcessDpiAwareness
function, for example, does not indicate which DLL it's in.
How do I find what the exports in the DLLs are?
Right out of head, a dumb method: a binary search in C:\Windows\System32
for GetProcessDpiAwareness
, then studying each occurrence with Dependency Walker for exports.
This produces the result: GetProcessDpiAwareness
is exported by SHCore.dll
.
One may also search the Windows SDK headers and libs, but in my case I haven't found GetProcessDpiAwareness
, to my surprise.
Another idea, run the following from the command line prompt:
for %f in (%windir%\system32\*.dll) do dumpbin.exe /exports %f >>%temp%\__exports
Then search %temp%\__exports
for the API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With