windows

How do I make Windows file-locking more like UNIX file-locking?

UNIX file-locking is dead-easy: The operating system assumes that you know what you are doing and lets you do what you want: For example, if you try to delete a file which another process has opened the operating system will usually let you do it. The original process still keeps it's file-handles until it terminates - at which point th...

How to add a program to the 'execute' list

Hi, I really don't know how to say, may be this is why I didn't found a solution on Google. My problem is simple. I want to run program from the execute command just by putting their names and not the path. For example type 'myprog' to open 'c:/program/myprog.exe' That's all! Thanks for your help :) ...

Default icons for Windows applications?

I've just recently begun coding desktop apps in c# and I'm wondering if Visual Studio or MSDN provides a default set of icons for applications, i.e. icons for common actions, GUI elements, data types, etc. For instance, I have a button that the user clicks on to select a file, it would be nice if I could use Windows' standard folder icon...

How do I change the current windows theme programatically?

I want to allow my users to toggle the current user theme between Aero and Windows Classic(1). Is there any way that I can do this programatically? I don't want to pop up the "Display properties", and I'm dubious about just changing the registry. (This requires a log out and a log back in for the changes to take effect). Application sk...

Polling Long Running Windows Service from ASP.NET

We have an application that uses Lucene.NET within a windows service to reindex our app for search. Our admin section can trigger a full reindex in Lucene, and currently the only way to review its progress is through a log file written to disc. This is clunky. We'd like to poll the service to determine the reindexing progress. Does a...

How do I apply a set of properties to a subset of files in a Visual Studio Project?

Where I work, we have a large codebase of C code that we build using Visual Studio 2005. It's separated into a variety of projects, including several static libraries. There are two solutions we primarily use, Full Debug (which turns off optimizations entirely), and Debug (we selectively optimize around 20% of files, while leaving the re...

Prevent application running from windows temp folder

Hi, We have the application, which used to download the firmware to external device. We used to release our SW as a zip file. Some of the users directly running the application from the zip file. So the application extracting to windows TEMP folder and running. That time windows firewall or anti virus software blocking the our applica...

How to determine a process "virtual size" (WinXP)?

I have a program that needs a lot of memory, and it crashes as soon as the 2GB virtual address space is reached. Sysinternals process explorer displays this as "virtual size" column. How can I determine this "virtual size" with C (or C++) code? Ok, I have to query a performance counter for "Virtual Bytes". Perfmon shows the query stri...

What can I access from a BackgroundWorker without "Cross Threading"?

Hi, I realise that I can't access Form controls from the DoWork event handler of a BackgroundWorker. (And if I try to, I get an Exception, as expected). However, am I allowed to access other (custom) objects that exist on my Form? For instance, I've created a "Settings" class and instantiated it in my Form and I seem to be able to re...

Which format has an audio stream before reaching the soundcard?

I want to manipulate an audio stream before it gets to the soundcard. So I wanna use the sAPOs from Microsoft to manipulate the audiostream in the audio engine (vista audio architecture). My basic question actually is which format the audio stream is in. I don't know but I think it is the WAVE format or the RIFF. Can anyone help me in ...

How do you include images as resources in a C++ executable?

Is it possible include images (jpegs) as resources in a win32 c++ executable? If so how? ...

Where can I get php_tidy.dll for PHP 4.4.2 or 4.4.4?

Hi! I need to get tidy extension for PHP 4.4.2 and 4.4.4 (win32). I have tried to find dlls for these old PHP versions, but with no luck. ...

In the windows python console, how to make Tab = four spaces?

Hello I would like that when I am in the python console tabbing will give me four spaces. Any ideas? ...

Win32: Returning a minimized and hidden window to top.

I'm unable to restore a window after "minimizing" a window to tray, by doing this in wndproc: case WM_SIZE: if (wparam==SIZE_MINIMIZED) { ShowWindow(hwnd,SW_HIDE); } break; The tray message handler looks like this: case TRAY_ICON_MESSAGE: switch(lparam) { case WM_LBUTTONDOWN: ShowWindow(hwnd, SW_RESTORE); BringW...

vector<string> or vector<char *>?

Question: What is the difference between: vector<string> and vector<char *>? How would I pass a value of data type: string to a function, that specifically accepts: const char *? For instance: vector<string> args(argv, argv + argc); vector<string>::iterator i; void foo (const char *); //*i I understand using vector<cha...

py2exe to generate dlls?

Is there a way using py2exe or some other method to generate dll files instead of exe files? I would want to basically create a normal win32 dll with normal functions but these functions would be coded in python instead of c++. ...

Easiest way to add a text to the beginning of another text file in Command Line (Windows)

What is the easiest way to add a text to the beginning of another text file in Command Line (Windows)? ...

Installing PostgreSQL on Windows

I'm in a bit of a mess here. I installed PostgreSQL on my Vista computer a couple of days ago but then when asked to enter the password for the postgre user account I couldn't remember it (allegedly I was asked during setup but I don't remember that). Anyway, so I uninstalled Pg with the intention of reinstalling it, removed the user ac...

How to delete a long path in windows.

OK, this isn't necessarily programming related, but it might have a programmatic solution. When importing a project into eclipse, it somehow started creating recursive versions of the directory. Now, when I try to delete anything, I get the message " the file name you specify is too long." I can't delete it from the command shell. I ...

Remote access Windows Vista to Mac OSX?

Is there a means to do remote desktop access from Windows Vista to Mac Mini with OSX? Looking to be able to remote in to Mac in order to access system so no need to have it on a seperate monitor/kb to do testing and development. Anything similar to Windows Remote Desktop that can be used? ...