How do I find which Dlls contain specific W32 functions?

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.

Tags:

C#

Winapi

Dll