Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing api-ms-win-core-path-l1-1-0.dll #224

Closed
yefeng-zheng opened this issue Mar 11, 2016 · 6 comments · Fixed by #237
Closed

Missing api-ms-win-core-path-l1-1-0.dll #224

yefeng-zheng opened this issue Mar 11, 2016 · 6 comments · Fixed by #237

Comments

@yefeng-zheng
Copy link

I updated my local CNTK copy to the latest version (as today March 11, 2016). The compiling finished smoothly. However, the new CNTK.exe depends on api-ms-win-core-path-l1-1-0.dll, which is missing from my computer (Windows 7). I downloaded a few copies of the .DLL, but none worked. Any clue to fix it? Thanks!

@takuya-takeuchi
Copy link
Contributor

I faced to same problem.
I think api-ms-win-core-path-l1-1-0.dll is for only Windows 8.

Modification of March 6th added the following function to File.cpp.
https://msdn.microsoft.com/ja-jp/library/windows/desktop/hh707092(v=vs.85).aspx

I think you can use PathRemoveFileSpec.
But this function is deprecated.

I changed the latest source code to the following code.
Sure, this modification may occur buffer overrun. But I believe this is no problem. :)

#include <Pathcch.h> #pragma comment(lib, "Pathcch.lib") #endif

to

#include <Shlwapi.h> #pragma comment(lib, "Shlwapi.lib") #endif

And

auto hr = PathCchRemoveFileSpec(&path[0], path.size());

to

auto hr = PathRemoveFileSpec(&path[0]);

At least, application does not crash.
But I cannot guarantee that result is correct.

Thanks!!

@frankseide
Copy link
Contributor

Thanks for your analysis! Will be fixed. We don't run Win 7 over here anymore, so this slipped through the tests...

@takuya-takeuchi
Copy link
Contributor

You're welcome. I'm glad to contribute project.

@alexeyo26
Copy link
Member

Like Frank pointed out above, we don't test on Windows 7 (and we will publish soon exact configuration that we test on for both Windows and Linux)

@takuya-takeuchi Would you care to submit your fix as a pull request? If you would, please ensure it's multi-versioned, i.e. it falls to new function in case it runs on Windows 8 or later.

Thank you a lot,
Alexey

@takuya-takeuchi
Copy link
Contributor

I sent PR.
And I tested it on 7, 8.1 and 10.
Please check comment of PR.

Thank you

@dictoon
Copy link

dictoon commented Dec 15, 2016

Thanks guys, this conversation helped me fix an elusive problem that we had in our own open source project (https://github.com/appleseedhq/appleseed).

In our case, the error our user was seeing was simply "Error code 126 - The specified module could not be found." which made it a bit harder to debug...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants