I am trying to use these two functions in my application and I have had nothing but headaches. I finally figured out what to do to get it to link. Now I have a problem getting it to run. I get an error message that states, "api-ms-win-core-version-l1-1-1.dll is missing from your computer..."
Does anyone know of a work-around for this?
What I have tried:
I did some searches and, yes, it is missing. This is a W7 box and it's not on this one and it's not on my W10 box either. The really annoying thing about this is I used dumpbin to list the imports of the program and it says it is importing that DLL for the functions GetFileVersionInfoW and GetFileVersionInfoSizeW but according to the documentation it uses "api-ms-win-core-version-l1-1-0.dll" and that does exist on both machines.
An update for this - the program will work on the W10 box now BUT I can't find that DLL on the machine anywhere - the l1-1-1.dll file I mean. I searched the registry and I find no mention of it anywhere.
This brings up another question - how can the loader utilize a DLL that is nowhere to be found on this machine? It seems we have gone from DLL hell to DLL sorcery.
Another update : I think I see what is going on now. The DLL file that exists (api-ms-win-core-version-l1-1-0.dll) exports all four of the Version functions. Incidentally, only the wide character versions, and the MBCS versions are nowhere to be found. I think what is happening is the loader finds the functions in question in the ...l1-1-0.dll so it links with them and ignores the fact that ...l1-1-1.dll is not present. Now, it seems this is how it works on W10 but it is NOT working like this in W7. I think the root of the problem is there is a bug in whatever specifies the DLL for those functions in the file mincore.lib. I would guess it is a .DEF file but I don't know.