virtual Usb HID device
Posted Date Unknown mohammad hadavand 14 Comments


Hi
My name is Mohammad  Hadavand

I saw your education and training Thank you for this http://tektips.in/how-to-develop-a-hello-world-device-driver.aspx

     But I have a question

             How can I create a virtual Usb HID device using WDK on WIN7 32 bit?(add to device manger)
             And then I send and receive data?(application test)
              Please help me. Resources the Internet has misled me.
              please tell me a simple example

See All Responses Below...
Author
Message Rating
Posted on: 21/06/2014

You Need to change the IoCreateDevice routine in DriverEntry especially FILE_DEVICE_UNKNOWN part to say  FILE_DEVICE_KEYBOARDTypes and associated changes.


PDEVICE_OBJECT deviceObject;

RtlInitUnicodeString(&deviceName, L"DeviceMyHwDriver");
RtlInitUnicodeString(&symLinkName, L"DosDevicesMyHwDriver");


status = IoCreateDevice(
    DriverObject,
    sizeof(REGISTER_EVENT),
    &deviceName,
    0, //FILE_DEVICE_UNKNOWN,
    0,
    FALSE,
    &deviceObject);

http://msdn.microsoft.com/en-us/library/windows/hardware/ff563821%28v=vs.85%29.aspx

Check DDK/WDK Sample for more details. It will definitely contains samples which you can adapt..

Tom



Posted on: 21/06/2014
Share this page across other social networking sites



Posted on: 21/06/2014
Wow, how much did you give a quick answer
Thank you
How can I do with "VID/PID" make owen sample virual device
If possible take a simple example
Thank you

I'm sorry I think you misunderstood my post
Posted on: 21/06/2014
I'm sorry for the many questions and amateur
I wrote make an USB virtual device "using wdk 32 bit in win7" by
Special "vid,pid" and ,using app tester and communicate with her

if possible please help me with examples
I'm a newbie
Thank you

Share this page across other social networking sites



Posted on: 21/06/2014
I dont have time now to create a HID Driver sample. The Driver Video tutorial is just a basic one from which you should be able to jump start t your project. Just try it.. You will succeed..

Tom
Posted on: 22/06/2014
I started

when i compile driver give error on small sample driver :
********************************************************************************
C:WinDDK7600.16385.1>cd C:WinDDK7600.16385.1srcmy

C:WinDDK7600.16385.1srcmy>build hello.c
path contains nonexistant c:usersadministratorappdatalocalandizip7z, removing
BUILD: Compile and Link for x86
BUILD: Loading c:winddk7600.16385.1uild.dat...
BUILD: Computing Include file dependencies:
BUILD: Start time: Sun Jun 22 17:00:56 2014
BUILD: Saving c:winddk7600.16385.1uild.dat...
BUILD: Finish time: Sun Jun 22 17:01:05 2014
BUILD: Done

    0 files compiled - 1 Warning
************************************************************

hello.c :
#include <ntddk.h>

VOID Unload(IN PDRIVER_OBJECT pDriverObject)
{
 DbgPrint("Driver Unloaded. ");
 return;
}

NTSTATUS DriverEntry(IN PDRIVER_OBJECT pDriverObject, IN PUNICODE_STRING regPath)
{
 DbgPrint("Hello World!. ");
 pDriverObject->DriverUnload = Unload;

 return STATUS_SUCCESS;
}

makefile:
!INCLUDE $(NTMAKEENV)makefile.def
TARGETNAME = hello
TARGETPATH = obj
TARGETTYPE = DRIVER

SOURCES:

INCLUDES   = %BUILD%inc
LIBS       = %BUILD%lib

SOURCES    = hello.c




Share this page across other social networking sites



Posted on: 22/06/2014
Please put the code on correct directory and then compile it. see the Video and the Directory in which it is placed..

Tom
Posted on: 22/06/2014
my sample porject contain :
hello.c
makefile
source
and Directory is:C:WinDDK7600.16385.1srcmy
I went as directed by your Video
But it's still err ! 'Why?
this a problem Of  The code?or path Directory?
Share this page across other social networking sites



Posted on: 22/06/2014
when i open OACR,give a warning "6051"
Maybe the problem than this. i dont Know
I'm sorry to ask so many questions
Posted on: 22/06/2014
your project compile and :
OACR monitor running already

C:WinDDK7600.16385.1>cd C:WinDDK 7600.16385.1 src HelloWorld MyDriver

C:WinDDK7600.16385.1srcHelloWorldMyDriver>build
path contains nonexistant c:usersadministratorappdatalocalandizip7z, removing
BUILD: Compile and Link for x86
BUILD: Loading c:winddk7600.16385.1uild.dat...
BUILD: Computing Include file dependencies:
BUILD: Start time: Sun Jun 22 17:18:39 2014
BUILD: Examining c:winddk7600.16385.1srchelloworldmydriver directory for files to compile.
    c:winddk7600.16385.1srchelloworldmydriver Invalidating OACR warning log for 'WDKSamples:x86chk'
BUILD: Saving c:winddk7600.16385.1uild.dat...
BUILD: Compiling and Linking c:winddk7600.16385.1srchelloworldmydriver directory
Configuring OACR for 'WDKSamples:x86chk' - <OACR on>
Compiling - mydriver.c
Linking Executable - objchk_win7_x86i386mydriver.sys
BUILD: Finish time: Sun Jun 22 17:18:45 2014
BUILD: Done

    3 files compiled - 2 Warnings - 175 LPS
    1 executable built

C:WinDDK7600.16385.1srcHelloWorldMyDriver>

why in my sample deriver give err?









Share this page across other social networking sites



Posted on: 22/06/2014
You might be missing something in the source code or in the make file.. Please check..

tom
Posted on: 22/06/2014
I've cheked But I do not know how to change ,Is there a problem source code & make file?
why your sample compiled
Without problem and this sample "hello world" not ?


Share this page across other social networking sites



Posted on: 22/06/2014
I used this sample:
http://sriramk.com/world-windows-driver-from-scratch
Where is the problem?
Posted on: 23/06/2014
Thank you, Tom ,I succeeded
I'm request a question
Question:
With
only this package(WDK 7) can i communicate with HID Device?, Or better than, like Useing libraries(Vusb based,vmoulti,libusb)?

request:
If possible, put a video tutorial about creat Virtual Usb hid device.
Thank you very much
Share this page across other social networking sites



Please Login to Post Your Comments
Name (Max. 100 characters)
Please post your comments here
Select Language
Comments
Attach File(Max. Size: 2 MB)
A few simple rules when posting your Comments,
  1. Please post only answers relevant to the topic of discussion.
  2. Please dont misuse this site or do not be abusive, offensive, inappropriate,harass anyone on the boards or post ads or spam. Doing so will delete your inappropriate messages and will block or delete your account on this site. 

TekTipsDownload
GateExam
Academic Projects
TekTipsExperts



 
Site optimized for IE7, 1280 X 768 and above. Copyright © 2010 - 2018 KTS InfoTech
Site Developed Using KTS WebCloud