windows

Unable to debug the kernel driver using Serial cable

I am new to driver stuff. I have tried to debug the kernel driver using serial COM port without success. Could someone show me proper direction how to fix the problem? I am seeing the following messages on kd console. ERROR: DavReadRegistryValues/RegQueryValueExW(4). WStatus = 127 ERROR: DavReadRegistryValues/RegQueryValueExW(5). WSta...

Where should a Windows application's working files be written?

If you have a Windows application that needs to write working files as part of its normal operation (not prompted by the user): Where on the file system should they be written? What's the correct way to get this directory in .NET for all Windows versions (XP/V/7/Server)? (Writing to the same directory as the executable or a "temp" di...

Window is not maxinizing/being brought to front after being in tray, why?/help

I wrote an alarm app with some complex code i dont feel like breaking up right now to use as an example. I have a timer checking every 10 or so minutes about a state online and on certain conditions my app alerts me. On form_load i set the timer to 10mins and when it triggers and the condition is true i call a function with this in it. ...

Using CreateWindow and adding buttons and such to it? How?

This is kind of a noob question but I've realized after so long of coding DirectX/OpenGL applications I don't have the feintest of ideas how to create windows with basic form objects like text boxes, labels, command buttons etc. I can create a window using the CreateWindow function just fine, how can I add buttons, command prompts and o...

How to limit the service access in WCF to a set of windows accounts?

I have a WCF service which uses netTcp binding and transport security. It uses Windows authentication (default). Everything is working smoothly but I want to ensure that only a select windows user account can use this service instead of everyone in the domain. Is there any way to accomplish this such that select user accounts can be wr...

How to read and change CMOS data on Win 2003 and Vista?

Hi! I've tried http://www.codepedia.com/1/CMOS%5FC , but I got Privileged instruction exception, I guess the reason is I was in user mode (ring-3) and this operation requires ring-0. So, do you know any ways I can solve it? I read that I could write driver using Windows Driver Foundation or try to use WinAPI. ...

Mixed Windows and *nix environment - 'local' suffix issue

Dear all, Stupid question - apologies in advance. I have a mixed Windows and Linux dev environment, and the server is Linux (Ubuntu). Let's say the server is called 'myserver'. I develop on both Windows and *nix (Ubuntu and OS X), with references to myserver as 'myserver.local' on *nix, and 'myserver' on Windows. I have shared code ...

Where are an iPhone app's NSLog statements recorded on Windows?

Hi I am trying to debug an issue one of my testers is facing. The tester is on a Windows and I have put in some NSLog statements in my code to analyze the issue at hand. On a Mac, when I sync my device with iTunes, I can see the NSLog statements in Console.app. But where does in show up on a PC? I know where to find the crash logs. Bu...

speeding up windows file search with C#

i made a program that search logical drives to find a specific file .if user type file name an click search button , searching begins , but i don't know how to stop searching in the middle of process.can you help me ? ...

How to get internal IP, external IP and default gateway for UPnP

I'm wondering how I'd go about getting the: Internal IP address; External IP address; and Default gateway in Windows (WinSock) and Unix systems. Thanks in advance, ...

Is HWND visible?

Those darned users and their minimized windows. In C#, if I have a window's HWND, is there a way to tell if it is visible on the desktop? ...

Redirect window of command line tool to your app (Windows)

Hello, is there a way (on Windows XP+) to redirect the output of a window created by a process created with e.g. CreateProcess to a window of your own program? I'd like to make a nicer GUI for ffplay.exe which is an open source video player. It is a command line tool, which opens a simple window in which it plays back the video. Can I ...

how to break into code when a file has been touched

I inherited an application using a large number of texts based files for configuration. The file's names are constructed dynamically in the software, so I can't search directly for a file name if the source code. Is there any way to break into a program running in the debugger when it touches a particular text file ? ...

Why %processor_architecture% always returns x86 instead of AMD64

I am trying to retrieve the environment variable to detect whether the system is 32 or 64 bit. But on 64 bit server the environment variable %processor_architecture% is returning x86 instead of AMD64. Does anyone has any clue about this? ...

Print text into a Windows input text box

Background I'm trying to write an application in C++ that will run on Vista. The application will take input from a the user (via input text box), perform some manipulation of that text, and will direct the user to click on an input box in another application. I'd like my application to print text into the second application's text box. ...

How to use QueryPerformanceCounter?

I recently decided that I needed to change from using milliseconds to microseconds for my Timer class, and after some research I've decided that QueryPerformanceCounter is probably my safest best. (The warning on Boost::Posix that it may not works on Win32 API put me off a bit). However, I'm not really sure how to implement it. What I'...

Icons on Titlebar

Hi Everybody, I just found something really cool and i'm surprised i didn't really notice it sooner. Have you ever seen WordPad running on Windows 7? If you have, you'll notice that on the top-left of the window's titlebar are a few icons (save, undo/redo). On the actual titlebar itself! How cool is that? I was wondering how i would imp...

Can multiple ProgIDs point to the same ClsID?

I am working on a set of what are essentially plugins, which are COM servers. Each plugin has a set of configuration data which is managed by another component, the primary key to the configuration data is the plug-in's ProgID. When the plugin needs to access a configuration item, it makes a call and passes in its ProgID and the name of ...

using linq for this:

hi all i have just started learning linq because i like the sound of it. and so far i think im doing okay at it. i was wondering if Linq could be used to find the following information in a file, like a group at a time or something: Control Text Location Color Font Control Size example: Label "this is text that will appear on a lab...

boost::thread causing small event handle leak?

I'm debugging this database project. It wraps access to SQLite for a higher level application. It's designed to run asynchronously, that is, it has methods like ExecuteRequestAsync() and IsRequestReady(). When ExecuteRequestAsync is called, it spawns a boost::thread to do the job and return the function immediately. When the higher level...