windows

Remove Whitespace From XML Nodes

How can I remove whitespace on every instance of a particular node which I specify in C#? For example let's say that I have the following XML document: <XML_Doc> <Record_1> <Name>Bob</Name> <ID_Number>12345</ID_Number> <Sample> </Sample> </Record_1> <Record_2> <Name>John</Name> <ID_Number>54321</ID_...

Can't Access Windows Environment Variable with C#

I created an installer using WiX. One thing the installer does is sets an environment variable PLUGIN_DIRECTORY (it's at the system level). Within some C# code that I have written, I need to access that variable so I can watch a certain directory. I do this via the following code: FileSystemWatcher water = new FileSystemWatcher(); wa...

Is a mouse click a WM_* message or a combination of up & down messages?

I'm used to working with a Windows framework that provides events for things like a mouse click or a mouse double click. Are click events a Windows construct (i.e. does Windows send a WM_DOUBLECLICK or similar message) or does it send WM_MOUSEDOWN and WM_MOUSEUP to applications which then do some math to decide if the event was a click ...

windows process management

Why does the root directory of a process, started by a windows process manager, change to the directory of where the pm is located? Using msdn process manager code to create a pm service to run a few exes. The exes save log files in the root relative to their location. When started by the process manager, they are saving to the process...

Pasting a Screen shot into a text area on a web page

Is it possible to take a screen shot (using the Print Screen) and paste it from the System Clipboard directly into a web pages text area field (which I would create)? Do I need a browser plug-in? Can Flash do this? **The solution only has to work in Internet Explorer. ...

How do applications like Google Sidebar reduce the desktop size?

Hi, I'm trying to write an application which will sit at the top of the desktop on top of every window. I need this window however to not just sit on top of other windows, but to actually reduce the size of the desktop so when these windows maximise they don't get covered up by my application's bar. So, basically, I want my application...

Script to insert logging into every function in a project?

I have inherited a fairly large codebase, 90% C++, and I need to get up to speed on it quickly. There are hundreds of .cc files in a wide directory tree structure. It's fairly complex, and has no logging. In order to figure out how some major subsystems work, I want to insert a function call into every function. E.g., given a .cc f...

Windows CE or Windows Embedded Standard?

im building an interactive portable ad campaign device (x86 platform) with touchscreen and stuffs. which is better OS for the device, Win CE or Win embedded standard (XPE). i need to provide support for multimedia platform such as Flash for easy ad development. thanks. ...

Editing windows Registry

Hai Is there any way to edit the Registry of an system from another system in Lan. That is Whether it is possible to edit registry of an client system from server ...

Windows Explorer control for WPF?

Hi there, Is there a way to have a Windows Explorer on WPF? The closes I can get is the Web Browser, but it's not really what I need. Please assist. Thanks ...

Control Windows sound volume

Hi, our software should play sounds (not just small noises, but voice etc.). I wonder what about the volume control. The Windows Vista style guide lines says to define an application specific volume control in the windows mixer. But what about Windows XP and below? I don't think there is a way to get our control into the Windows mixer....

Where does Internet Explorer 8 store its crash dumps?

I am fighting a bug which does not reproduce on my machine, but repeats every time on my client's machine. I've tried everything, and now I am looking for any debug data (or whatever) that IE8 leaves after a crash. Google and Microsoft searches gave me nothing. Where does Internet Explorer 8 store its crash dumps? It definetely sends som...

Saving 'global' data as a standard user?

Hello, in my application I need to store settings that are 'global' (i.e. not user specific) in a known and predictable location. I want the application to be able to be run from anywhere (as a standard user, NOT administrator), including multiple copies from different locations and be able to read and write the saved config files. The...

Getting started with OpenGL ES 2.0 on Windows

This is a very specific questions about the steps necessary to Build a simple OpenGL ES 2.0 program on the Windows platform. The environment is Visual Studio with unmanaged C++. I go to the Khronos.org site and, frankly, find it a bit opaque because it reads like something written by a standards body. I don't want to download a "refer...

Visual Studio addin for mass breakpoints

When I'm starting with some big code I don't know. I find useful to me to search for a constant or function name and then add a breakpoint at all the references so I can begin to understand the code. Is there a VS adding to do that quickly ? ...

Is there a best practices guide to distributing native C libraries for Windows?

Does anyone know of a best practices guide for deploying native (no COM, no .NET) ANSI C Windows shared libraries? Our product uses zlib and we distribute pre-built binaries on our downloads page that differ from those on the official zlib page. I'm guessing that the reason for this is to avoid mixing C runtimes. The official ones are...

default priority value of _main() thread in windows?

hi all, I have a main program (C language)in visual studio 2005 which creates lot of threads.I have given pririty levels for them manually.But my program starts execution from _main() right. It is also a thread correct? Then i want to know the default priority of that main thread(NORMAL/ABOVE NORMAL /HIGHEST). Also can anybody please e...

Multithreaded single-reader single-writer fifo queue

I need a queue for passing messages from one thread (A) to another (B), however ive not been able to find one that really does what I want, since they generally allow adding an item to fail, a case which in my situation is pretty much fatal since the message needs to be processed, and the thread really cant stop and wait for spare room. ...

C++ and process memory protection

I know that WinAPI has built-in hacking functions. I even used them in C# with Pinvoke... To hack Minesweeper... It was easy... So... How i could protect my application from process memory editing, deny DLL injecting and other hacking ways. HOW?! Hope WinAPI has something like void DontTouchMeOrIWillTerminateYou(bool protect)... ...

How to detect Windows Logon event ?

How do you detect Windows logon event? And how do you initiate a user logon from a Windows service? I'm trying to write a piece of code that will detect logon events and log another one automatically. ...