windows

Is there a inbuilt mechanism so that bytes writen to the pipe can overwrite earlier bytes if buffer is not enough?

Pretty much like a queue,when the queue is full an new member wants to come in,just remove the first member at the head of the queue. Is there such a default mechanism in windows? If yes how can I do that in c/c++? ...

PeekNamedPipe always returns 0 for totalBytesAvailable

PeekNamedPipe( tmp_pipe, // __in HANDLE hNamedPipe, NULL, // __out_opt LPVOID lpBuffer, 0, // __in DWORD nBufferSize, NULL, // __out_opt LPDWORD lpBytesRead, &totalBytesAvailable, // __out_opt LPDWORD lpTotalBytesAvail, NU...

Automatically creating shortcuts on any Windows computer

I'd like to create some sort of script that will create a particular shortcut on the desktop of any Windows computer. The idea is to make the script available (to students in a course) so that they can download it to their computer and run it just by clicking it (i.e. not running it at the command-line). The script will have to check for...

How can I spawn a process on Windows and see which files it uses?

I would like to write a C++ function, on Microsoft Windows, that spawns a process and returns, in addition to the process's termination status, a list of all the files the process read or wrote. It should not require any cooperation from the spawned application. For example, if the program spawned is the Visual Studio C++ compiler, the ...

pyHook + pythoncom stop working after too much keys pressed [Python]

this is my script: import pyHook import pythoncom hookManager = pyHook.HookManager() def onKeyboardEvent(event): if event.KeyID == 113: # F2 #do something# return True hookManager.KeyDown = onKeyboardEvent hookManager.HookKeyboard() pythoncom.PumpMessages() after the key specified on the keyboard event, or the F2 ...

WriteFile for a symbolic link which points a network volume's file.

I made a symbolic link file. mklink C:\LinkFileToPointNetworkFile.txt Z:\NetworkFile.txt Then I opened and read the file. Good. It works well. The target file's data has been read. -Of course, I didn't use FILE_FLAG_OPEN_REPARSE_POINT But if I try writing to the file, I get a 'access is denied'. This is not what I expected. Why ...

Exception when deleting message from Azure queue?

I'm dipping my toes into Windows Azure, and I'm running into something that has to be simple, but I just can't see it. I have this small test to play with Azure queues: public void CanPublishSillyLittleMessageOnQueue() { var queueClient = CloudStorageAccount.DevelopmentStorageAccount.CreateCloudQueueClient(); var testQueue = qu...

How to Maximize the window,without clicking the maximize Avaialble in the title bar.

When opening the window , it should open in the maximize mode.I do not want to click on maximize in the title bar,How to achive this? Should i sendMessage to the window at the point of window opening in the code? Please helpp In Visual studio,c++ language ...

"Error 1722" trying to install JDK to non-default location

I have problem with installing java JDK directly in C:. I was able to install in the "Program Files" folder. But for a development purposes, I need to install the JDK directly in the root of C. Problem is when I try to install it it set up gives "Error 1722. There is a problem with this Windows etc." But the setup installed without any...

How to display a notification even when a full-screen application is currently running?

My program needs to display a notification once in a predetermined interval. Under Windows, Shell_NotifyIcon does the job well except that when the user is running a full-screen application, the notification isn't shown. Though that may be the right thing in most of the cases, in my case I need to ensure the notification can be seen even...

How to execute Python script from CreateProcess in C on Windows?

I have managed to get C code calling Python scripts happily on Unix using PIPES within the C code. I now need to do the same on Windows. Essentially I would like to write scripts in different scripting languages like Python / Lua etc on Windows and be able to execute them using STDIN / STDOUT etc. I have been looking at the "CreateProc...

Demoshield setup.exe doesn't startup silently when located in User sub-folder

I have a setup.exe exetuable which is built wich an acient Demoshield (I know I must get rid of it, but now is the wrong moment). When started the setup.exe shows a simple welcome screen. It works on Windows XP, Vista, 7 (tested with 32 bit OSes). On several of our machines (Windows 7 Professional 32bit and Windows XP SP3 32 bit) the se...

What are the mandatory steps to import a module ?

Hi, I'm new to python and I face an issue: I try to extend my SConstruct file and to import a module located in a sub-directory of my project. Here is my SConstruct file: import os, sys sys.path.append(os.path.abspath(os.path.join('.', 'custom_dir'))) import mymodule mymodule.foo() Here is the mymodule.py file, located into a subd...

VIM+Ctags doesn't work in WinXP

Okay guys, you're my only help :) I have GVIM v. 7.3, Exuberant CTags 5.8, omnicppcomplete (0.41) - all latest, to be exact. I'm trying to generate tags to use in VIM, but it seems to totally ignore data in tags file. I've used ctags to generate tags file for bada framework - the file seems to be okay, class definitions present etc. I ...

Windows API: Hide a button which is not a child window

I have a program, where I need to disable a specific button on toolbar. "Save" on the Adobe Reader control. I know it's possible to hide a control by locating its window handle. Using Spy++, I found the required toolbar. It has buttons and text fields. Although text fields are child windows of the toolbar, buttons aren't windows at all...

Ruby bring window to foreground

I am using Ruby 1.9.1p430 (2010-08-16 revision 28998) on MS Ws7 with MS Office 2010 I have launched a copy of Word from Ruby using WIN32OLE: wd = WIN32OLE.new('Word.Application') All works fine, I can manipulate my document as required. However, the Word window is in the background and I would like to bring it to the foreground so th...

Play the sound that an oscillation/vibration would make

First of all, sorry. I don't know how all the Physics terms are named in English. I have an oscillation: for each moment of time t, I have the x (this should have some name, but I don't know it) I need to play the sound of this oscillation (output to speakers). Cross-platform C++ (or Qt) solution is preferred, solution for Windows is a...

Equivalent to `stty size` on Windows.

I'm using some Ruby code that shells out to stty size to get the size of the terminal, but I'm running on Windows. What is the Windows equivalent? ...

How can I run a windows batch file but hide the command window?

How can I run a windows batch file but hiding the command window? I dont want cmd.exe to be visible on screen when the file is being executed. Is this possible? ...

Prevent component from opening a pop-up window in own .NET application

In my application, I have a component, which opens a pop-up window (save dialog). There's no legitimate method for disabling that dialog. Killing it by timer is not reliable way. Is there any accurate way for preventing the dialog from opening? ...