windows

How to use WINAPI from newer SDK but still using the old SDK in WindowsMobile.

Specifically, I want to use Point-to-point Message Queue but because I am still using legacy codes in eVC++ 4 and it only support until PocketPC 2003SE SDK, I cannot find CreateMsgQueue and friends in the headers (the port to newer VisualStudio is still in progess) I am using the Message Queue to do IPC with apps developed with WM-6.5-D...

How to convert Word to images with win32com in python?

Hi all, I have googled an example for converting Word to Html. import win32com from win32com.client import Dispatch, constants w = win32com.client.Dispatch('Word.Application') w = win32com.client.DispatchEx('Word.Application') '''skip some code here''' wc = win32com.client.constants w.ActiveDocument.SaveAs( FileName = filenameou...

How do I install pyCurl?

Hi folks! I tried everything! I cannot find a way to install pyCurl on my Windows 7 machine! I found these binaries link... BUT there are no binaries for 2.6. : ( Help would be great. : ) ...

C++ memory leak detecting method

I'm working on a project using many external library on windows. I got problem with memory leak: i detected many memory leaks by overriding operator new/new[] and delete/delete[]. The problem is i know how many memory blocks are leaked, but don't know where to find them, in overrided functions, i could log size and position of allocated ...

Information about PTE's (Page Table Entries) in Windows

In order to find more easily buffer overflows I am changing our custom memory allocator so that it allocates a full 4KB page instead of only the wanted number of bytes. Then I change the page protection and size so that if the caller writes before or after its allocated piece of memory, the application immediately crashes. Problem is t...

Get Windows Documents Folder Path with Actionscript

I am an absolute beginner when it comes to ActionScript and Flash. I am really a .NET developer. I have been asked to modify a flash application that runs on Windows. Currently it uses hard coded paths. My customer wants it to use the windows document folder for the current user. Does ActionScript have a method to get the documents folde...

Why do Windows environment variable names use a special escape character?

I am curious if there is any history behind why the ^ character is used to escape the special characters <, >, |, &, and ^ in environment variable names in Windows instead the \ character that is typically used to escape special characters. Please note that I realize there may be no reason for this, but I'd be interested to hear if ther...

Understanding EXE Internals

I was attempting to install an exe that requires a serial number before the install, which the vendor has not provided to us yet. This got my wheels turning about whether there is any information that can be gained from viewing an exe using a hex editor/VI/etc? Using VI to view an exe, I can see some sections of plain text, but it is...

How to find the real user home directory using python?

I see that if we change the HOME(linux) or USERPROFILE(windows) environmental variable and run a python script, it returns the new value as the user home when I tried, os.environ['HOME'] os.exp Is there any way to find the real user home directory without relying on the environmental variable?. Thanx. edit: Here is a way to find userhom...

Connect to mercurial via ssh on windows

Can anyone point me in the direction of a simple step by step guide as to how to connect to a mercurial repo via ssh on windows. Im really struggling to get my head around it, and so far i jus keep getting a string of errors. Any help would be appreciated. ...

Exclude a directory from a rewriterule using ISAPI rewrite 3

Basically I've recently added the below rule in my httpd.conf for ISAPI rewrite on an IIS server to make sure that it always defaults to lower-case file and directory names. RewriteRule ^(.*[A-Z].*)$ $1 [CL,R=301,L] This is all fine and dandy for every part of the site except for one directory which we can call /MisbehavingDir, the cod...

Detecting your application's install path in Java?

Hi, I have made a small application in Java and I would like to make a windows installer for it using the Nullsoft Scriptable Install System (http://nsis.sourceforge.net/Main_Page). The application I made needs to save user preferences somewhere and it currently saves it in the user's home directory (e.g. c:\Users\danny or /home/users/...

hide the console window when use batch file to launch a java program?

I use a batch to launch my java application like this start /min java -splash:resources\images\splash\splash.gif com.myproj.MyProjApp exit There is still a icon on the taskbar. what I want is hide the console window and only add ONE icon which is my application on the taskbar when I click that batch file? ...

WinSock client ports and router port forwarding

I have a server application that binds to a port and listens on it. I've set up the router to forward the data on this port to the server. Now, on the client side, I don't actually bind() the socket to any port, and I usually end up with a different port everytime. In that case, how can I prepare the router to forward that port to the c...

detect if extended desktop is to the left or to the right

So, I have a screen capture utility (it takes full screen shots and saves it to png files) I've written, and it uses SM_CXVIRTUALSCREEN and SM_CYVIRTUALSCREEN to determine the width and height of the desktop. I then get the desktop DC and copy out the bits and save them as png. BitBlt( backDC, 0, 0, backBufferCX, backB...

[C#] Not enough memory or not enough handles?

I am working on a large scale project where a custom (pretty good and robust) framework has been provided and we have to use that for showing up forms and views. There is abstract class StrategyEditor (derived from some class in framework) which is instantiated whenever a new StrategyForm is opened. StrategyForm (a customized window ...

How can I get the mapi system stub dll to pass extended mapi calls to my dll?

For various reasons (questioning the reasons is not helpful to me), I'd like to implement my own extended mapi dll for windows xp. I have a skeleton dll now, just a few entrypoints exist for testing, but the system mapi stub (c:\windows\system32\mapi32.dll, I've checked that it's identical to mapistub.dll) will not pass through calls t...

My OpenGL game switches Aero DWM Glass off.

Hi ! I wrote a free game a few years ago: http://www.walkover.org. For the lobby and menus, it uses normal dialogs like win32. When the actual game starts it uses OpenGL. Now, on Windows 7, when the actual game starts, it switches windows aero glass off and switches it back on when the game is over. Is there something I can do to pr...

Is there a reliable way to activate / set focus to a window using C#?

I'm trying to find a reliable way to activate / set focus to a window of an external application using C#. Currently I'm attempting to achieve this using the following Windows API calls: SetActiveWindow(handle); SwitchToThisWindow(handle, true); Previously I also had ShowWindow(handle, SW_SHOWMAXIMIZED); executing before the other 2, ...

How to create a high quality icon for my Windows application?

If you are running Windows with a higher DPI setting you will notice that most application icons on the desktop look terrible. Even high profile application icons such as Google Chrome look terrible while for example Firefox, Skype and MS Office icons look sharp: (example) I suspect that most icons look blurry because a lower resolu...