Function Discovery

Where can I find a working sample of using Vista Function Discovery The sample in the latest SDK does not build.

Thanks,

Kevin




Answer this question

Function Discovery

  • OEIL2MOSCOU

    Is there a way to tell what version of the Windows SDK I have installed, without reinstalling the whole thing. It takes forever, and I am sure that I installed the one I have after the release date of the one you pointed to, but I want to make sure I want not on the wrong web page.

    I did not get access denied errors, and I did add the include and library files to VS Pro (but perhaps incorrectly, I dunno). Anyway, I got build errors, lots of them, the most obvious was that FunDiscovery.h referred to a headerfile called functiondiscovery.h, and there was no such file. There was one called functiondiscoveryAPI.h, so I used that and it at least tried to build, but there were still lots of errors.

    Thanks for your help so far. Sorry for the long delay in response, this project got set aside for a hotter issue for a while. You know how it goes...



  • Learning VB

    Yeah, I know how it goes. Glad you didn’t give up. J

    In [Program Files]\Microsoft SDKs\Windows\v6.0\Include I see:

    Functiondiscovery.h

    Functiondiscovery.idl

    Functiondiscoveryapi.h

    Functiondiscoveryapi.idl

    Functiondiscoverycategories.h

    Functiondiscoveryconstraints.h

    Functiondiscoverykeys.h

    Functiondiscoverykeys_devpkey.h

    Functiondiscoverynotification.h

    Functiondiscoveryprovider.h

    Functiondiscoveryprovider.idl

    Functiondiscoveryserviceids.h

    If you don’t have all of those headers in the include directory, I recommend reinstalling the SDK. It was published on 11/7/2006. Off hand, I’m not sure how to check the version, but the date modified for the FD headers is 10/30/2006.

    Cheers,

    Kristina Hotz [MSFT]

    This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm


  • Boris Mueller

    It sounds like you're missing uuid.lib.

    - Kristina Hotz [MSFT]

    This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm


  • unsigned int

    Weird. I got a notification of a post on this thread from Kristina. But when I went to look at it, it was not there. Then I posted a message like this (about it not being there) and it appeared. I immediately went to delete my post, and after I did, Kristina's message disappeared as well.

    I hope it comes back after I post this...



  • jpgetty2win

    Yeah, I know how it goes. Glad you didn’t give up. J

    In [Program Files]\Microsoft SDKs\Windows\v6.0\Include I see:

    Functiondiscovery.h

    Functiondiscovery.idl

    Functiondiscoveryapi.h

    Functiondiscoveryapi.idl

    Functiondiscoverycategories.h

    Functiondiscoveryconstraints.h

    Functiondiscoverykeys.h

    Functiondiscoverykeys_devpkey.h

    Functiondiscoverynotification.h

    Functiondiscoveryprovider.h

    Functiondiscoveryprovider.idl

    Functiondiscoveryserviceids.h

    If you don’t have all of those headers in the include directory, I recommend reinstalling the SDK. It was published on 11/7/2006. Off hand, I’m not sure how to check the version, but the date modified for the FD headers is 10/30/2006.

    Cheers,

    Kristina Hotz [MSFT]

    This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm


  • No-spam Sam

    Yeah, I know how it goes. Glad you didn’t give up. J

    In [Program Files]\Microsoft SDKs\Windows\v6.0\Include I see:

    Functiondiscovery.h

    Functiondiscovery.idl

    Functiondiscoveryapi.h

    Functiondiscoveryapi.idl

    Functiondiscoverycategories.h

    Functiondiscoveryconstraints.h

    Functiondiscoverykeys.h

    Functiondiscoverykeys_devpkey.h

    Functiondiscoverynotification.h

    Functiondiscoveryprovider.h

    Functiondiscoveryprovider.idl

    Functiondiscoveryserviceids.h

    If you don’t have all of those headers in the include directory, I recommend reinstalling the SDK. It was published on 11/7/2006. Off hand, I’m not sure how to check the version, but the date modified for the FD headers is 10/30/2006.

    Cheers,

    Kristina Hotz [MSFT]

    This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm


  • vkas7

    Kristina,

    I have those include files, with the same date. I went and pulled the include files and the sample code from another machine that had the RTM SDK installed yesterday. The errors I get now are all unresolved externals. I have set my include and library VC++ directories (in tools/options/projects and solutions/VC++ directories ) to have the SDK directory first. Here are the errors I get:

    Error 1 error LNK2001: unresolved external symbol _PKEY_DrvPkg_VendorWebSite FunDiscovery.obj
    Error 2 error LNK2001: unresolved external symbol _PKEY_WNET_Provider FunDiscovery.obj
    Error 3 error LNK2001: unresolved external symbol _PKEY_WNET_Comment FunDiscovery.obj
    Error 4 error LNK2001: unresolved external symbol _PKEY_WNET_RemoteName FunDiscovery.obj
    Error 5 error LNK2001: unresolved external symbol _PKEY_WNET_LocalName FunDiscovery.obj
    Error 6 error LNK2001: unresolved external symbol _PKEY_WNET_Usage FunDiscovery.obj
    Error 7 error LNK2001: unresolved external symbol _PKEY_WNET_DisplayType FunDiscovery.obj
    Error 8 error LNK2001: unresolved external symbol _PKEY_WNET_Type FunDiscovery.obj
    Error 9 error LNK2001: unresolved external symbol _PKEY_WNET_Scope FunDiscovery.obj
    Error 10 error LNK2001: unresolved external symbol _PKEY_PNPX_ServiceAddress FunDiscovery.obj
    Error 11 error LNK2001: unresolved external symbol _PKEY_PNPX_ServiceTypes FunDiscovery.obj
    Error 12 error LNK2001: unresolved external symbol _PKEY_PNPX_ServiceId FunDiscovery.obj
    Error 13 error LNK2001: unresolved external symbol _PKEY_PNPX_CompatibleTypes FunDiscovery.obj
    Error 14 error LNK2001: unresolved external symbol _PKEY_PNPX_IpAddress FunDiscovery.obj
    Error 15 error LNK2001: unresolved external symbol _PKEY_PNPX_Associated FunDiscovery.obj
    Error 16 error LNK2001: unresolved external symbol _PKEY_PNPX_Installable FunDiscovery.obj
    Error 17 error LNK2001: unresolved external symbol _PKEY_PNPX_NetworkInterfaceLuid FunDiscovery.obj
    Error 18 error LNK2001: unresolved external symbol _PKEY_PNPX_NetworkInterfaceGuid FunDiscovery.obj
    Error 19 error LNK2001: unresolved external symbol _PKEY_PNPX_PhysicalAddress FunDiscovery.obj
    Error 20 error LNK2001: unresolved external symbol _PKEY_PNPX_DeviceCategory FunDiscovery.obj
    Error 21 error LNK2001: unresolved external symbol _PKEY_PNPX_SerialNumber FunDiscovery.obj
    Error 22 error LNK2001: unresolved external symbol _PKEY_PNPX_FirmwareVersion FunDiscovery.obj
    Error 23 error LNK2001: unresolved external symbol _PKEY_PNPX_FriendlyName FunDiscovery.obj
    Error 24 error LNK2001: unresolved external symbol _PKEY_PNPX_PresentationUrl FunDiscovery.obj
    Error 25 error LNK2001: unresolved external symbol _PKEY_PNPX_Upc FunDiscovery.obj
    Error 26 error LNK2001: unresolved external symbol _PKEY_PNPX_ModelUrl FunDiscovery.obj
    Error 27 error LNK2001: unresolved external symbol _PKEY_PNPX_ModelNumber FunDiscovery.obj
    Error 28 error LNK2001: unresolved external symbol _PKEY_PNPX_ModelName FunDiscovery.obj
    Error 29 error LNK2001: unresolved external symbol _PKEY_PNPX_ManufacturerUrl FunDiscovery.obj
    Error 30 error LNK2001: unresolved external symbol _PKEY_PNPX_Manufacturer FunDiscovery.obj
    Error 31 error LNK2001: unresolved external symbol _PKEY_PNPX_MetadataVersion FunDiscovery.obj
    Error 32 error LNK2001: unresolved external symbol _PKEY_PNPX_XAddrs FunDiscovery.obj
    Error 33 error LNK2001: unresolved external symbol _PKEY_PNPX_Scopes FunDiscovery.obj
    Error 34 error LNK2001: unresolved external symbol _PKEY_PNPX_Types FunDiscovery.obj
    Error 35 error LNK2001: unresolved external symbol _PKEY_PNPX_GlobalIdentity FunDiscovery.obj
    Error 36 error LNK2001: unresolved external symbol _PKEY_PNPX_ShareName FunDiscovery.obj
    Error 37 error LNK2001: unresolved external symbol _PKEY_PNPX_DomainName FunDiscovery.obj
    Error 38 error LNK2001: unresolved external symbol _PKEY_Device_BIOSVersion FunDiscovery.obj
    Error 39 error LNK2001: unresolved external symbol _PKEY_Device_DeviceDesc FunDiscovery.obj
    Error 40 error LNK2001: unresolved external symbol _PKEY_Device_Model FunDiscovery.obj
    Error 41 error LNK2001: unresolved external symbol _PKEY_Device_Comment FunDiscovery.obj
    Error 42 error LNK2001: unresolved external symbol _PKEY_Device_Status FunDiscovery.obj
    Error 43 error LNK2001: unresolved external symbol _PKEY_Device_QueueSize FunDiscovery.obj
    Error 44 error LNK2001: unresolved external symbol _PKEY_Device_EnumeratorName FunDiscovery.obj
    Error 45 error LNK2001: unresolved external symbol _PKEY_Device_BusNumber FunDiscovery.obj
    Error 46 error LNK2001: unresolved external symbol _PKEY_Device_LegacyBusType FunDiscovery.obj
    Error 47 error LNK2001: unresolved external symbol _PKEY_Device_BusTypeGuid FunDiscovery.obj
    Error 48 error LNK2001: unresolved external symbol _PKEY_Device_LowerFilters FunDiscovery.obj
    Error 49 error LNK2001: unresolved external symbol _PKEY_Device_UpperFilters FunDiscovery.obj
    Error 50 error LNK2001: unresolved external symbol _PKEY_Device_UINumber FunDiscovery.obj
    Error 51 error LNK2001: unresolved external symbol _PKEY_Device_Capabilities FunDiscovery.obj
    Error 52 error LNK2001: unresolved external symbol _PKEY_Device_PDOName FunDiscovery.obj
    Error 53 error LNK2001: unresolved external symbol _PKEY_Device_LocationInfo FunDiscovery.obj
    Error 54 error LNK2001: unresolved external symbol _PKEY_Device_FriendlyName FunDiscovery.obj
    Error 55 error LNK2001: unresolved external symbol _PKEY_Device_Manufacturer FunDiscovery.obj
    Error 56 error LNK2001: unresolved external symbol _PKEY_Device_ConfigFlags FunDiscovery.obj
    Error 57 error LNK2001: unresolved external symbol _PKEY_Device_Driver FunDiscovery.obj
    Error 58 error LNK2001: unresolved external symbol _PKEY_Device_ClassGuid FunDiscovery.obj
    Error 59 error LNK2001: unresolved external symbol _PKEY_Device_Class FunDiscovery.obj
    Error 60 error LNK2001: unresolved external symbol _PKEY_Device_Service FunDiscovery.obj
    Error 61 error LNK2001: unresolved external symbol _PKEY_Device_CompatibleIds FunDiscovery.obj
    Error 62 error LNK2001: unresolved external symbol _PKEY_Device_HardwareIds FunDiscovery.obj
    Error 63 error LNK2001: unresolved external symbol _PKEY_Device_Interface FunDiscovery.obj
    Error 64 error LNK2001: unresolved external symbol _PKEY_Device_InstanceId FunDiscovery.obj
    Error 65 error LNK2001: unresolved external symbol _PKEY_FD_Visibility FunDiscovery.obj
    Error 66 error LNK2001: unresolved external symbol _PKEY_ComputerName FunDiscovery.obj
    Error 67 error LNK2001: unresolved external symbol _CLSID_FunctionDiscovery FunDiscovery.obj
    Error 68 error LNK2001: unresolved external symbol _IID_IFunctionDiscovery FunDiscovery.obj

    I must have something set up wrong, can you help

    Thank you.



  • CKLEIN

    Well, I looked on the other (XP) machine, and there are a (rude word for "whole bunch") of lib files installed there that I don't have. So I guess I will tear it all down and start over. My SDK installation was not interrupted, but who knows... I'll have to uninstall the Orca extensions first, then Visual Studio, then the SDK I guess. Then reinstall again in that order. Takes about 2 hours or something like that. I know, waaah waaah waaah... ;-)

    Thanks for the help, I'll come back and let you know if it worked.



  • schmittde

    Here are the modification in aim to use FD samples :

    In FunDiscovery.h : Replace all instances of the line __RPC__in_opt IUnknown *pIUnknownForQuery, with RPC__in_opt FDQUERYCONTEXT fdqcQueryContext, In the original version of FunDiscovery.h, there are three instances of this statement; one at line 61, one at line 69, and one at line 79.

    In FunDiscovery.cpp :Replace all instances of the line IUnknown *pIUnknownForQuery, with FDQUERYCONTEXT fdqcQueryContext, In the original version of FunDiscovery.cpp


  • johnvarney

    Function Discovery is brand new for Vista so the 2005 Visual Studio won't know about it yet. The uuid.lib has to come from the Platform SDK.

    In my [Program Files]Microsoft SDKs\Windows\v6.0\Lib, there is a uuid.lib. That's also the path I used as my Visual Studio library path.

    What your SDK download or installation interrupted Will the sample compile on the machine you copied the headers from

    - Kristina Hotz [MSFT]

    This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm


  • Rob1234

    I noticed the same thing. I reposted my old post just now.

    This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm


  • MarlAtkins

    The sample in the Microsoft Windows SDK for Windows Vista builds.< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

     

    Be sure you’re using the most recent SDK on the MSDN. (http://www.microsoft.com/downloads/details.aspx FamilyID=c2b1e300-f358-4523-b479-f53d234cdccf&DisplayLang=en)

     

    In Visual Studio or Visual Studio express add the SDK’s library and include paths to the VC++ Directories.

     

    If you see access denied errors in Windows Vista, it’s because the Program Files directory and subdirectories are protected.  The easiest way to get around this is to copy the FD sample to your Visual Studio projects directory and build it from there.

     

    Also, be sure to make the modifications Mathieu pointed out.  The sample will build without these modifications, but it will not run correctly.

     

    Cheers,

    Kristina

     


  • SportsDave

    Tried that, but no help really. I think my sample is older, or different, than the one you are referring to...

  • Billakong

    It is present in the ...\Lib\X64 directory of my SDK. I tried explicitly including that library path first, but that just made things worse. There are other uuid.lib copies in various places on my disk, associated with Visual Studio, but not with the SDK.

    Can you give me some more clues



  • Function Discovery