|
From: Doron Holan [MSFT] on 6 May 2008 20:18 note that to use these APIs you must be at passive level which means you must defer to a work item if you want to write anything out if you are at an IRQL > passive. at that point, it is almost just as easy to send the data to an application which has a much richer set of APIs to write out the data d -- Please do not send e-mail directly to this alias. this alias is for newsgroup purposes only. This posting is provided "AS IS" with no warranties, and confers no rights. "Don Burn" <burn(a)stopspam.windrvr.com> wrote in message news:%23dV5lm8rIHA.1436(a)TK2MSFTNGP05.phx.gbl... > Yes, look at ZwCreateFile, ZwWriteFile, ZwReadFile and ZwClose. They are > very similar to the Win32 functions. Other ZwXXX calls may also be of > interest. > > > -- > Don Burn (MVP, Windows DDK) > Windows 2k/XP/2k3 Filesystem and Driver Consulting > Website: http://www.windrvr.com > Blog: http://msmvps.com/blogs/WinDrvr > Remove StopSpam to reply > > > > > "Kid" <Kid(a)discussions.microsoft.com> wrote in message > news:3950C5BB-2DE7-40B0-BD40-EF3EB880181F(a)microsoft.com... >> hi Don >> >> Can we write some text or database from kernel mode, is there any API ? >> >> Thanks much >> >> >> "Don Burn" wrote: >> >>> This has been answered many times the answer is NO. If you need a >>> function >>> that does not have a kernel mode equivalent, you either need to write >>> your >>> own or use a helper application to perform that work for the driver. >>> >>> >>> -- >>> Don Burn (MVP, Windows DDK) >>> Windows 2k/XP/2k3 Filesystem and Driver Consulting >>> Website: http://www.windrvr.com >>> Blog: http://msmvps.com/blogs/WinDrvr >>> Remove StopSpam to reply >>> >>> >>> >>> "Kid" <Kid(a)discussions.microsoft.com> wrote in message >>> news:2BFDA94B-3827-4BE9-9D58-811401CE401B(a)microsoft.com... >>> > Hi >>> > >>> > Can kernel mode driver call Win32 API function like MessageBox and >>> > winsock >>> > ? >>> > >>> > If I want to write a virtual driver use some Win32 API and library , >>> > is it >>> > possible? >>> > >>> > Thank you . >>> >>> >>> > >
From: Kid on 6 May 2008 21:07 How could I send data to an application in kernel mode ? Can I loead an application by some function in kernel mode ? Thanks much "Don Burn" wrote: > Yes, look at ZwCreateFile, ZwWriteFile, ZwReadFile and ZwClose. They are > very similar to the Win32 functions. Other ZwXXX calls may also be of > interest. > > > -- > Don Burn (MVP, Windows DDK) > Windows 2k/XP/2k3 Filesystem and Driver Consulting > Website: http://www.windrvr.com > Blog: http://msmvps.com/blogs/WinDrvr > Remove StopSpam to reply > > > > > "Kid" <Kid(a)discussions.microsoft.com> wrote in message > news:3950C5BB-2DE7-40B0-BD40-EF3EB880181F(a)microsoft.com... > > hi Don > > > > Can we write some text or database from kernel mode, is there any API ? > > > > Thanks much > > > > > > "Don Burn" wrote: > > > >> This has been answered many times the answer is NO. If you need a > >> function > >> that does not have a kernel mode equivalent, you either need to write > >> your > >> own or use a helper application to perform that work for the driver. > >> > >> > >> -- > >> Don Burn (MVP, Windows DDK) > >> Windows 2k/XP/2k3 Filesystem and Driver Consulting > >> Website: http://www.windrvr.com > >> Blog: http://msmvps.com/blogs/WinDrvr > >> Remove StopSpam to reply > >> > >> > >> > >> "Kid" <Kid(a)discussions.microsoft.com> wrote in message > >> news:2BFDA94B-3827-4BE9-9D58-811401CE401B(a)microsoft.com... > >> > Hi > >> > > >> > Can kernel mode driver call Win32 API function like MessageBox and > >> > winsock > >> > ? > >> > > >> > If I want to write a virtual driver use some Win32 API and library , is > >> > it > >> > possible? > >> > > >> > Thank you . > >> > >> > >> > > >
From: Kerem G�mr�kc� on 6 May 2008 22:57 Hi Kid, >How could I send data to an application in kernel mode ? You mean to your Driver in Kernel Mode. You can send any data to your driver by using IOCTL (DeviceIoControl function) and handling IRP_MJ_DEVICE_CONTROL in your Kernel Driver. Or by opening a handle to your Driver/Device after your driver has been loaded and created a symbolic link that the user mode application can open and write/read to/from it. Then you handle IRP_MJ_READ and IRP_MJ_WRITE, and some others, which depends on your drivers layout. There are some other (exotic) ways but these are the standartized and well documented ones you should use. Vista offers something named WSK, which is a User Mode like Kernel Socket interface for TCP/IP Communication, but i dont know how to use it, though it should be very simillar to usermode sockets. I did not use WSK until today, so i dont know how usefull it is,... check if you like. See here: [Winsock Kernel] http://msdn.microsoft.com/en-us/library/aa504179.aspx Here are some good basic tutorials i recommend to you: Complete the Series and you have "basic" driver development knowledge you can extend by reading the DDK, which is a MUST! [Driver Development Part 1: Introduction to Drivers] http://www.codeproject.com/KB/system/driverdev.aspx Windows DDK and Windows SDK are your best friends,... Regards Kerem -- -- ----------------------- Beste Gr�sse / Best regards / Votre bien devoue Kerem G�mr�kc� Microsoft Live Space: http://kerem-g.spaces.live.com/ Latest Open-Source Projects: http://entwicklung.junetz.de ----------------------- "This reply is provided as is, without warranty express or implied."
From: Doron Holan [MSFT] on 7 May 2008 01:48 you do not want to use a socket to talk to your driver. way too much overhead for no gain. Just use custom IOCTLs to shuttle the data you want back and forth. d -- Please do not send e-mail directly to this alias. this alias is for newsgroup purposes only. This posting is provided "AS IS" with no warranties, and confers no rights. "Kerem G�mr�kc�" <kareem114(a)hotmail.com> wrote in message news:eVlTi5%23rIHA.672(a)TK2MSFTNGP02.phx.gbl... > Hi Kid, > >>How could I send data to an application in kernel mode ? > > You mean to your Driver in Kernel Mode. You can send > any data to your driver by using IOCTL (DeviceIoControl function) > and handling IRP_MJ_DEVICE_CONTROL in your Kernel Driver. > Or by opening a handle to your Driver/Device after your > driver has been loaded and created a symbolic link that the > user mode application can open and write/read to/from > it. Then you handle IRP_MJ_READ and IRP_MJ_WRITE, > and some others, which depends on your drivers layout. > There are some other (exotic) ways but these are the standartized > and well documented ones you should use. Vista offers something > named WSK, which is a User Mode like Kernel Socket interface > for TCP/IP Communication, but i dont know how to use it, though > it should be very simillar to usermode sockets. I did not use WSK > until today, so i dont know how usefull it is,... check if you like. > > See here: > [Winsock Kernel] > http://msdn.microsoft.com/en-us/library/aa504179.aspx > > Here are some good basic tutorials i recommend to you: > Complete the Series and you have "basic" driver development > knowledge you can extend by reading the DDK, which is > a MUST! > > [Driver Development Part 1: Introduction to Drivers] > http://www.codeproject.com/KB/system/driverdev.aspx > > Windows DDK and Windows SDK are your best friends,... > > Regards > > Kerem > > -- > -- > ----------------------- > Beste Gr�sse / Best regards / Votre bien devoue > Kerem G�mr�kc� > Microsoft Live Space: http://kerem-g.spaces.live.com/ > Latest Open-Source Projects: http://entwicklung.junetz.de > ----------------------- > "This reply is provided as is, without warranty express or implied." > >
From: Kerem G�mr�kc� on 7 May 2008 02:12 Hi Doron, it was just an option. Sure, he should use user defined IOCTL's. thats the best option for this. He only should decide how he send/receives data on both ends, e.g. buffered, etc,... Did you used the WSK, i mean in general? I have no experience on WSK. Can Usermode and Kernelmode connect via User2Kernel and vice versa socket? Is any kind of security possible? Regards K. -- -- ----------------------- Beste Gr�sse / Best regards / Votre bien devoue Kerem G�mr�kc� Microsoft Live Space: http://kerem-g.spaces.live.com/ Latest Open-Source Projects: http://entwicklung.junetz.de ----------------------- "This reply is provided as is, without warranty express or implied." "Doron Holan [MSFT]" <doronh(a)online.microsoft.com> schrieb im Newsbeitrag news:eGSmuXAsIHA.4492(a)TK2MSFTNGP02.phx.gbl... > you do not want to use a socket to talk to your driver. way too much > overhead for no gain. Just use custom IOCTLs to shuttle the data you want > back and forth. > > d > > -- > Please do not send e-mail directly to this alias. this alias is for > newsgroup purposes only. > This posting is provided "AS IS" with no warranties, and confers no rights. > > > "Kerem G�mr�kc�" <kareem114(a)hotmail.com> wrote in message > news:eVlTi5%23rIHA.672(a)TK2MSFTNGP02.phx.gbl... > > Hi Kid, > > > >>How could I send data to an application in kernel mode ? > > > > You mean to your Driver in Kernel Mode. You can send > > any data to your driver by using IOCTL (DeviceIoControl function) > > and handling IRP_MJ_DEVICE_CONTROL in your Kernel Driver. > > Or by opening a handle to your Driver/Device after your > > driver has been loaded and created a symbolic link that the > > user mode application can open and write/read to/from > > it. Then you handle IRP_MJ_READ and IRP_MJ_WRITE, > > and some others, which depends on your drivers layout. > > There are some other (exotic) ways but these are the standartized > > and well documented ones you should use. Vista offers something > > named WSK, which is a User Mode like Kernel Socket interface > > for TCP/IP Communication, but i dont know how to use it, though > > it should be very simillar to usermode sockets. I did not use WSK > > until today, so i dont know how usefull it is,... check if you like. > > > > See here: > > [Winsock Kernel] > > http://msdn.microsoft.com/en-us/library/aa504179.aspx > > > > Here are some good basic tutorials i recommend to you: > > Complete the Series and you have "basic" driver development > > knowledge you can extend by reading the DDK, which is > > a MUST! > > > > [Driver Development Part 1: Introduction to Drivers] > > http://www.codeproject.com/KB/system/driverdev.aspx > > > > Windows DDK and Windows SDK are your best friends,... > > > > Regards > > > > Kerem > > > > -- > > -- > > ----------------------- > > Beste Gr�sse / Best regards / Votre bien devoue > > Kerem G�mr�kc� > > Microsoft Live Space: http://kerem-g.spaces.live.com/ > > Latest Open-Source Projects: http://entwicklung.junetz.de > > ----------------------- > > "This reply is provided as is, without warranty express or implied." > > > > >
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: Test cases for WLAN SDIO interface Next: How make .inf file for 'mouser' sample code |