windows

Windows Services Recovery not restarting service.

I configure the recovery for Windows services to restart with a one minute delay after failures. But I have never gotten it to actually restart the service (even with the most blatant errors). I do get a message in the EventViewer: The description for Event ID ( 1 ) in Source ( MyApp.exe ) cannot be found. The local computer may no...

WMI: How to differentiate between Wireless mouse and touch screen

I am using Win32_PointingDevice class to detect mice connected to the system. I ran my device discovery script on a machine which has touch screen. The discovery shows up with 3 pointing devices, directly connected USB mouse, wireless mouse and touch screen. My question is how to distinguish between USB mouse with touch screen. If Win3...

simple user-feedback collection service

Short: I am looking for a very simple (configuration/maintenance wise) solution, that would allow to collect user-feedback/bug-reports from my apps/web-sites over the internet. Long: Right now I have very simple web-app written using ASP.NET MVC that receives http-post requests at http://localhost/feedback and saves them as c:\temp\{gui...

Deleting lines from multiple files

How do you search and delete a line (not replace) from multiple files in a directory tree? I have tried programs such as grepWin and Windows Grep but they replace lines, they do not delete the entire line. What is my best option? Example: Search for "hello" and delete any line with "hello" in it. yo hello hey hey hi hello bye bye s...

Using Cygwin to build srecord for native Windows

I'm trying to build the srecord tools for the native windows, http://srecord.sourceforge.net/windows.html. I execute, CC='gcc -mno-cygwin' CXX='g++ -mno-cygwin' ./configure. I get a failure as it is checking for boost libraries, see error text below. I installed the current verison of cygwin (as of 18-Nov-2009) including both the gcc and...

What's the fastest way to decompress JPEG images in C#

I need to write an app to playback a DICOM multiframe image. Each frame is stored in JPEG format. All the frames are stored consecutively in one file. Right now, I read out each frame data and pass it to the following routine to construct a Bitmap for display: Bitmap CreateBitmap(byte[] pixelBuffer, int frameSize) { B...

Cancelling Windows Forms Events

I have a windows form. It has a ComboBox and a DataGrid I have a Leave event on my combobox and I have a double click event on my datagrid row The idea is that on leaving the combobox, if the value of the combo box changed than use the new value to reload the datagrid. Let's say the combobox is displaying a value of 1 and for that va...

handling mouse events in runtime created objects in c#

I'm writing a c# windows app, and as one task, I am creating Panel objects at runtime. I have my custom Panel which is defined as: class FlowState : Panel { : : } I have an init method to set size, location, etc. However once this panel is created on the windows form, I want to handle mouse events, such as mouseDown and mouseUp. If...

Differences in code between Windows 32 bits and 64 bits

I was experimenting with the following code to simulate GetProcAddress. // Retrieve NT header from base address. IMAGE_NT_HEADERS *GetNtHeaderFromBase( void *pBaseAddr ) { IMAGE_DOS_HEADER *pDosHeader; IMAGE_NT_HEADERS *pNtHeaders; pDosHeader = ((IMAGE_DOS_HEADER *)pBaseAddr); if(pDosHeader->e_magic != 0x5A4D) return ...

Working with IME names in Delphi

Hi, Delphi TScreen object has a collection that accepts IME names. And the TControl offers SetIMEName method. Are these IME names constant? Are they same as ISO language names? Platform: Windows XP. Thanks, Pavan. ...

Moving an App from 32 bit to 64 bit

We have a Windows Service app written in C# targeted for AnyCPU. It runs on a Win2003 (32bit) server. Recently it started to run out of memory. What is involved in redeploying this service to a Win2003 (64bit) box. Do I need to recompile it and will the App get more memory if I do not recompile it? ...

Using Java to retrieve the CPU Usage for Window's Processes

Hello all, I am looking for a Java solution to finding the CPU usage for a running process in Windows. After looking around the web, there seems to be little information on a solution in Java. Keep in mind, I am not looking to find the CPU usage for the JVM, but any process running in Windows at the time. I am able to retrieve the memo...

WriteFile function "freezes"

Hi! I'm trying rewrite xCmd which can start a process on a remote machine. Basically it installs itself as a service on the target computer and then starts the requested process. Everything is working fine, but i noticed an error. xCmd is communicating through pipes, and it uses WriteFile(). My problem is, that if i run my API (or the o...

Are there any libraries for Python to simulate keyboard action?

The problem I have is that I have this Python script to launch a application. After the application is launched (the GUI is shown on screen), I want to make it de-activated. It can be done manually by activating another window, or minimizing this app, or pressing the Show Desktop key for WindowsXP. So is there any way that I can do this...

Scancode when I press a key is different. Is Microsoft specification wrong?

I am using Windows XP pro SP3. Standard english keyboard. I live in the USA; never touched the keyboard settings. Stock install. So, when I press check the scancodes my program is returning they are as follows: A = 30 S = 31 D = 32 F = 33 G = 34 When I check the microsoft specification (page 11 of the document:: http://download.micr...

palm treo 750 sms support :need help

Hi , I want to programatically access the sms from a palm treo 750. Is sms are stored in palm treo 750 in a different from other windows mobile phones? I am using mapi.lib. Thanks in advance ...

How to neglect this error in windows application using crystal reports

public void crys() { con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:/Documents and Settings/techsoft/My Documents/Database.accdb;Persist Security Info=False"); con.Open(); OleDbCommand cmm=new OleDbCommand ("select * from Table3",con); DataSet ds=new DataSet (); OleDbDataAdapter db...

Porting code from Linux to Windows

Hi all, I'm using Visual Studio .NET 2003, and I'm trying to port code I've written and compiled/run successfully in Linux GCC to Windows. I'm a newbie when using VS. I've created a new project, and added all the .c and .h files I have into the project by Project -> Add Existing Items, then chose all the .c and .h files. I'm not famil...

changing button text in OpenFileDialog in C#.net

Does anyone knows how to change text on button in OpenFileDialog in Windows.Forms in C#.NET? ...

How to Find Duplicate Folders and Consolidate the Contents

Hello! I need to find a piece of software that searches the folders of my hard drive and when it finds a duplicate folder then it will merge (or suggest to merge) it with a previously found folder of the same name. Does anyone know of something out there that can do the job? [Something freeware or portable would be great but not essen...