开发者

IFileOpenDialog failed to launch in XP

I have a sample application in which I want to selecting a folder. For that I used SHBrowseForFolder(). But in Vista it will not work. So I used IFileOpenDialog. If the os version is XP I am using SHBrowseForFolder() else I am using IFileOpenDialog.

My application works fine in vista. But it will fail to launch in XP.

Please let me know any thing I need to do.

Update:

I observed that it is not because of IFileOpenDialog interface. I am using SHCreateItemFromParsingName() API to set the Default Folder while browsing. Shell32.dll does not contain entry point in XP开发者_Python百科. So I am facing this problem.

To solve the problem I am using LoadLibrary and GetProcAddres() to Get the Proc Address.

Now I can run the application.


Our product uses SHBrowserForFolder without issue on Vista/7. What code do you have for that function? What does GetLastError() return? Maybe we can find the issue there.


For what it's worth, answering the direct question, IFileOpenDialog is not available in XP which is why it failed. The equivalent API for XP is GetOpenFileName.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜