Re: Driver filter for Serial Port
From: Slobodan Brcin \(eMVP\) (sbrcin_at_ptt.yu)
Date: 05/31/04
- Next message: colin.marsh_at_ajbsoftware.com: "CreateProcessAsUser - Access Denied (in some situations)"
- Previous message: Alex: "Re: Driver filter for Serial Port"
- In reply to: Alex: "Re: Driver filter for Serial Port"
- Next in thread: Alex: "Re: Driver filter for Serial Port"
- Reply: Alex: "Re: Driver filter for Serial Port"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 31 May 2004 23:01:52 +0200
Yup.
"Alex" <Chipheo2k@hotmail.com> wrote in message news:uCJi300REHA.2704@TK2MSFTNGP10.phx.gbl...
> Hi Slobodan !
> Yeah , I have write my Program in API and Use it to Communicate via Comm
> Port normally , it works very well , of course .
> Maybe you mean, I need set All Parameter of COMM port before call it inmy
> Driver ??
> Ok , I do it now !
> Thanks alot
> Regards!
>
>
> "Slobodan Brcin (eMVP)" <sbrcin@ptt.yu> wrote in message
> news:OzBDqp0REHA.3608@TK2MSFTNGP10.phx.gbl...
> > Alex you never mentioned if you ever written one functional program for
> this purpose in user mode.
> > I suggest you to make one trough API only not some fancy third party
> classes but trough CreateFile etc.
> > Then write on paper all calls and structures you used for initialization
> of your port.
> > After that it will be easy for you to port all calls to driver using IOCTL
> codes.
> >
> > Regards,
> > Slobodan
> >
> > "Alex" <Chipheo2k@hotmail.com> wrote in message
> news:%23NT$4Y0REHA.3608@TK2MSFTNGP10.phx.gbl...
> > > Ok , thanks a lot !
> > > maybe they are enough for me !
> > > But , Slobodan !
> > > I have tested the Function u gave me . But I jumped into Infinite loop
> of
> > > WaitForSingleObject .
> > >
> > >
> > > NTSTATUS SerialWrite( const void *WriteBuffer, ULONG NumBytes,
> > > PIO_STATUS_BLOCK iosb, PDEVICE_OBJECT pdo)
> > > {
> > > if(!pdo) return STATUS_UNSUCCESSFUL;
> > > NTSTATUS status;
> > > PIRP irp;
> > > LARGE_INTEGER startingOffset;
> > > KEVENT event;
> > > startingOffset.QuadPart = (LONGLONG) 0;
> > > KeInitializeEvent(&event, NotificationEvent, FALSE);
> > > DbgPrint("initial Event OK in Write ");
> > > irp = IoBuildSynchronousFsdRequest( IRP_MJ_WRITE, pdo,
> > > (PVOID)WriteBuffer, NumBytes, &startingOffset, &event, iosb );
> > > if(!irp) return STATUS_INSUFFICIENT_RESOURCES;
> > > DbgPrint("Build IRP OK !");
> > > status = IoCallDriver( pdo, irp );
> > > DbgPrint("maybe waiting...");
> > > if (status == STATUS_PENDING)
> > > status = KeWaitForSingleObject( &event, Executive, KernelMode, FALSE,
> > > NULL);
> > > if(status!=STATUS_SUCCESS) return status;
> > > return iosb->Status;
> > > }
> > >
> > > and I have get this result :
> > >
> > > initial Event OK in Write
> > > Build IRP OK !
> > > maybe waiting...
> > >
> > >
> > > Best regards !
> > >
> > >
> > >
> > >
> > > "Slobodan Brcin (eMVP)" <sbrcin@ptt.yu> wrote in message
> > > news:#z96JQ0REHA.556@tk2msftngp13.phx.gbl...
> > > > Alex,
> > > >
> > > > You will have to use things like
> > > > irp=IoBuildDeviceIoControlRequest(IOCTL_SERIAL_SET_BAUD_RATE
> > > >
> > > > Read about all IOCTL_SERIAL_* codes since you will need them to
> initialize
> > > your serial port.
> > > >
> > > > So:
> > > > 1. Open thread.
> > > > 2. Open serial port.
> > > > 3. Initialize serial port.
> > > > 4. Make loop.
> > > > 5 Wait for read event or thread close.
> > > > When you get some info parse them and do the time stuff.
> > > > 6. go to 4.
> > > > 7. You can even forget PnP start/stop support so this will simplify
> your
> > > driver even more.
> > > >
> > > > This is very crude but it will work.
> > > >
> > > > Good luck with that.
> > > > Slobodan
> > > >
> > > > "Alex" <Chipheo2k@hotmail.com> wrote in message
> > > news:uDtT$2zREHA.3988@tk2msftngp13.phx.gbl...
> > > > > Hi Slobodan !
> > > > > A Speacial THANK to your enthusiasm !
> > > > > OK , it's very useful for me now , And I am now reading some
> > > documentation
> > > > > about those functions .
> > > > > By the Way , Only tell me Which other functions i need to read
> know to
> > > > > implement my Work by your manner ! I have no more time now , So I
> need
> > > help
> > > > > from U , only tell me Which Functions I must to find and read in
> > > > > Documentation !
> > > > > Thanks again !
> > > > > Best Regards!
> > > > >
> > > > >
> > > > > "Slobodan Brcin (eMVP)" <sbrcin@ptt.yu> wrote in message
> > > > > news:#9ipv0yREHA.644@tk2msftngp13.phx.gbl...
> > > > > > This should be exercise for you. (To read documentations and
> samples)
> > > > > >
> > > > > > Do the read similarly as write.
> > > > > > And please notice that event is used. So you can implement this is
> a
> > > way
> > > > > that fit your requirements.
> > > > > >
> > > > > > NTSTATUS SerialWrite( const void *WriteBuffer, ULONG NumBytes,
> > > > > IO_STATUS_BLOCK &iosb)
> > > > > > {
> > > > > > if(!PDO) return STATUS_UNSUCCESSFUL;
> > > > > > NTSTATUS status;
> > > > > > PIRP irp;
> > > > > > LARGE_INTEGER startingOffset;
> > > > > > KEVENT event;
> > > > > > startingOffset.QuadPart = (LONGLONG) 0;
> > > > > > KeInitializeEvent(&event, NotificationEvent, FALSE);
> > > > > > irp = IoBuildSynchronousFsdRequest( IRP_MJ_WRITE, PDO,
> > > > > (PVOID)WriteBuffer, NumBytes, &startingOffset, &event, &iosb );
> > > > > > if(!irp) return STATUS_INSUFFICIENT_RESOURCES;
> > > > > > status = IoCallDriver(PDO, irp);
> > > > > > if (status == STATUS_PENDING)
> > > > > > status = KeWaitForSingleObject( &event, Executive, KernelMode,
> > > FALSE,
> > > > > NULL);
> > > > > > if(status!=STATUS_SUCCESS) return status;
> > > > > > return iosb.Status;
> > > > > > }
> > > > > >
> > > > > > Regards,
> > > > > > Slobodan
> > > > > >
> > > > > >
> > > > > > "Alex" <Chipheo2k@hotmail.com> wrote in message
> > > > > news:Oj0IRLyREHA.2772@TK2MSFTNGP10.phx.gbl...
> > > > > > >
> > > > > > > Ok !
> > > > > > > Thank you !
> > > > > > > I have successfully open COM port after restarting computer (by
> The
> > > > > fragment
> > > > > > > you gave me , but notice the same name , I use with
> ZwCreateFile ,
> > > It
> > > > > did
> > > > > > > not work ! ) .( I use Windows XP ).
> > > > > > > But now , The other problem that I can not Write to the Port now
> .
> > > > > > >
> > > > > > > #define SERIAL_DEVICE_NAME0 L"\\Device\\Serial0"
> > > > > > > UNICODE_STRING ntDeviceName;
> > > > > > > RtlInitUnicodeString(&ntDeviceName, SERIAL_DEVICE_NAME0);
> > > > > > >
> > > > > > > NTSTATUS status=IoGetDeviceObjectPointer(&ntDeviceName,
> > > > > > > FILE_ALL_ACCESS,
> > > > > > > &pdx->m_hComm, &pdx->m_pdoComm);
> > > > > > >
> > > > > > > HANDLE m_hFile = (HANDLE) pdx->m_hComm;
> > > > > > > IO_STATUS_BLOCK ioStat;
> > > > > > > UCHAR pBuffer[8];
> > > > > > > ULONG dwRead = 8;
> > > > > > >
> > > > > > > NTSTATUS statusWrite = ZwWriteFile(
> > > > > > > m_hFile,
> > > > > > > NULL,
> > > > > > > NULL,
> > > > > > > NULL,
> > > > > > > &ioStat,
> > > > > > > pBuffer,
> > > > > > > dwRead,
> > > > > > > NULL,
> > > > > > > NULL
> > > > > > > );
> > > > > > >
> > > > > > > if( !NT_SUCCESS( status ) )
> > > > > > > DbgPrint("Open COMM failed !");
> > > > > > > else
> > > > > > > DbgPrint("Open COMM OK !\n");
> > > > > > > DbgPrint(" status open COMM = %X ", status );
> > > > > > > if( !NT_SUCCESS( statusWrite ) )
> > > > > > > DbgPrint("Write COMM failed !");
> > > > > > > else
> > > > > > > DbgPrint("Write COMM OK !\n");
> > > > > > > DbgPrint(" status Write COMM = %X ", statusWrite );
> > > > > > >
> > > > > > > and the result :
> > > > > > >
> > > > > > > Example= DriverEntry successfully completed.
> > > > > > > Open COMM OK !
> > > > > > > status open COMM = 0
> > > > > > > Write COMM failed !
> > > > > > > status Write COMM = C0000008
> > > > > > > Unloaded successfully
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > "Slobodan Brcin (eMVP)" <sbrcin@ptt.yu> wrote in message
> > > > > > > news:uH7$BaxREHA.3124@TK2MSFTNGP12.phx.gbl...
> > > > > > > > Error you mentioned in email:
> > > > > > > >
> > > > > > > > // {Access Denied}
> > > > > > > > // A process has requested access to an object, but has not
> been
> > > > > granted
> > > > > > > those access rights.
> > > > > > > > //
> > > > > > > > #define STATUS_ACCESS_DENIED
> ((NTSTATUS)0xC0000022L)
> > > > > > > >
> > > > > > > > Try some unopened serial port.
> > > > > > > >
> > > > > > > > And please use this NG for all your posts so someone else can
> help
> > > > > you.
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > Slobodan
> > > > > > > >
> > > > > > > > BTW: What OS are you using for testing purposes.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > "Alex" <Chipheo2k@hotmail.com> wrote in message
> > > > > > > news:%23bpg0VxREHA.556@TK2MSFTNGP10.phx.gbl...
> > > > > > > > > Sicenrely thank Slobodan !
> > > > > > > > > But , my COM port always ready to work, I can open it by
> > > CreateFile
> > > > > in
> > > > > > > user
> > > > > > > > > mode normally .
> > > > > > > > > and by the way , why Serials0 ?? I think that , Serial0 is
> only
> > > > > Function
> > > > > > > > > driver , We call COM1 to call to the Stack ( Drivers Chain )
> .
> > > > > right?
> > > > > > > > > Even I tried with COM1 or Serial0 , I have never openned
> > > it...hic
> > > > > hic
> > > > > > > > > Regards !
> > > > > > > > > Alex!
> > > > > > > > >
> > > > > > > > > "Slobodan Brcin (eMVP)" <sbrcin@ptt.yu> wrote in message
> > > > > > > > > news:##XxVYwREHA.3628@TK2MSFTNGP12.phx.gbl...
> > > > > > > > > > Alex,
> > > > > > > > > >
> > > > > > > > > > Make sure that your driver start after the serial driver.
> The
> > > > > easiest
> > > > > > > way
> > > > > > > > > to do this is trough inf file.
> > > > > > > > > > Although you can always do this programmatically.
> > > > > > > > > > BTW: This is relevant only when you boot your computer. If
> you
> > > > > just
> > > > > > > start
> > > > > > > > > your driver when system is running then this is no issue.
> > > > > > > > > >
> > > > > > > > > > Also consider using something like functions:
> > > > > > > > > > IoCallDriver
> > > > > > > > > > IoBuildDeviceIoControlRequest
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > #define SERIAL_DEVICE_NAME0 L"\\Device\\Serial0"
> > > > > > > > > >
> > > > > > > > > > UNICODE_STRING ntDeviceName;
> > > > > > > > > > RtlInitUnicodeString(&ntDeviceName, SERIAL_DEVICE_NAME0);
> > > > > > > > > > PFO=0;
> > > > > > > > > > PDO=0;
> > > > > > > > > > NTSTATUS status=IoGetDeviceObjectPointer(&ntDeviceName,
> > > > > > > FILE_ALL_ACCESS,
> > > > > > > > > > &PFO, &PDO);
> > > > > > > > > >
> > > > > > > > > > Regards,
> > > > > > > > > > Slobodan
> > > > > > > > > >
> > > > > > > > > > "Alex" <Chipheo2k@hotmail.com> wrote in message
> > > > > > > > > news:%23%23EfU7tREHA.2404@TK2MSFTNGP09.phx.gbl...
> > > > > > > > > > > Thank you !
> > > > > > > > > > > Because of a stupid reason , I have never opened
> > > successfully my
> > > > > Com
> > > > > > > > > port ,
> > > > > > > > > > > So i can not write the driver as you advised me .I am
> trying
> > > to
> > > > > open
> > > > > > > ,
> > > > > > > > > > > but..not success by ZwOpenFile or ZwCreateFile ..The
> > > fragment
> > > > > like
> > > > > > > that
> > > > > > > > > .
> > > > > > > > > > > Pls see the code below .. by the way. I want my thread
> to be
> > > > > awaked
> > > > > > > when
> > > > > > > > > > > there is a byte came in my Port...it's a signal i need
> !
> > > > > > > > > > > Thanks for the enthusiasm !
> > > > > > > > > > >
> > > > > > > > > > > HANDLE fileOpen;
> > > > > > > > > > > OBJECT_ATTRIBUTES objAttr;
> > > > > > > > > > > UNICODE_STRING sLinkName;
> > > > > > > > > > > #define COM_NAME L"\\DosDevices\\COM1" /* or
> L''COM1"
> > > */
> > > > > > > > > > > RtlInitUnicodeString( &sLinkName, COM_NAME);
> > > > > > > > > > >
> > > > > > > > > > > InitializeObjectAttributes(
> > > > > > > > > > > &objAttr,
> > > > > > > > > > > &sLinkName,
> > > > > > > > > > > OBJ_INHERIT | OBJ_PERMANENT | OBJ_EXCLUSIVE |
> > > > > OBJ_CASE_INSENSITIVE
> > > > > > > > > > > |OBJ_OPENIF,
> > > > > > > > > > > NULL,
> > > > > > > > > > > NULL);
> > > > > > > > > > > LARGE_INTEGER nSize;
> > > > > > > > > > > IO_STATUS_BLOCK ioStat;
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > NTSTATUS statusOpen = ZwCreateFile(
> > > > > > > > > > > OUT &fileOpen,
> > > > > > > > > > > IN FILE_READ_DATA,
> > > > > > > > > > > IN &objAttr,
> > > > > > > > > > > OUT &ioStat,
> > > > > > > > > > > &nSize,
> > > > > > > > > > > IN FILE_ATTRIBUTE_NORMAL,
> > > > > > > > > > > IN FILE_SHARE_READ,
> > > > > > > > > > > IN FILE_OPEN,
> > > > > > > > > > > IN FILE_WRITE_THROUGH,
> > > > > > > > > > > IN NULL,
> > > > > > > > > > > IN 0
> > > > > > > > > > > );
> > > > > > > > > > > #if DBG
> > > > > > > > > > > DbgPrint("statusOpen= %X.", statusOpen);
> > > > > > > > > > > #endif
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > "Slobodan Brcin (eMVP)" <sbrcin@ptt.yu> wrote in message
> > > > > > > > > > > news:ui7GpJqREHA.3052@TK2MSFTNGP12.phx.gbl...
> > > > > > > > > > > > Alex,
> > > > > > > > > > > >
> > > > > > > > > > > > I have no idea how you are planning to write filter
> > > driver.
> > > > > > > > > > > > Lower filter, upper filter, reason behind this (why?).
> > > > > > > > > > > >
> > > > > > > > > > > > What is signal?
> > > > > > > > > > > > Byte receive?
> > > > > > > > > > > > Handshake input pins? break condition?
> > > > > > > > > > > > I thought that you want to make regular serial
> > > communication,
> > > > > > > right?
> > > > > > > > > > > >
> > > > > > > > > > > > First you need to open and reserve port.
> > > > > > > > > > > > Then you will have to initialize parameters like BPS,
> flow
> > > > > control
> > > > > > > > > etc.
> > > > > > > > > > > >
> > > > > > > > > > > > If you do that successfully you will have idea how to
> > > proceed
> > > > > with
> > > > > > > > > next
> > > > > > > > > > > step using threads.
> > > > > > > > > > > >
> > > > > > > > > > > > BTW:
> > > > > > > > > > > > Filter driver is usually only good if you want to
> monitor
> > > and
> > > > > > > modify
> > > > > > > > > > > already initialized communication.
> > > > > > > > > > > >
> > > > > > > > > > > > Regards,
> > > > > > > > > > > > Slobodan
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > "Alex" <Chipheo2k@hotmail.com> wrote in message
> > > > > > > > > > > news:Oje3XAqREHA.1944@TK2MSFTNGP10.phx.gbl...
> > > > > > > > > > > > > Thank Slobodan a lot !
> > > > > > > > > > > > > I am continuing to write my filter driver , and now
> my
> > > > > thread
> > > > > > > has
> > > > > > > > > worked
> > > > > > > > > > > > > well as expected !
> > > > > > > > > > > > > by the way , I have read a documentation of MS about
> > > Serial
> > > > > > > Port, I
> > > > > > > > > have
> > > > > > > > > > > not
> > > > > > > > > > > > > found Which Request ( IOCTL_XXX) to perform the
> event
> > > when
> > > > > the
> > > > > > > > > Signal
> > > > > > > > > > > came
> > > > > > > > > > > > > to Com port . If you know , please tell me !
> > > > > > > > > > > > > regards!
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > "Slobodan Brcin (eMVP)" <sbrcin@ptt.yu> wrote in
> message
> > > > > > > > > > > > > news:OGRlPgmREHA.556@TK2MSFTNGP10.phx.gbl...
> > > > > > > > > > > > > > Alex,
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > You can write regular driver (.sys) that execute
> as
> > > any
> > > > > other
> > > > > > > > > driver.
> > > > > > > > > > > All
> > > > > > > > > > > > > drivers share same address space, and can create as
> many
> > > > > > > > > > > > > > threads as you need.
> > > > > > > > > > > > > > From threads you can open/close other driver use
> all
> > > > > IOCTL,
> > > > > > > read,
> > > > > > > > > > > write
> > > > > > > > > > > > > and use all functions defined in DDK for your OS.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I hope that this is understandable enough.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Regards,
> > > > > > > > > > > > > > Slobodan
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > PS:
> > > > > > > > > > > > > > Maybe you have troubles to understand how to
> install
> > > this
> > > > > type
> > > > > > > of
> > > > > > > > > > > driver?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > "Alex" <Chipheo2k@hotmail.com> wrote in message
> > > > > > > > > > > > > news:%23bj8rMmREHA.2840@TK2MSFTNGP10.phx.gbl...
> > > > > > > > > > > > > > > Thank you so much!
> > > > > > > > > > > > > > > Maybe you tell me about .dll driver ( no
> Usermode
> > > > > > > Application ,
> > > > > > > > > but
> > > > > > > > > > > it's
> > > > > > > > > > > > > > > User mode Driver )... right??
> > > > > > > > > > > > > > > Regards!
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > "Slobodan Brcin (eMVP)" <sbrcin@ptt.yu> wrote in
> > > message
> > > > > > > > > > > > > > > news:#gP3NalREHA.808@tk2msftngp13.phx.gbl...
> > > > > > > > > > > > > > > > Hi Alex,
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > I have no idea what you are trying to do in
> your
> > > > > project,
> > > > > > > and
> > > > > > > > > why
> > > > > > > > > > > you
> > > > > > > > > > > > > want
> > > > > > > > > > > > > > > to use filter driver.
> > > > > > > > > > > > > > > > You can make non filter driver that will open
> > > desired
> > > > > com,
> > > > > > > and
> > > > > > > > > use
> > > > > > > > > > > it
> > > > > > > > > > > > > in
> > > > > > > > > > > > > > > similar manners that you would use it from user
> > > mode.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > You will have your driver (no user mode
> > > application).
> > > > > And
> > > > > > > it
> > > > > > > > > will
> > > > > > > > > > > do
> > > > > > > > > > > > > work
> > > > > > > > > > > > > > > you wanted it to do.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Regards,
> > > > > > > > > > > > > > > > Slobodan
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > "Alex" <Chipheo2k@hotmail.com> wrote in
> message
> > > > > > > > > > > > > > > news:uUdcy2kREHA.2936@TK2MSFTNGP12.phx.gbl...
> > > > > > > > > > > > > > > > > Ok , thank you very much !
> > > > > > > > > > > > > > > > > Now my Thread has worked .
> > > > > > > > > > > > > > > > > But I wonder, how Can i " hook " the
> standard
> > > Read
> > > > > and
> > > > > > > > > Write
> > > > > > > > > > > to my
> > > > > > > > > > > > > > > Thread
> > > > > > > > > > > > > > > > > ? ( I use one Event to wake up my thread )
> > > > > > > > > > > > > > > > > Pls help me to explain !
> > > > > > > > > > > > > > > > > Thanks again !
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > "Slobodan Brcin (eMVP)" <sbrcin@ptt.yu>
> wrote in
> > > > > message
> > > > > > > > > > > > > > > > >
> news:#qdAnUkREHA.2216@TK2MSFTNGP12.phx.gbl...
> > > > > > > > > > > > > > > > > > What do you mean by Mutex replace for
> Thread.
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > In your case you should have one thread.
> That
> > > will
> > > > > use
> > > > > > > > > > > standard
> > > > > > > > > > > > > read
> > > > > > > > > > > > > > > and
> > > > > > > > > > > > > > > > > write major codes for reading and writing
> data,
> > > and
> > > > > for
> > > > > > > > > > > > > > > > > > configuring port you can use
> IOCTL_SERIAL_*
> > > codes.
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Use google groups to search trough old NG
> > > > > archives.
> > > > > > > This
> > > > > > > > > will
> > > > > > > > > > > > > probably
> > > > > > > > > > > > > > > > > give you all help you need for this
> particular
> > > > > project.
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > >
> > >
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&group=microsoft.
> > > > > > > > > > > > > > > > > public.win32.programmer.kernel
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Regards,
> > > > > > > > > > > > > > > > > > Slobodan
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > "Alex" <Chipheo2k@hotmail.com> wrote in
> > > message
> > > > > > > > > > > > > > > > >
> news:e814b3jREHA.2408@tk2msftngp13.phx.gbl...
> > > > > > > > > > > > > > > > > > > Thank you , Slobodan !
> > > > > > > > > > > > > > > > > > > I have felt in deadlock ! :-)
> > > > > > > > > > > > > > > > > > > Pls tell me , How can i use Mutex (
> replace
> > > for
> > > > > > > Thread )
> > > > > > > > > to
> > > > > > > > > > > > > Notice
> > > > > > > > > > > > > > > when
> > > > > > > > > > > > > > > > > the
> > > > > > > > > > > > > > > > > > > signal came to the Comm Port ?? (
> remember
> > > that
> > > > > , my
> > > > > > > > > task is
> > > > > > > > > > > > > keeping
> > > > > > > > > > > > > > > > > track
> > > > > > > > > > > > > > > > > > > for Signal came to Comm Port without
> any
> > > call
> > > > > from
> > > > > > > User
> > > > > > > > > > > > > mode )..
> > > > > > > > > > > > > > > can u
> > > > > > > > > > > > > > > > > > > explain the Mechanism ? ( I am still
> student
> > > ,
> > > > > so I
> > > > > > > can
> > > > > > > > > not
> > > > > > > > > > > > > > > understand
> > > > > > > > > > > > > > > > > well
> > > > > > > > > > > > > > > > > > > allthing as you )
> > > > > > > > > > > > > > > > > > > Thank you so much !
> > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > "Slobodan Brcin (eMVP)" <sbrcin@ptt.yu>
> > > wrote in
> > > > > > > message
> > > > > > > > > > > > > > > > > > >
> > > news:uZF7a1iREHA.3628@TK2MSFTNGP12.phx.gbl...
> > > > > > > > > > > > > > > > > > > > Sorry Alex,
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > I can't help you here. I'm using DDK
> > > functions
> > > > > > > without
> > > > > > > > > > > third
> > > > > > > > > > > > > party
> > > > > > > > > > > > > > > > > > > wrappers.
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > Now , when I start my driver , my
> > > Computer
> > > > > > > > > immediately
> > > > > > > > > > > > > restarts
> > > > > > > > > > > > > > > ,
> > > > > > > > > > > > > > > > > Why ??
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > There is a good thing called remote
> > > debugger.
> > > > > KD
> > > > > > > or
> > > > > > > > > windbg
> > > > > > > > > > > > > from MS
> > > > > > > > > > > > > > > you
> > > > > > > > > > > > > > > > > can
> > > > > > > > > > > > > > > > > > > download new version from site. So you
> will
> > > be
> > > > > able
> > > > > > > to
> > > > > > > > > > > > > > > > > > > > step trough your code if you have two
> > > > > computers,
> > > > > > > if
> > > > > > > > > not
> > > > > > > > > > > you
> > > > > > > > > > > > > are
> > > > > > > > > > > > > > > > > probably
> > > > > > > > > > > > > > > > > > > doomed while writing drivers blindly.
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: colin.marsh_at_ajbsoftware.com: "CreateProcessAsUser - Access Denied (in some situations)"
- Previous message: Alex: "Re: Driver filter for Serial Port"
- In reply to: Alex: "Re: Driver filter for Serial Port"
- Next in thread: Alex: "Re: Driver filter for Serial Port"
- Reply: Alex: "Re: Driver filter for Serial Port"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|