windows

Windows equivalent to Linux namespaces (per-process filesystem mounts)?

Linux has a feature called namespaces, which let you give a different "view" of the filesystem to different processes. In Windows terms, this would be useful for example if you had a legacy program "floyd" that always loaded its configuration from C:\floyd\floyd.ini. If Windows had namespaces, you could write a wrapper script which wou...

We need to test a mixed windows-Linux environment. Is there a automation tool that supports both?

We are trying to automate an aplication that lives in a mixed windows-linux environment. We need a test automation tool that supports both environments. Any recommendations? We are evaluating SeeTest (www.experitest.com) that claims to be capable of supporting both Linux and Windows . Does anyone have any experience using it for such...

IPC bottleneck?

I have two processes, a producer and a consumer. IPC is done with OpenFileMapping/MapViewOfFile on Win32. The producer receives video from another source, which it then passes over to the consumer and synchronization is done through two events. For the producer: Receive frame Copy to shared memory using CopyMemory Trigger DataProduced...

Plesk/PHP Version per directory

Need to have example.com/directory-1 and example.com/directory-2 run different versions of PHP. Both versions are installed and working with plesk and I can switch between them and set different versions for subdomains or the entire domain but I need one directory to use an older version and everything else the newer one for backwards c...

How do I measure time in C?

I want to find out for how long (approximately) some block of code executes. Something like this: startStopwatch(); // do some calculations stopStopwatch(); printf("%lf", timeMesuredInSeconds); How? ...

Win32: Get device info in WH_KEYBOARD_LL || Block input on WM_INPUT when using Raw Input

Hi there, I need to write a program to modify the input of a certain usb hid keyboard (barcode scanner) under Windows. The following workflow should apply: Listen to input from device -> record input -> stop input from getting to the active application -> process recorded input and output result to active application So I did search f...

Port requirement for web server.

I currently have a small socket server that I'm trying to convert to a web server. Basically it dumps XML to anyone connecting to it. At the moment, it's not a web server as it listens to a non-web port (1337). I know that both 80 and 8080 are accepted web ports, but none of those are free on the machine I'm going to use. Are there a...

Is there an easy to implement or existing protocol to pass an object with pipe/socket in windows?

The object is essentially BYTEs of dynamic length. What's the easiest way to implement a send/receive mechanism? I got a tip follows but have no idea how to roll this protocol myself: Just remember that pipes, like sockets, don't guarantee that everything you put in the pipe will come out the other end in the same number of...

What is the minimum guaranteed time for a process in windows?

I have a process that feeds a piece of hardware (data transmission device) with a specific buffer size. What can I reasonable expect from the windows scheduler windows to ensure I do not get a buffer underflow? My buffer is 32K in size and gets consumed at ~800k bytes per second. If I fill it in 16k byte batches that is one batch every...

Avoiding a Windows Firewall popup

Hi My organisation produces a suite of Windows applications that make use of networking, and so when users run our software for the first time, the Windows Firewall (if it is running) brings up a pop-up, informing the user that our app(s) are trying to use the network, prompting the user to allow or deny access. This occurs with plenty...

Windows batch R Sweave error loading packages

I am having trouble finding clear documentation on how to set up a batch file for a Sweave document on Windows XP. I am using the batch files that are found here I have created a batch file names run.bat which contains the following: Sweave myFile.Rnw The first thing I do in my Sweave file after setting the wd is read in a dataset ...

TRichEdit and URL highlighting problems

I am using the current code to highlight URLs on a TRichEdit: procedure TForm1.WndProc(var Message: TMessage); var p: TENLink; strURL: string; begin if (Message.Msg = WM_NOTIFY) then begin if (PNMHDR(Message.lParam).code = EN_LINK) then begin p := TENLink(Pointer(TWMNotify(Message).NMHdr)^); if (p.Msg = WM_LB...

Different ways to ask Windows to write data to disk

Usually, when an application writes to one of it's files on disk, the file modified timestamp changes. Sometimes, and in my case it is an application written in ProvideX (a Business Basic derivative i believe) doing the writing, the modified timestamp does not change after a write. A program like MyTrigger will not pick up on the write...

Triggering taskbar button flash from batch file?

Is it possible to trigger Windows' "flash the task bar button X times or until the window comes to the foreground" behavior from a batch file? I'm trying to call the user's attention to a long-running script upon completion. Using an external program to trigger the flashing is fine, as long as it doesn't require an install (i.e. the ex...

Proper usage of the windows user profile directory

I need to create a directory inside a windows users 'home' directory (c:\Documents and Settings\someusername\ or c:\users\someusername\). This directory will exist permanently but will only contain temporary files. What is is the best location for this directory within the users profile if I want to be a good citizen? I should note t...

List Control Adds a Space for an Image to Column 0 When Subsequent Columns Have Images

Hi, I’ve come across a problem with Windows list controls (I am specifically using MFC, but it looks like it applies to all list controls in the Windows common controls library). In my specific case, I want to create a list control that has two or more columns. The first column (0) is text-only and is used to allow the user to jump to ...

Looking for free lightweight xslt editor

As stated I'm looking for a free lightweight xslt editor with following functionalities: Intellisense support Simple to use (ie. can copy/paste xml & xsl into it and run the transformation) Can be used to preview resulting html Runs on Windows Something like xmlspy used to be like (before it got pricey and full of features noone uses...

win32 C api call for disabling a network adapter?

Ive been all over looking for a way to disable the network adapter through M$ IP Helper routines. For the majority of the code I've been using this api: http://msdn.microsoft.com/en-us/library/aa366071(v=VS.85).aspx However, I do not see a way to actually disable the adapters .. If deleting the IP address associated with the adapter di...

WCF Tcp Binding "The requested address is not valid in its context" Error

I have a WCF server using a netTcpBinding and a client. When I run them locally they work fine. If I put the server on a Windows Server 2008 machine and try to run it, it fails unless I change the address to localhost, but no clients can connect to it. I can run the client from the server to connect to a Windows Xp machine running th...

Sandboxing applications

Hi all, I have an application (Installed as a service) that has 5 different versions. For testing I need to have all 5 installed. Currently I have to uninstall the application and reinstall the required version. The application has a single exe (in Program Files\App) along some an xml file containing it's settings. This is installed vi...