windows

NLB and persistent connections

Good Day, We are trying to implement network load balancing of windows in one of our high performing application, lets call it middleware. The middleware connects to three channels thorugh socket and the connection are persistent, means the clients remain connected between the transaction. We would like to distribute the work on nodes o...

i18n shell in windows

Is there an i18n shell in windows that supports a large character set? Testing my application in windows results in some math characters not being rendered correctly. The Lucida font in cmd.exe and powershell do not have a wide enough selection. Unicode UTF-8 would be the most preferable, followed by the other Unicode encodings. ...

Why do some of my keyboard events work and others do not?

I have the following examples in c++, the first works as expected the second does not. I also note that the Windows System keyboard has the same problem. Anybody know why or a work around/better way of doing this? keybd_event(VK_LWIN,0x5b,0 , 0); /* Windows Key Press */ keybd_event(VkKeyScan('l'), 0, 0, 0); /* L key Press */ keybd_eve...

DbgPrint in Memory Dump?

I have a driver that directly avoids the BSoD and turns the screen of Windows Vista into black with few colourful dots and stripes. I am finding a memory dump on the system afterwards and DbgView is wonderfully showing me a stack trace (stating that this might be a garbled stack and some parts might be incorrect). Pity is, the commands f...

Create a background process with system tray icon

I'm trying to make a Windows app that checks some things in the background, and inform the user via a systray icon. The app is made with Not managed C++ and there is no option to switch to .net or Java. If the user wants to stop the app, he will use the tray icon. The app can't be a Service because of the systray side and because it ...

Scanning notification through WIA

I've registered to receive WIA notifications for all devices through RegisterEventCallbackInterface for WIA_EVENT_DEVICE_CONNECTED and WIA_EVENT_SCAN_IMAGE events. However I only receive notifications when scanner device is plugged in - I don't receive notification when I scan (for example with mspaint which uses WIA). Am I supposed to r...

Getting windows to start R in batch mode using the Start command

I know I must be making a simple syntax mistake, but I want to have a windows batch file that fires up 9 instances of R and runs a different routine in each one. I want these to run simultaneously (i.e. asynchronously). I can fire up 9 command prompt windows and type a command in each one, but it seems like with the START command I shoul...

How do I check whether a user is allowed to read / write a particular registry key?

Hi, Does anybody know how I can programmatically check (using C#) whether my program will be able to read / write a particular registry key (specifically: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run")? I am asking because my program has the option to enable or disable the 'run at startup' behaviour. I want to disable this option if ...

What happens in 'assembly purgatory'?

When a .NET assembly is deployed to the GAC and the destination file is locked, Windows holds it in what I can best guess is some sort of 'assembly purgatory' - c:\windows\assembly\temp. Using Process Explorer these can easily be seen when searching for the suspect DLL: As soon as I end the process locking the file (in this case OWST...

Adobe AIR Application in "What would you like to do" screen

Hi, I would like my AIR application to show up on Windows or Mac when USB drives are attached in the screen that says something to the effect of: "Found a new USB device (Canon Digital Camera), what would you like to do?" followed by a list of applications and possible actions (I'd like one of them to be "Open MyAIRApp to Import Photos...

Git, Windows and COM binaries

Hi I've been using git on windows in a semi-manual mode. I have several repositories for various versions. Each version has a different set of binaries so if I change versions I need to unregister the old binaries and and register the new. Previously I have simply been creating a new git repo for each version, then reg'ing/unreg'ing the...

Programmatically determine what JDK/JRE's are installed on my box

Is there a standard way to do this? I realize this can be somewhat platform dependent. Our product right now is only supported on Windows - so I suppose that's what I'm interested in right now. The only things I can think of are to either scan the registry or crawl the file system. Scanning the file system seems like it can take a re...

How can I automate an existing instance of Internet Explorer using Perl?

I am struggling to get control of an IE preview control which is 'Internet Explorer_Server' class on an external windows application with perl. Internet Explorer_Server is the class name of the window, I've found it with Spy++. and here’s my assertion code of it $className = Win32::GUI::GetClassName($window); if ($className eq "Inter...

Quickly detect if a file mount is unavailable in Windows

We have a web application that attempts to use some resources on a Samba mount. If the mount has somehow failed, I need a way to quickly detect and report an error, however File.Exists and Directory.Exists are taking 30 seconds to return false when the mount goes away. What is the best way to quickly determine if a mount is available i...

Hide a file or directory using the Windows API from C

I want to modify a C program to make some of the files it creates hidden in Windows. What Windows or (even better) POSIX API will set the hidden file attribute? ...

Why don't Firefox and other apps honor my Windows XP settings?

Recently for convenience I set up Windows XP to "Automatically move pointer to the default button in a dialog box" (via Control Panel => Mouse => Pointer Options). For most dialog boxes (e.g. Windows file delete confirmation, Outlook empty deleted items) Windows will follow this directive and automatically position my cursor above the d...

Using SetWindowPos in C# to move windows around

I have the code below: namespace WindowMover { using System.Windows.Forms; static class Logic { [DllImport("user32.dll", EntryPoint = "SetWindowPos")] public static extern IntPtr SetWindowPos(IntPtr hWnd, int hWndInsertAfter, int x, int Y, int cx, int cy, int wFlags); public static void Move() ...

Windows programming application and writing temporary files

I am writing an app that may have in its memory quite a bit of data. I dont want to write the data to disk ad hoc because there may be more data to write, I could append the data, but I dont want to run into any file corruption issues. Are there any good tutorials or trusted methods describing how a windows program typically makes use ...

Vim: running java from vim command gives error.

I wrote a simple hello world program to test the JDK installation. I can compile from Vim using: :!javac Desktop\HelloWorld.java That works just fine but when I try to run the program using: :!java Desktop\HelloWorld it gives me this error: C:\Windows\system32\cmd.exe /c java "Desktop\HelloWorld" Exception in thread "main" java....

(Ruby) Compiling dynamic applications for Windows?

Hi All, Does anyone have any insights regarding compiling Ruby code for Windows? I've tried both "Ruby2Exe" and "OCRA", but both present their own issues. Ruby2Exe keeps presenting vague or confusing warnings such as "can't modify frozen string". OCRA on the other hand seems to want to run your script and assumes that there are no dy...