各位大侠,我没有找到DDK。听说MSDN包含了DDK,因此安装了MSDN 2003 Feb 中文版。就是那个3CD的版本。但是安装完了找不到DDK了。更要命的是由于我的机器上装了MSVC 6.0英文版, MSVC .NET 2002英文版, MSVC .NET 2003中文版,因此我也搞不清到哪里去找DDK.现在我的问题如下:1.如何知道DDK有无安装,如果安装了,DDK都是到了哪个目录下了?
2.我用VC编译一个sample程序,不是驱动程序,是普通程序用到一些DDK里的函数,现在仍然无法通过编译。那几个DDK里的函数都找不到。请问我该如何设置我的VC来找到那些DDK呢?假设用MSVC .NET 2002英文版的话?谢谢大家!

解决方案 »

  1.   

    DDK不在MSDN中,给个QQ或MSN,给你发一个。
      

  2.   

    您等着。我装一个MSN.编译程序出现如下的错误。帮我看一下是不是没有DDK的缘故。trymonitor error LNK2019: unresolved external symbol __imp__SetupDiEnumDeviceInfo@12 referenced in function "int __cdecl EnumDevices(void)" (?EnumDevices@@YAHXZ)
    trymonitor error LNK2019: unresolved external symbol __imp__SetupDiGetClassDevsExA@28 referenced in function "int __cdecl EnumDevices(void)" (?EnumDevices@@YAHXZ)
    trymonitor error LNK2019: unresolved external symbol __imp__SetupDiOpenDevRegKey@24 referenced in function "void __cdecl PlayWithDeviceInfo(void *,struct _SP_DEVINFO_DATA *)" (?PlayWithDeviceInfo@@YAXPAXPAU_SP_DEVINFO_DATA@@@Z)
    trymonitor error LNK2019: unresolved external symbol __imp__SetupDiGetDeviceRegistryPropertyA@28 referenced in function "void __cdecl PlayWithDeviceInfo(void *,struct _SP_DEVINFO_DATA *)" (?PlayWithDeviceInfo@@YAXPAXPAU_SP_DEVINFO_DATA@@@Z)
    trymonitor error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup
    trymonitor fatal error LNK1120: 5 unresolved externals
      

  3.   

    你要先安装vc在安装ddk,ddk的安装路径是自己决定的
    记得安装完ddk后要编译builder -cz
    ddk的包含文件的建立在vc工具->选择->目录添加上你的ddk的inc的目录
      

  4.   

    这个错误是你没加SETUPAPI.LIB和NEWDEV.LIB
      

  5.   

    又少了两个错误,最新的错误如下:
    g:\trymonitor\trymonitor.c(98): warning C4101: 'devInfoSetDetailData' : unreferenced local variable
    trymonitor error LNK2019: unresolved external symbol __imp__SetupDiEnumDeviceInfo@12 referenced in function _EnumDevices
    trymonitor error LNK2019: unresolved external symbol __imp__SetupDiGetClassDevsExA@28 referenced in function _EnumDevices
    trymonitor error LNK2019: unresolved external symbol __imp__SetupDiOpenDevRegKey@24 referenced in function _PlayWithDeviceInfo
    trymonitor error LNK2019: unresolved external symbol __imp__SetupDiGetDeviceRegistryPropertyA@28 referenced in function _PlayWithDeviceInfo
    trymonitor fatal error LNK1120: 4 unresolved externals
      

  6.   

    ddk的帮助文件有你ddk的函数说明
    再者从msdn2001起就有了安装函数的说明,你安装了msdn2001或以上的版本,在vc中你选中了此函数按f1就可以了
      

  7.   

    ddk的里面就有,你可以把他考到你的文件目录下
      

  8.   

    msdn是包括DDK
    你装的是msdn library吧