windows

PHP and Unicode: Weirdness between Windows and Linux.

Look at IBM's Unicode for the working PHP programmer, especially listings 3 and 4. On Ubuntu Lucid I get the same output from the code as IBM does, viz: Здравсствуйте Array ( [1] => 65279 [2] => 1047 [3] => 1076 [4] => 1088 [5] => 1072 [6] => 1074 [7] => 1089 [8] => 1089 [9] => 1090 [10] => 1074...

fork with Ruby 1.8 and Windows

I'm using ruby 1.8.7 patchlevel 302 and I'm working on a Windows xp system. I have to start an external process that needs to react on user input. The process doesn't react if I use threads, so I tried using fork. With fork the external process reacts on the user input but it executes more than just the fork block. For example fork do ...

how i can pass a file directory (path) as parameter ?

how i can pass a file directory (path) as parameter to 1. batch file in windows operating system 2. bash file in unix oprating system ...

How to open a file which is already open in exclusive mode?

Hi, I want to access a file which is already opened with exclusive access by some other process (not under my control). I know that the I/O manager will not grant my request, as some other process is holding the lock (with exclusive access). Is there any way by which I can bypass the checks (such as file opened in exclusive mode) made ...

Get proccess ID with python

Could someone tell/show how to get the current proccess id with python on windows there are this function os.geteuid() but its only works with linux/unix could someone tell what it the pythonic way to get the current proccess id on windows. ...

How to maintain focus on menu after clicking a menu command

Simple version Is there any way to maintain focus on menu after clicking a menu command? Detailed version Specifically, I've made a menu with some menu item with checked property. The problem is that each time I click checked menu item the menu lose its focus. It can be pretty annoying when there is a number of menu item with chec...

A ThreadPool library in C++

I am looking for a good and stable threadpool library for C++ that's fairly well documented. I know about the Native Windows thread pool API and the newer Vista Thread Pool API, however my program requires some backward compatibility, so perhaps an outside library I can provide with the program is better. I have looked into Boost's thr...

Monitor selections in any application

I want to monitor all text selections made in any application by the user. Is that possible? I would prefer a solution in .net, but vanilla C++ is OK. If not, can I monitor all text copy operations (CTRL+C) from a .net application? similar question: http://stackoverflow.com/questions/653003/in-c-is-there-a-way-to-consistently-be-able-...

Windows Form Custom Panel with Transparent Child Issue

Hi all, I've created a custom panel (inherited from Panel) that override OnPaint method to paint the inner rectangle with LinearGradientBrush. public void PaintPanel() { // Re-calculate the CalculatePanelHeight(); Graphics _g = this.CreateGraphics(); Point _startPoint = new Point(0, m_TopAreaHeight)...

Checking if a user has read permissions for a file in windows

How do you check to se if a user has read permissions for a file in windows? There is the possibility to read the authorization rules via File.GetAccessControl. This does not tell me if the user has the right to read the file through group membership... ...

Programatically installing or removing a Firefox add-on, without the notice box.

Not as evil as it sounds! This is for a corporate deployment tool. One of the things they want to do is to manage browser add-ons & plugins. UI wise, the client considers it inappropriate for a dialog to pop-up. What I need to do is copy out xpi files to the destination systems, but how do I trigger an install. install-global-exten...

How to monitor MySQL queries on Windows

Is there any easy way to track/monitor all the SQL of the queries, executed by an MySQL server (on a Windows machine)? Update: I am asking about the free tool. ...

How does a Windows non-native user interface work?

Hello! Through experience I have found that the native windows forms/components don’t like to be changed. I know using Delphi or Visual Studio you are given native windows components to populate a form or window with and then you attach code on events that these components may do (onClick for example). However, how do all of these prog...

Caching strategies for Windows end-user applications?

I'm working on what is essentially the runtime for a large administrative application. The actual logic that is being executed, as well as the screens being shown and the data operated upon is stored in a central database. In order to improve performance, the runtime keeps data queried from the database in various caches. However, it is...

audio / video codec help

Hello guys I have to create a codec for windows media player, this codec when installed should be able to play encrypted files. Now to enhance the problem, this codec should work with every major media player such as vlc, itunes, real player. I would request the community to kindly help me with following queries. How to get start...

Turning off process feedback cursor in windows

Is it possible to disable the mouse feedback cursor when a process begins from within the process? I know you can use the STARTF_FORCEOFFFEEDBACK flag when creating the process, and that the feedback cursor will turn off when the process displays a window. However, I do not have control over the code that creates my process and my proce...

Cross-Platform Building, Standard Directory Structures, Environment Variables

I've started using CMake as a build tool for a cross-platform command line program that requires FFTW3 and Boost.Format. I'm familiar with the Unix-like standard directory structures for headers and binaries of installed libraries but I'm wondering what the quasi standard is on Windows platforms as to how and where libraries are installe...

How can I redirect Visual Studio’s “Output” window to DebugView?

I’m using Visual Studio 2010 to write unmanaged C++ code. When debugging, anything printed using OutputDebugString or MFC’s TRACE macro goes to Visual Studio’s “Output” window. I would prefer to see the output in DebugView instead, while still running under the MSVC debugger. Is this possible? ...

Using XEnroll to create a PKCS10 with SHA-256 Hash Algorithm

I am trying to create a SHA-256 PKCS10 using Microsoft´s CSP (Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)) but without success. I have to do this using the XEnroll API (Windows XP / SP3). Here´s the sample for generating a SHA-1 PKCS10 (works just fine!): Set Enroll=CreateObject("CEnroll.CEnroll.2") Enroll.provid...

How can I force display detection in Windows?

I often boot my Windows 7 PC with the attached KVM switch focused on another computer. When I switch to the booted PC, the display resolution is wrong (and the second attached monitor is not detected). I can correct this by right-clicking the desktop, choosing Screen Resolution and clicking Detect. This makes Windows detect attached dis...