locked
cannot run the sample with system error 6: ERROR_INVALID_HANDLE RRS feed

  • Question

  • hi, 

    I'm a newbie in both writting a driver and WFP,  I'm intreasted in the technique of windows filtering platform. however, I cannot even run the samples given in the forum. I installed Visual studio 2012 RC and WDK 8. Since microsoft says, it's more convient to build a driver with the newest VS. My computer OS is windows 7 ultimate X86. and I build the "ddproxy" sample with Win7 Debug, X86. then installed the driver in my own computer by the "ddproxy.inf" file, generated by the Visual Studio. And I also changed the registry 

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ddproxy:

    however, when I try to run the driver, the system replies that there is a system error: system error 6, ERROR_INVALID_HANDLE .

    does anyone knows how to fix this problem? thanks

    Thursday, June 28, 2012 5:48 AM

All replies

  • Try putting the values under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ddproxy\Parameters\

        o  InspectUdp (REG_DWORD) : 0 (ICMP); 1 (UDP, default) 
        o  DestinationAddressToIntercept (REG_SZ) : literal IPv4/IPv6 string  
                                                    (e.g. �10.0.0.1�) 
        o  DestinationPortToIntercept (REG_DWORD) : applicable if InspectUdp is 1 
        o  NewDestinationAddress(REG_SZ) : literal IPv4/IPv6 string 
        o  NewDestinationPort(REG_DWORD) 

    Hope this helps,


    Dusty Harper [MSFT]
    Microsoft Corporation
    ------------------------------------------------------------
    This posting is provided "AS IS", with NO warranties and confers NO rights
    ------------------------------------------------------------

    Thursday, June 28, 2012 8:48 PM
    Moderator
  • thanks for your help, Dusty. I noticed the registry path offered in the code and in  the sample description are not the same. And I tried both. But the error still there. However, I could run the sample in Windows 8 RP OS with the registry path offered in the code (under ddproxy\Parameters\). I'm wondering there is some handle used by the code is ONLY valid in Windows 8 rather than Windows 7.  If so could you tell me where the differece is in win7 and win8?

    thanks a lot

    brandon

    Friday, June 29, 2012 10:32 AM
  • hi,I just want to mention that when I type "net start ddproxy"in windows 7 X86, the system replies Invalid Handle. and when I type "net start ddproxy" in windows 8 X86, the system replies parameter is incorrect. I guess the related service does not start! I also checked the service list by typing net start, and there is no ddproxy or anythink looks like in it. However, there is related value in register and ddproxy.sys is in the system32/driver/ folder, and I added the parameters under

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ddproxy\Parameters\

    Could anyone help me? I'm troubled in this problem for a whole week!

    thanks;

    Monday, July 2, 2012 9:24 AM
  • I have been unable to reproduce this issue.  As stated, all of the parameters must be under the Parameters key

    Hope this helps,


    Dusty Harper [MSFT]
    Microsoft Corporation
    ------------------------------------------------------------
    This posting is provided "AS IS", with NO warranties and confers NO rights
    ------------------------------------------------------------




    Monday, July 2, 2012 4:32 PM
    Moderator
  • Hi all,

    I face similar problems when building both ddproxy and inspect in Win 7 x64 using WDK 8.

    Error 6 occurs in the net start stage no matter I build the driver by VS 2012 RC or command line, and wherever I put the values in the register (under the root key or under Parameters).

    I would appreciate if anyone could provide the answer for this issue.

    Regards and Thanks.

    Tuesday, July 3, 2012 12:38 PM
  • Turns out that the attempted repro was being done with old sources.  I will attempt to repro this myself in the next few days.

    Thanks,


    Dusty Harper [MSFT]
    Microsoft Corporation
    ------------------------------------------------------------
    This posting is provided "AS IS", with NO warranties and confers NO rights
    ------------------------------------------------------------

    Tuesday, July 3, 2012 11:27 PM
    Moderator
  • I have successfully repro'd the issue and am investigating the cause.

    Thanks,


    Dusty Harper [MSFT]
    Microsoft Corporation
    ------------------------------------------------------------
    This posting is provided "AS IS", with NO warranties and confers NO rights
    ------------------------------------------------------------

    Wednesday, July 4, 2012 2:00 AM
    Moderator
  • Hi Dusty,

    Glad to hear that you are working on it. I've tried ddproxy, inspect and msnmntr, all of which have this "system error 6". For this reason, I have no way to work with the callout. 

    Could you provide a method to work around it before the problem is solved? You mentioned that the old sources could work. Where can I find the old sources to begin with?

    Thanks.

    Thursday, July 5, 2012 3:35 AM
  •  Where can I find the old sources to begin with?

    Hi,

    You can find old sources by installing Windows Driver Kit Version 7.1.0. Sources are in directory c:\WinDDK\7600.16385.1\src\network\trans

    BR, Antti

    Friday, July 6, 2012 6:19 AM
  •  Where can I find the old sources to begin with?

    Hi,

    You can find old sources by installing Windows Driver Kit Version 7.1.0. Sources are in directory c:\WinDDK\7600.16385.1\src\network\trans

    BR, Antti

    Thank you, Antti. I will try it.

    Result: The old sources work for me, with the parameters put under the "ddproxy" root in the registry.

    • Edited by xujingxi Friday, July 6, 2012 9:27 AM
    Friday, July 6, 2012 6:52 AM
  • I am having a problem also. Any luck with your investigation?

    Thanks,

    Joe


    Joe Field

    Tuesday, July 31, 2012 9:08 PM
  • This is still under investigation.  Current hypothesis is that it is an issue with the coinstaller, as we are not seeing this when built outside of the VS environment.

    I'll update when more is known.

    Thanks,


    Dusty Harper [MSFT]
    Microsoft Corporation
    ------------------------------------------------------------
    This posting is provided "AS IS", with NO warranties and confers NO rights
    ------------------------------------------------------------

    Wednesday, August 1, 2012 4:38 AM
    Moderator
  • When you modify your VS environment to target Win7, you need to make sure you modify the KMDF Minor version to be 9 (default for Win8 is 11).  I am following up with the VS folks to see if they can fix this and target the latest supported when you change the target version.  Regardless though, this should clear up the issue.

    Hope this helps,


    Dusty Harper [MSFT]
    Microsoft Corporation
    ------------------------------------------------------------
    This posting is provided "AS IS", with NO warranties and confers NO rights
    ------------------------------------------------------------

    Wednesday, September 12, 2012 6:17 PM
    Moderator