windows

Windows batch script url decoding

I have a batch script that triggers vlc for me on my network, the problem is it opens based on URLs in a browser. The browser automatically adds the %20 in place of a regular space, and I need to replace this with a regular space again in my batch script before sending the file path on to vlc. Here is my code; @echo off set str=%1 set ...

Which Emacs... for Mac OS X?... for Windows?... for Linux?

I've started programming Erlang code that's going into production (gulp!), but I'm still using TextMate in Mac OS X, Notepad++ in Windows 7, and GEdit in Ubuntu 10.04... (I use all three at work and at home). Emacs is the IDE of choice for programming Erlang, and I'd like to use the same editor on all three platforms. I have an idea of...

Programmatically set Pages per Sheet (N-Up) option when printing in Windows

I need a good way to programmatically set the Pages per Sheet setting when printing. I know that a user can select this option via a printer settings dialog and that I could make such a dialog display if I wanted to. But in the context of the program I'm working on, I need this to be selected by the software itself without requiring to ...

Is it possible to pin a dll in memory to prevent unloading?

Is there some way in Windows to prevent unloading of our dll via FreeLibrary? I.e. to "pin" it in memory for the life of the process? ...

unix "which java" equivalent command on windows?

Hi all: Failed to find it on Google, but just wondering if there is a way to reveal location of java by an equivalent command from Windows prompt. Basically I have info from client that he doesn't set the JAVA_HOME but still can run java programs. I suspect it then must because the path to that java is set in the system PATH environmen...

Show confirmation dialog before installing prerequisites

I have a windows application (an IE plugin actually) that depends on .NET and is installed via an installer created in visual studio (2010). I've got it working so that that it is generating a Setup.exe which installs the .NET framework automatically if needed (via the prerequisites mechanism), but I've been asked to show a confirmation...

Can you access standard Windows strings like 'Cancel'?

I am building a Windows dialog box that has the standard 'OK' and 'Cancel' buttons. Given that Windows uses the same button text in its own dialogs is there a way for me to grab the correct strings to use on the buttons? This way my application will have the correct strings no matter which language is being used, without me needing to ...

Are there any consequences to never deleting critical sections?

I am refining a large body of native code which uses a few static critical sections and never calls DeleteCriticalSection, leaving them to process exit to clean up. There are no leaks and no concerns about the total number of CS getting too high, I'm just wondering if there are any long-term Windows consequences to not cleaning them up....

Get hidden IvideoWindow Image

Hi, i need to get Image of hidden IvideoWindow ("ActiveMovie Window"), which shows webcam preview. As far as i can tell preview isn't overlay, it doesn't have overlay features, i can use printscreen on it, but i need window to stay hidden all the time, so that won't help. Also PrintWindow() api function returns me black screen. Program...

Apache / PHP on Windows crashes with regular expression

I have discovered that the following PHP code crashes when it runs on a Windows Apache server: <?php $test = "0,4,447,11329,316,415,142,5262,6001,9527,11259,11236,1140,9770,9177,9043,11090,268,5270,9907,9196,10226,". "9399,1476,9368,6929,1659,11074,10869,8774,739,11344,10482,6399,8910,8997,11198,137,10148,10371,5128,767,2483,"....

Make an installer for python project

I downloaded an open source project http://gmapcatcher.googlecode.com/files/GMapCatcher-0.7.2.0.tar.gz and I am trying to modify a few things in the code but don't know how to test the code! I tried to make an installer for the project but nothing worked till now maybe I didn't follow the right steps or I am missing somthing. my questi...

the modem for detecting voice

hi. I write an application,and i want to detect when the remote party answers a phone call made by my application,i need to use the Voice Detection. Do you know which kind of modem have the appropriate hardware to detect when an outgoing call is answered? i'm programing with c#.net and kdtele component. Please help and guide me. Thanks...

Convert service name to port

Hi, i want to convert a service name to the corresponding port number. Unfortunately with this code I always get IntPtr.Zero from getservbyname and the WSANO_DATA error. What have I done wrong? internal sealed class ServiceNameToPortConverter { public int Convert(string name) { // Vorbedingung if ...

telling Windows from Linux (via network)

I am doing a research on how someone can detect whether another machine is running Windows or Linux, if it runs inside a virutal machine, if it's behind NAT\proxy\VPN and what not. I saw some interesting tools like p0f, which does passive detection. Basically, I know there are implementation differences in TCP and other underlying protoc...

SNMP: Create custom OID

I need custom OIDs for monitoring some of my software states. But I just can't understand: how can I create custom OID (like .1.3.6.1.4.1.30891.100.103) in Windows XP system? I need few of them to write there some info and read it when needed but I have no idea how to create them in the system. ...

Are there any HTTP Live Streaming clients for Windows ?

Is there a Windows player that implements the client portion of the HTTP Live Streaming RFC? This would be quite handy for testing purposes. A VLC nightly (1.2.0-git-20100811) can open some of the sample m38u playlists provided by Apple, but it treats each segment as a separate video, so I don't think VLC trunk has a full client implem...

vim: disable mswin (turn off windows shortcut keys)

I just installed vim on Windows XP machine. When logged on to another user a little bit ago, I went to C:\program files\vim\_vimrc and commented out the following lines "source $VIMRUNTIME/vimrc_example.vim "source $VIMRUNTIME/mswin.vim "behave mswin and then Ctrl-X didn't cut text -- which is good. However, when I logged in as admi...

How to get a full path name from SHBrowseForFolder using JNative under Windows?

Hi, i am not a windows programmer so maybe (i hope) this question is ridiculous for a windows-veteran java programmer. I would like to use windows' native folder browser dialog from within a java application. I actually succeeded in invoking the SHBrowseForFolder dialog which is nice - the problem i am now facing is: How do i extract th...

Good or evil - SetParent() win32 API between different processes

The SetParent function takes a child and new parent window handle. This also seems to work when the child window is in a different Windows process. I have seen a post that claim this is not officially supported, but the current docs don't mention this any more. Is this a flaw in the current docs, or did this behavior change? HWND WINAP...

C++ How to loop dynamic arguments from function?

I need to loop all the dynamic arguments i have gave to my function, how? I mean this kind of code: void something(int setting1, int setting2, ...){ // loop somehow all the ... arguments and use setting1-2 values in that loop } setting1 and setting2 are not part of the dynamic argument list. ...