Martin Koppmann

Hello,

is it possible to adapt the RegSearch sample so that it also works under Windows XP with WDS 3.0

Much of the Propery API is even available under XP:

http://blogs.msdn.com/benkaras/rss_tag_Property+System.xml

Martin



Re: Windows Desktop Search Development RegSearch Sample for XP and WDS 3?

Eric Wolz - MSFT

This sample should work on XP. Are you having issues with it on XP




Re: Windows Desktop Search Development RegSearch Sample for XP and WDS 3?

Sanin

What do I have to tweak in the RegSearch sample to make it compile

These are the errors I get:

stdafx.cpp
c:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\prsht.h(531) : error C2146: syntax error : missing ';' before identifier 'hdr'
c:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\prsht.h(531) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\prsht.h(531) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\commctrl.h(1078) : error C2146: syntax error : missing ';' before identifier 'hdr'
c:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\commctrl.h(1078) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\commctrl.h(1078) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\commctrl.h(1087) : error C2146: syntax error : missing ';' before identifier 'hdr'
c:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\commctrl.h(1087) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

....and so on....






Re: Windows Desktop Search Development RegSearch Sample for XP and WDS 3?

Martin Koppmann

Hello Eric,

The sample compiles fine under XP with VS2005 and Vista SDK, but it won't register the dlls:

Project : error PRJ0050: Error registering the output.

The question is if that code can run under XP For example, for testing puropose if I change the target platform in stdpch.h from _WIN32_WINNT_LONGHORN to _WIN32_WINNT_WINXP: Then got quite a lot of errors stating missing declares e.g. CompareStringOrdinal, IFolderViewSettings, SHBindToFolderIDListParent, SHCreateDataObject, ... etc.

According MSDN these APIs are only present under Vista.

Thanks for your assistance.

Martin





Re: Windows Desktop Search Development RegSearch Sample for XP and WDS 3?

Eric Wolz - MSFT

Yes, your right, unfourtantly this sample was written only for the Vista Platform.




Re: Windows Desktop Search Development RegSearch Sample for XP and WDS 3?

Martin Koppmann

Eric,

My intention is to adapt the RegSearch sample so that it can also run under XP with WDS3. It is has a clean design structure which I want to reuse for my own WDS PH implementation.

There are two Vista APIs left that I need to translate for XP:

  1. SHGetNameFromIDList
    Can you give me a tip how reproduce the functionality of SHGetNameFromIDList under XP I am not really aware what it really does in conjunction with the SIGDN enumeration.

  2. SHCreateItemFromParsingName
    According a blog of Ben Karas, this function replaces calls to SHParseDisplayName and SHCreateShellItem
    .
    Can I use SHParseDisplayName and SHCreateShellItem instead, something like that:
    CComMemPtr<PIDLIST_ABSOLUTE> spidl;
    HRESULT hr = SHParseDisplayName(pszPath, NULL, spidl, 0, NULL);

    if (SUCCEEDED(hr))

    {

    PCUITEMID_CHILD pidlFirst = reinterpret_cast<PCUITEMID_CHILD>(*spidl);

    hr = SHCreateShellItem(NULL, NULL, pidlFirst, &_spItem);

    }

Can you help

Thank you,

Martin





Re: Windows Desktop Search Development RegSearch Sample for XP and WDS 3?

Brandon Paddock MSFT

Hi Martin,

I'm currently working on a new sample PH project which is designed to work on Windows XP as well as Vista. I don't know exactly when it will get published, but hopefully pretty soon.






Re: Windows Desktop Search Development RegSearch Sample for XP and WDS 3?

Eric Wolz - MSFT

Your first item goes something like this:

Code Snippet

SHGetNameFromIDList(PCIDLIST_ABSOLUTE pidl, SIGDN sigdnName, PWSTR *ppszName)


CComPtr<IShellFolder> psfParent;
LPITEMIDLIST pidlLast = NULL;

SHBindToIDListParent(pidl, IID_IShellFolder, (void**)&psfParent, (LPCITEMIDLIST*)&pidlLast);
psfParent->GetDisplayNameOf(pidlLast, sigdnName, &strret);

StrRetToStr(strret, pidl, ppszName);

You might need to translate the SIGDN value. Your second item looks correct.






Re: Windows Desktop Search Development RegSearch Sample for XP and WDS 3?

Martin Koppmann

That's fine, Brandon.

Please let us know, when it is ready.

Martin





Re: Windows Desktop Search Development RegSearch Sample for XP and WDS 3?

Martin Koppmann

Hi Brandon,

are there any news regarding this topic

Do you know when the new sample PH gets published

Thank you,

Martin





Re: Windows Desktop Search Development RegSearch Sample for XP and WDS 3?

Aali

I am also in search of a working sample for XP. Any news on the XP version

Aali





Re: Windows Desktop Search Development RegSearch Sample for XP and WDS 3?

Martin Koppmann

I am afraid that there are no news.

Obviously nobody is working on XP sample.

Martin