windows

C# - Windows Phone 7 SDK - math class

Hi It seems that I cant use system.math class within the windows phone projects... I cant even add the mscorelib.dll manually (windows phone dlls are different than windows dlls) Is there any way to use System.Math class within the windows phone SDK projects? Thanks. ...

Getting the Physical Device Object name of a disk device

I need to retrieve the "Physical Device Object name" of a disk device from a user mode application on Windows. To be specific what I mean by that - this is a screenshot how you can see it through the Window Device Manager: I have a solution now that involves a kernel driver that gets loaded and interrogated through IOCTLs. Once in kern...

Update datagridview row from a thread in c#

I have a datagridview on a windows form application. Application post all displayed data to an external website. website return codes so application detrmine status of posted data. I need to create a parametrized thread that take row index as parameter and post the row data and update it by return value. (It may involve changing row b...

Eclipse-CDT: Automatic Path Discovery when cross-compiling for Linux under Windows

I'm using Eclipse-CDT to develop and compile projects for Linux. As host both Linux or Windows may be used. The project is created as Makefile project with a special build command, so I changed the build-command from make to our special one and the "Build" and "Clean" commandline approbriately. The build command uses a gcc from a direct...

Complicated Windows desktop size increase

Hello, i want to increase desktop size (programically), effect should be like attaching second monitor, on the primary monitor nothing should change after increase. Such trick is needed to hide window off screen and then using PrintScreen get that window image, cutting it from whole screen. P.s. PrintWindow() function wont help here, ...

Find the permissions of a file in windows.

Hi, I work in Linux. In Linux with stat function, we can extract the permissions of a file. Similarly how can we extract the permissions of a file in windows. _stat function in msdn states that permission bits are set in the stat buffer. But it does not give how to extract them. http://msdn.microsoft.com/en-us/library/14h5k7ff%28V...

How to get set process shutdown level?

Here is my case. I have a process running in my system. I want that process to end last when a shutdown/logoff is initiated. I read http://msdn.microsoft.com/en-us/library/ms683221%28VS.85%29.aspx and understood that we can assign shutdown levels to process.But I couldn't figure out how to do that. Can anyone help me with a example on h...

Git hook output - where to see/find

I'm trying to get a git commit email hook running using Git on Windows. I'm sure I've got my copy of contrib/hooks/post-receive-email (placed in the project's .git/hooks/post-commit) script messed up, or I'm missing an important node in my config, but I don't know where I would see any error messages. Would they be echoed to stdout when...

Calling windows dual monitor function

Hi, I need somehow to trick Windows OS to use dual-monitor function, for expanding the desktop, when i use only one monitor. Registers, api calls, drivers installation... there should be something, that triggers d-m. Why I need this? I want to hide window out of visible desktop coordinates and still be able to get that window image. P...

Display a C# Form to another user, or all logged-on users

I have a C# console application that runs nightly from a Scheduled Task to perform some maintenance. The application also displays a Form as a splash screen informing anyone on the system that the application is running, and shows the status. To run the application with the correct permissions I need to run the Scheduled Task as anothe...

How do I turn a flat file of data into a queryable data source

I generate files, lets call them .dwrf files, which contain a significant amount of data. Currently we export those to .CSV and the resulting files are large (2GB+). I would like to cut out the export process and make the contents of a .dwrf file queryable directly from Excel or other applications. What I would like to do is write a ut...

accessing the Windows clipboard

How can you access clipboard content using the .NET framework? ...

A Windows Based PHP Compiler?

Possible Duplicate: PHP compiler for windows I am looking for a PHP compiler like phc that I can use on my windows machine hopefully with a GUI (!). It needs to work with PHP version 5.3.x. A freely available compiler is what I am looking for. I have had no luck in finding something that works with php 5.3 and that is activel...

C++ App Exceeds Memory But Doesn't Use Virtual Memory

I have an application that allocates memory with 'new' and frees them with 'delete' in some parts of the code. The problem is that whenever it exceeds the memory limit of the system (let's say 2GB), Windows sends a Kill signal to the process. I think it is not usual since it should use the swap space(I think in windows it is called virtu...

Get error code from within a batch file

I have a batch file that runs a couple executables, and I want it to exit on success, but stop if the exit code <> 0. How do I do this? ...

AutoCompleteSource stops KeyPress event?

Simple code C# winform app (visual studio 2010): A simple form with one text box here is a keyPress event: private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { // The keypressed method uses the KeyChar property to check // whether the ENTER key is pressed. if (e.KeyChar =...

Error 1053: The service did not respond to the start or control request in a timely fashion?

I build a windows service and I am getting the Error 1053 and not sure why. This is what my onstart looks like : protected override void OnStart(string[] args) { var workerThread = new Thread(Worker); workerThread.Start(); } I spawned off a new thread as I should but I am still getting no joy. ...

Windows: Check if a window has focus?

Possible Duplicate: How can I tell if a Window has focus? (Win32 API) I have a HWND in a C++ windows app. How can I tell if it has focus or not? UPDATE Looks like this is a dupe. Sorry. ...

Making graphs in IE under Windows CE 6.0

There are a whole lot of graphing APIs, but I haven't been able to find any that work with a device running Windows CE. The reason I'm asking is because I've been told that we are going to try to develop a user interface for our embedded device that is entirely web based. This is so that we don't have to make one interface for people us...

How do I use TCHAR* Provided in Cmd Line Argument in Switch Statement?

Here's what I've got: switch(argv[0]) { case "-test1": AfxBeginThread(method1, 0); break; case "-test2": AfxBeginThread(method2, 0); break; case "-test3": AfxBeginThread(method3, 0); break; default: AfxBeginThread(method1, 0); break; } I'm using windows so the arguments come into the array as TCHAR*'s. What do I...