windows

Are Extended-Lenght Paths safe to use?

I just stumbled on this article on MSDN that says a path can be 259 characters + NUL termination, but if you prefix it with "\\?\" WinAPI allows you to use the maximum total path length of 32,767 characters. Eager to see it working I tried using that prefix from Explorer (On XP SP3) but it doesn't work at all (on any path). If you...

How can I make RDW_NOERASE (RedrawWindow) work in Windows Vista?

I am trying to draw behind the desktop icons and didn't manage to do it. Then I found out that the RDW_NOERASE flag used in RedrawWindow is disabled in windows vista. I tried to start the program in xp compatibility mode and with administrative privileges. I does not work. The code is ok. I tested it in xp and it works perfectly. ...

Why does printer changes resolution? User, background, what?

Hi, I am runing a .bat file from a php using exec on a Windwos php server, where php is run using fast-cgi (and nginx). The command line to run this script is pclose(popen("start / ". $cmd, "r")); Where $cmd is somethign like "mybatfile.bat 45 1" When I run the batch file manually it runs a python program to read a database, ...

Where do I start if I want to program something that can change the configuration of Keyboard/Mouse in Windows?

Configuration as in the options you see in the Keyboard/Mouse settings under Windows. I have some .NET programming experience. ...

Change console font in Windows

Is there a way to change the console font in Windows in python 2.6? I'm on Windows 7. ie: import os os.console.font = 'Lucida Console' *EDIT (posted this an answer by accident) Some more information and questions: I looked into the windows API: http://msdn.microsoft.com/en-us/library/ms682073%28v=VS.85%29.aspx It look like it ha...

Low latency trading systems using C++ in Windows?

It seems that all the major investment banks use C++ in Unix (Linux, Solaris) for their low latency/high frequency server applications. Why is Windows generally not used as a platform for this? Are there technical reasons why Windows can't compete? ...

Control a Windows apps using Java

Hello everyone, I would like to know if there is any way I can control a Windows application using Java code. I have already googled it, and found that it can be done using JNI or a library called NewJawin. I want to control Windows Media Player using Java code, e.g. play, pause, and change songs, but could find no relevant example to ...

What API will allow me to detect and end the session of someone using "mstsc /console"?

I'm having a very difficult time listing and closing the sessions of folks using Mstsc /admin. Does anyone know the API to use if the server is a normal server and not a terminal server per-se? ...

How to simulate Keyboard Events in Code in not active window?

How to simulate Keyboard Events in Code in not active window? How to use SendWait() without SetForegroundWindow()? SendWait example: http://msdn.microsoft.com/en-us/library/ms171548.aspx ...

Russian language in e-TextEditor or Cygwin

I'm using e-TextEditor for some tasks and can't figure, why when i using some Russian text and process it in bundle script i'm always getting something like http://gyazo.com/f38c69babe1f95ff786711fe684aee77.png . I'm think this is cygwin bug, because webkit must render it correct in UTF-8 encoding. I'm tested some guides thats describes ...

IIS path logic (How to redirect / display page based on URI)

Hi I have a website where my customers can login. Some of them complains that the URI is too complicated. It is unique for each customer and looks like this: http://www.example.com/login.asp?rld=213&companyID=127432 What I would really like is to have a path like this one: http://example.com/Wallmart (Wikipedia does this) I´ve tr...

windows version of setTimestamp

I have a php script that runs on unix but I need it to run on windows. setTimestamp is unix only and I need the windows equivalent. http://php.net/manual/en/datetime.settimestamp.php Example: foreach($config['feeds'] as $feed){ // in case we didn't save a last checked date, set it to sometime in the 70's $last_date = new Date...

How to import a DLL function in C?

I was given a DLL that I'm trying to use. The DLL contains the function "send". this is what I did: #include <stdio.h> #include <Windows.h> int main(int argc, char * argv[]) { HMODULE libHandle; if ((libHandle = LoadLibrary(TEXT("SendSMS.dll"))) == NULL) { printf("load failed\n"); return 1; } if (Ge...

Limits on Windows environment variable nesting?

So, is there a limit to how deeply environment variables can be nested in Windows? I do a lot of development work and I'm trying to set up my development environment vars, and a lot of them nest off each other, ie. GLEW=%THIRD_PARTY_ROOT%\GLEW GLEW_1_5_5=%GLEW%\glew-1.5.5 GLEW_BIN_PATH=%GLEW_ROOT%\bin GLEW_INCLUDE_PATH=%GLEW_ROOT%\incl...

How can i set up a windows service to listen to events on a remote machine

I have a asp.net web app and a windows service running on separate machines. How can i enable the windows service subscribe/listen to events raised by the asp.net app on the remote machine? What methods can i use? An example of events that can be raised on the asp.net app is a user uploading a file. Once the upload has completed the ...

$_SERVER['_'] equivalent on Windows

On Linux $_SERVER["_"] contains path to PHP interpreter executable (for example /usr/bin/php -r 'echo $_SERVER["_"];' will print /usr/bin/php). On Windows XP with PHP 5.3 $_SERVER["_"] is NULL. ...

How to detect font scaling mode used?

In the Windows 7 "Custom DPI Setting" window, there is a setting called "Use Windows XP style DPI scaling". Does anyone know how to detect if this setting is in use? ...

Capturing KeyPress Event in WIndow Service.

I am trying to create a window service to create a small keylogger application. I am new to window service and sole purpose is to learn. How all the events that are available in winforms can be obtained in window service. I am searching for it on google. But not getting good stuff and currently reading about keyhook dll ...

Getting pixel color in Windows, using python.

Possible Duplicate: Color picking from given coordinates Is it possible to get the current RGB tuple of a given pixel? Pseudo Code: print getpixelcolor(100,100) Which would return something like (35,42,245) ...

how to start with windows API in .net

I want to work on windows API. I have an interest in creating network application that can communicate with web as well. I haven't thought any application yet. But before doing all this . I want to know where to start with. What all I need to start reading. I have created lot of database interactive applications with window forms. But w...