开发者

How will ILCreateFromPath behave when error checking fails?

开发者 https://www.devze.com 2023-03-10 09:29 出处:网络
In the PSDK reference for ILCreateFr开发者_StackOverflow社区omPath there is no information how the function behaves when it fails (and, more importantly, how to get extended error information).

In the PSDK reference for ILCreateFr开发者_StackOverflow社区omPath there is no information how the function behaves when it fails (and, more importantly, how to get extended error information).

What behavior should I expect, and how can I get that error information?


It is not documented anywhere else. If it fails, it returns a NULL pointer, and there is no extended error info available what that happens.

Use SHParseDisplayName() instead (even Microsoft says it is preferred over ILCreateFromPath()). It returns an HRESULT, which contains an error code on failure.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号