none
ActivateDeviceEx- Returns Error Code as 1260. RRS feed

  • Question

  •  

    Hi,

     

    To better understand the communication between the application and driver. I have developed a “Proxy Driver” and placed it under windows directory.

    Below mentioned are the respective registry entries and export functions calls  for the same.

     

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\ProxyDrv]

    "Dll"="ProxyDrv.dll"

    "Index"=dword:00000001

    "Order"=dword:0000000a

    "Prefix"="PRO"

     

    LIBRARY ProxyDrv

    EXPORTS

        PRO_Init

        PRO_PreDeinit

        PRO_Deinit

        PRO_Open

        PRO_PreClose

        PRO_Close

        PRO_Read

        PRO_Write

        PRO_Seek

        PRO_IOControl

     

     

    While calling the driver from COM library via ActivateDeviceEx() API I am getting the following error code. 

     

    “This program is blocked by group policy. For more information, contact your system administrator.” (Error Code – 1260).

    I'am not getting any clue on this error message.So kindly let me know how to solve this issue.


    Thanks,

    Shankar B.


     

    Wednesday, December 22, 2010 5:11 AM

All replies

  • Since you have entered "BuiltIn" in the [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\ProxyDrv] , Busenum.dll will load your driver automatically during the device booting time. Again Busenum.dll will use the same ActivateDeviceEx() API. I am not sure about the behaviour of the loading already loaded driver second time using the ActivateDeviceEx().

    Change the registry settings to [HKEY_LOCAL_MACHINE\Drivers\ProxyDrv] and try it. No need of Index and Order registry keys. Try to call the driver from application instead of COM library for debugging purpose.

    I have loaded my custom driver with the following registry key successfully.

    [HKEY_LOCAL_MACHINE\Drivers\FLASHDRV]        ;No Buildin key. This driver is loaded and unloaded dynamically,when the corresponding APIs are called.
        "Dll"="FLASHDRV.dll"           
        "Prefix"="FLS"

    I have called the ActivateDeviceEx() from my custom API DLL sucessfully with the following parameters.

     HANDLE hActiveDriver = ActivateDeviceEx(L"\\Drivers\\FLASHDRV", NULL, 0, NULL);

     


    Vinoth.R http://vinoth-vinothblog.blogspot.com http://www.e-consystems.com
    Wednesday, December 22, 2010 7:38 AM
  • On 12/22/2010 6:11 AM, Sankar Balasubramanian wrote:
    > Hi,
    [...]
    > I'am not getting any clue on this error message.So kindly let me know
    > how to solve this issue.
     
    If you are using CE 6 and your driver is inside your OS image you need
    to set the "K" flag or put it in the files section to allow it to be
    loaded in kernel mode.
    If your driver is not inside the OS image it may be that your OS image
    supports CERTMOD and allows loading of signed modules only.
     

    Valter Minute
    Windows Embedded MVP
    http://geekswithblogs.net/WindowsEmbeddedCookbook
    Thursday, December 23, 2010 11:44 AM
  •  

    Thanks for all your response.

    As you suggested I've placed the driver(proxyDrv.dll) under drivers directory and called the same via ActivateDeviceEx() .

    HANDLE hActiveDriver = ActivateDeviceEx(L"\\Drivers\ProxyDrv", NULL, 0, NULL);

    This time GetLastError() returns me as Value 1 (Incorrect function)

    Any help pls.

     

    --------------------

    Shankar B.

     

     

     

     

     

    Monday, December 27, 2010 8:58 AM
  • On 12/27/2010 9:58 AM, Sankar Balasubramanian wrote:
    > Thanks for all your response.
    >
    > As you suggested I've placed the driver(proxyDrv.dll) under drivers
    > directory and called the same via ActivateDeviceEx() .
    >
    > *HANDLE hActiveDriver = ActivateDeviceEx(L"\\Drivers\ProxyDrv", NULL, 0,
    > NULL);*
    >
    > This time GetLastError() returns me as Value *1 (Incorrect function)*
    >
    > Any help pls.
    >
    > --------------------
    >
    > Shankar B.
    >
     
    Check that your DLL exports all the required entry points. You can used
    dumpbin /exports from command line to list exported symbols of your
    driver DLL.
     

    Valter Minute
    Windows Embedded MVP
    http://geekswithblogs.net/WindowsEmbeddedCookbook
    Monday, December 27, 2010 10:55 AM
  • Hi,

    I think there is a mistake in you string it should be:

    HANDLE hActiveDriver = ActivateDeviceEx(L"\\Drivers\\ ProxyDrv", NULL, 0, NULL);

    Regards

    Fabrice

    Wednesday, December 29, 2010 4:38 PM