|
Wizmo[^] can do it for you. Look at the blindlock and monoff commands. You can easily call wizmo from a batch file with the command(s) you want to use.
//Johannes
|
|
|
|
|
You can try with this code..
[DllImport("user32.dll")]
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg,
IntPtr wParam, IntPtr lParam);
//Or
[DllImport("user32.dll", SetLastError = true)]
static extern bool PostMessage(IntPtr hWnd, uint Msg,
IntPtr wParam, IntPtr lParam);
//Or
[DllImport("user32.dll")]
static extern bool PostThreadMessage(uint idThread, uint Msg,
UIntPtr wParam, IntPtr lParam);
//Or
[DllImport("user32.dll", SetLastError=true, CharSet=CharSet.Auto)]
static extern bool SendMessageCallback(IntPtr hWnd, uint Msg,
UIntPtr wParam, IntPtr lParam,
SendMessageDelegate lpCallBack, UIntPtr dwData);
//Or
[DllImport("user32.dll", SetLastError=true, CharSet=CharSet.Auto)]
static extern bool SendNotifyMessage(IntPtr hWnd, uint Msg,
UIntPtr wParam, IntPtr lParam);
//Or
[DllImport("user32.dll")]
private static extern IntPtr GetDesktopWindow();
//Or
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
//Or
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindowEx(IntPtr hwndParent,
IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
const int SC_MONITORPOWER = 0xF170;
const int WM_SYSCOMMAND = 0x0112;
const int MONITORON = -1;
const int MONITOROFF = 2;
const int MONITORSTANBY = 1;
int HWND_BROADCAST = 0xffff; //the message is sent to all top-level windows in the system
int HWND_TOPMOST = -1;
int HWND_TOP = 0; //
int HWND_BOTTOM = 1; //limited use
int HWND_NOTOPMOST = -2; //
Form frm = new Form();
Frm.Handle();
SendMessage(ValidHWND, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOROFF );
SendMessage(ValidHWND, WM_SYSCOMMAND, SC_MONITORPOWER, MONITORON);
|
|
|
|
|
I've got a VIA EPIA P700 embedded board running XPe. The board supports a GPIO interface, but it does not provide driver for it. My application needs to access I/O from GPIO ports. Any thoughts?
Best,
Jun
|
|
|
|
|
Hi,
I suggest you talk to the vendor or search his web site[^].
|
|
|
|
|
Thanks for replying. I've gone through the vendor already. They can only provide a chip-level programming guide, which does not help me much.
Anyway, I am thinking since GPIO is a generic interface, someone should have done something on it. Surprisingly, very little information on the web. I just don't want to reinvent the wheel.
Happy New Year!
Best,
Jun
|
|
|
|
|
In hardware land, GPIO usually means "General Purpose I/O", i.e. "we added some I/O points for cuz we had some extra space and though it'd be cool".
In all my years I've never seen a standard way of attacking a GPIO interface - they're all different.
G'Luck
Subvert The Dominant Paradigm
-- bumper sticker, circa 1971
|
|
|
|
|
Hello,
I have exactly the same problem than you.
I would like to use GPIO of epia p700 board.
Did you find a solution ?
Thanks,
Guillaume
|
|
|
|
|
Hi, I have a problem with my monitor. The screen usually become yellow but when I knock it a little bit, it become normal but when its run around 5mn, the screen become yellow again. Whether i can see the document it is very difficult to read a text. I know it is very old one.
From here, I would like to ask someone that have an experience with this, whether are there any solution that i could fix the problem or should i change the monitor to the new one?
Thank for the comment or suggestion!!!
|
|
|
|
|
I think the monitor is going terminal. (And I dont mean mainframe here!)
Morality is indistinguishable from social proscription
|
|
|
|
|
So what is the solution to fix the monitor?
|
|
|
|
|
|
Please check that the VGA cable is SCREWED IN to the monitor and the PC.
It might have become a little loose.
|
|
|
|
|
If it's a CRT, that sounds like something's wrong with the blue gun, or the wire in the VGA cable that carries the blue signal. (Yellow = FFFF00, so if blue goes away, white turns to yellow.)
Honestly, I'd just get a new LCD. Fixing a monitor is going to cost as much or more than buying a new one.
|
|
|
|
|
This is generally due the loose connection , behind your CPU , where you attach the cable of your monitor that cable is loose , please make sure that it is properly fixed , also make sure that the screw that fix it is also tight.
Hope this helps
-Regards
Bharat Jain
Phisys Software Solutions Pvt. Ltd.
bharat.jain.nagpur@gmail.com
|
|
|
|
|
Hi
I don't know how I can to pass a read buffer from driver to my application, I know how I can do this with DeviceIoControl, but it's possible to send something that driver reads without deviceiocontrol?
Thaks a lot
|
|
|
|
|
The only way of passing data from a driver to an app is for the app to have an outstanding read IRP with the driver, either IRP_MJ_READ or an IOCTL with a read buffer.
To send data to the driver you can of course use IRP_MJ_WRITE.
(With ndis you could use sockets to acchieve this, but I am assuming you arent. Anyway, sockets actually go over the IOmanager as IRPs anyway so its the same process.)
Morality is indistinguishable from social proscription
|
|
|
|
|
dereck78_zg wrote: but it's possible to send something that driver reads without deviceiocontrol?
Yes, it is possible but why would you want to do that? You could probably use named memory objects for both the locks and the shared memory. It would work something like this.
1.) Usermode application uses CreateFileMapping[^]/OpenFileMapping [^]and creates/opens the named section and writes its data.
2.) Driver uses ZwOpenSection/ZwMapViewOfSection to open the named section. The driver would probe/lock the buffer and use MmGetSystemAddressForMdlSafe[^] to obtain the address and read the shared memory.
I left out the most difficult part locks/synchronization and signalization. This method has alot of problems at a raised IRQL, your better off using an IOCTL with METHOD_IN_DIRECT/METHOD_OUT_DIRECT.
Here are some guidelines to follow for ring3/ring0 interactions.
User-Mode Interactions: Guidelines for Kernel-Mode Drivers[^]
Best Wishes,
-David Delaune
|
|
|
|
|
Of course the benefit of using an IOCTL to pass data back and forwards rather than a READ or WRITE is that you can set the security thus permitting access to the device from user rights code.
Morality is indistinguishable from social proscription
|
|
|
|
|
I am developing a minifilter driver that has encryption and decryption mechanism for files that are to be copied and/or read from/to a specific destination/folder but currently i have no idea HOW can i be able to implement tha later.
To help me understand and be able to know the KNOW-HOW of the implementation, the following are my question:
1. How can i encrypt a file/files for copy from a location A to B?
2. From no. 2, how can i decrypt the encrypted file/files to be copied?
3. And also applies in encrypttion and/or decryption for reading of file/files from a certain location?
Can you give me an idea HOW are these possible and if you have sample snippets can you show it to me?
Any help is greatly appreciated.
Thanks in advance.
Best regards,
taDo
|
|
|
|
|
noobDriverDev wrote: 1. How can i encrypt a file/files for copy from a location A to B?
A minifilter is certainly the best way to do this. You could also create a SSDT hook for ZwWriteFile[^] and ZwReadFile[^] but this is not recommended nor supported by Microsoft. I would say that you are on the right track by looking at a filter driver.
noobDriverDev wrote: 2. From no. 2, how can i decrypt the encrypted file/files to be copied?
3. And also applies in encrypttion and/or decryption for reading of file/files from a certain location?
The Microsoft DDK samples are an absolute goldmine. You should probably start by modifying the sample located at:
C:\WINDDK\6001.18001\src\filesys\miniFilter\cdo
You will need to intercept some of the Fast I/O Dispatch Routines[^]. Much of the code has already been written for you in the sample driver. You should be able to simply modify the buffer returned from:
FastIoRead
FastIoWrite
FastIoReadCompressed
FastIoWriteCompressed
and such...
You should probably start with a simple XOR operation on the read/write buffer. As always, MSDN is a valuable source of information.
Writing IRP Dispatch Routines[^]
File System Filter Drivers[^]
You may also want to have a look at Installable File System Kit[^]
noobDriverDev wrote: Can you give me an idea HOW are these possible and if you have sample snippets can you show it to me?
Microsoft has provided a plethora of examples with the DDK install you can't get much better than that. The processes involved in your requirements are far too complex to be reduced into a small snippit.
Good Luck,
-David Delaune
|
|
|
|
|
|
I am writing a new printer driver in windows xp in X86 32 bit platform.
When using the add printer wizard to add printers,after copying the files to windows\system32\spool\drivers\w32X86\3 , the message box is displayed that printer driver is not installed operation could not be completed.
It was working before.But i dont know what had happend.Guess some files may be corrupted or setting maybe changed.but i am not able to find out
Things i have done so far
1.restarted print spooler service
2.deleted all the printers in the add printer folder in control settings
3.removed all printers from server properties\drivers tab in add printer folder
4.Deleted all files windows\system32\spool\drivers\w32X86\3 folder
5.renamed w32X86
6.Deleted OEMXXX.png files ,ntprint.pnf, printupg.pnf, infcache.1 in system32\inf folder
7.Deleted registry setings of the earlier printer driver installed
Still i am not able to install the printer driver.
please help me.
With regards
Deepu
|
|
|
|
|
Hi!
Currently I am writing data from my application via WriteFile to my UMDF USB driver and send the stuff over bulk endpoints. I'd like to send only single USB frames from my application to my device. Is there a way to break the data stream from the application into USB frames without applying an own transfer protocol (e.g. packet length, packet data...)? Since USB has such a protocol (framing) I think it is rather annoying to implement a new framing protocol on top of it just to make sure that my app. receives and sends only single USB frames.
Any ideas?
Thanks!
|
|
|
|
|
Just send the data in whatever size you have it. A couple of k at a time is OK.
Morality is indistinguishable from social proscription
|
|
|
|
|
Any one have a template/ jounal about hardware requirement ?
Thanks
|
|
|
|