how to send return(enter button) character through program in windows c/c++? I want to send an external program "user name" with enter button through pipe but "\n" and "\r" and EOF are not working..
...
I need get the SVN commit message in post-commit hook bat in Windows, so I do this:
FOR /F "tokens=*" %%a in ('"svnlook log %1 -r %2"') do @SET MSG=%%a
I test it, it's ok for most case.
but, when I input multiple lines in SVN commit message, the command can only get the last line of commit message, I think it's caused by the windows b...
Hi,
Say there is a group policy that prevents the user from using the "run" command in Windows. What would happen if there was a registry key that contradicted this i.e. allowed the user to use the run command?
Would the user be able to use "run" or not?
Thanks a lot for any answer!
...
how to send return(enter button) character through program in windows c/c++? I want to send an external program "user name" with enter button through pipe but "\n" and "\r" and EOF are not working.
consider if pPipe is the pipe stream for sending the data to the remote process stdin...
fprintf(pPipe,"username\n");
...
BringWindowToTop, SetForegroundWindow, SwitchToThisWindow, SetWindowPos, ShowWindow all are described as showing and activating a window.
What are the real differences between them? When and why would BringWindowToTop be preferred to SetForegroundWindow, (Or SwitchToThisWindow or even SetWindowPos with the flags to activate and show)?
...
Using Java over Windows Vista, I'm trying to create a kind of a monitor for a directory, so every time this directory is modified (new, renamed, updated or deleted files) a process is triggered. I tried to do this with a loop that will execute a dir in the directory and analyze all the files. But this is very time and memory consuming, s...
Is there a way to unlock a file on Windows with a Python script? The file is exclusively locked by another process. I need a solution without killing or interupting the locking process.
I already had a look at portalocker, a portable locking implementation. But this needs a file handle to unlock, which I can not get, as the file is alre...
I am running a ruby script that uses Ruby/MySQL and net/ftp. The script is running on a Windows Vista box and is trying to create a database and ftp connection to the same remote Solaris server.
Here is the gist of the code:
require 'mysql'
require 'net/ftp'
dbh = Mysql.real_connect(db["host"], db["user"], db["pass"], db["name"])
ftp ...
I have a mutex that controls access to a single object from multiple threads. When a thread has finished the mutex is unlocked to allow order threads to operate on the object. On Windows using the WaitForSingleObject function is there an order that threads are signaled? I want the first thread that attempts to lock the mutex to now be al...
Suppose you have some source code that comes from the unix world. This source consists of a few files which will create a library and a lot of small .c files (say 20 or so) that are compiled into command-line tools, each with their own main() function, that will use the library.
On unixy systems you can use a makefile to do this easily...
I'm writing a C# app that will aggregate control of several applications (WMP, Google Earth, etc.). For apps that I am not writing myself, I am launching as a process, so I have their handles (handle = Process.Start("C:\whatever.exe"); is the code, I believe).
For it to work smoothly, I need to be able to control the minimized/maximized...
Say you have a text file - what's the fastest and/or most memory efficient way to determine the number of lines of text in that file?
Is it simply a matter of scanning through it character by character and looking for newline characters?
...
I can easily identify running processes by looping through the WMI Win32_Process elements. Is there a similar way to identify "applications" as in Task Manager? I assume that this is comparable to knowing whether the process has an open window. For example, when you exit Outlook, the OUTLOOK.EXE process keeps running. Task Manager no...
What notification code is sent with the wm_command message to the dialog box procedure when a check box changes state?
And more importantly, where would I look in the msdn to find the notification codes for various controls?
...
I have a windows server 2003 up in the internet.
But sometime I need to restart it.
After restart, I want one of the applications to run.
I want to do this all programatically.
I can now remotely restart the server.
But the question is how can I ask that piece of software to be executed (more precisely, I want to execute a .BAT file to...
Hello. I am trying to make an application for Windows Mobile 6 and one of it's features is enabling and disabling the speakerphone. How can this be done in C# code? I'm guessing a P/Invoke. Please let me know, I need this information to get my application really going.
Thanks
...
I am working on a program which includes a general purpose engine, some program specific content, and a custom automatic updater to handle updating the many gigabytes worth of media in our content as efficiently as possible. In a recent release of the engine, we have reorganized our directory structure, such that instead of the executabl...
Hi
I am not able to create minidump form my process by changing system setting.So my Question is
Will system create a minidump for user process when they crashes
If yes , which setting i need to configure
Or do i have to create minidump programmatically.
How much effective minidumps are while investigating a crash ...
I'm looking for a way to sign some data in C++ code which will then be sent to a PHP script for verification and processing. I want to use the OpenSSL module there, namely the *openssl_verify* function so I need something compatible with that.
The application will be only for Windows so CryptoAPI might be fine but looking at the samples...
Not sure where this should be posted...
Anyway, if i run the following command in a windows XP console it gives me a weird error and i have no ideea why.
mplayer "1.mp3" -vc "null" -vo "null" -ao "pcm:file=C:\1.wav"
Could not parse arguments at the position indicated below:
file=C:\1.wav
^
Failed to initialize audio driver 'pcm...