windows

Safe/Allowed filename cleaner for .NET

Is there any standardized / libraried / tested way in .NET to to take an arbitrary string and mangle it in such a way that it represents a valid file name? Rolling my own char-replace function is easy enough, but I'd like something a little more robust and resued. ...

Problem with import curses.ascii

Hi, I am trying from curses.ascii import * to django project, but I get: No module named _curses, I am using Python 2.5, any suggestion? Anyway I only need isalpha() function to use.... ...

How do you keep the console from closing after the program is done in C?

Possible Duplicate: What is the Best Practice for Combating the Console Closing Issue? How do you keep the console from closing after the program is done in C? When I try to search for it I find lots of stuff about C++ and other languages, but nothing for C. Also, even for C++ there doesn't seem to be a definitive answer. So co...

Native Makefile alternative for windows

What is a good alternative to Makefile on windows? I'm compiling a collection of c++ files (.cpp's and .h's) using cl.exe. I'd rather not use Makefile, as I want to minimise the amount of 3rd party utilities people will need to build my application. Drew J. Sonne. ...

Windows Powershell SDK and System.Management.Automation.PSObject

I have a build error in a c sharp program that I am compiling in Visual Studio 2008 on a Windows Server (2008, I guess) SP 2 64-BIT OS. It says that 'System.Management.Automation.PSObject' is defined in an assembly that is not referenced. I did some searching in MSDN and I found that this seems to be part of the Windows Power Shell SDK. ...

Is there a cross platform version of window vista's slim reader writer locks?

I'm totally blown away from the quality of windows SRW implementation. Its faster then critical sections and its just a few bytes memory overhead. Unfortunately it is only Windows Vista/Windows 7. As this is a pure user land implementation, does anybody know if there is a cross platform implementation for it? Has anybody reverse-engi...

Create Wi Fi network by C++ or C# and Windows API

I want to create Wi-Fi network.The Server must get dynamically parameters to configure it's Wi-Fi adapter as access point and clients must get same parameters to connect to the server via Wi-Fi. How can i Create Wi Fi network by C++ or C# and Windows API,may be Native Wi Fi API on that server with Wi-Fi Adapter? The way that server get...

API to get the graphics or video memory

Hi, I want to get the adpater RAM or graphics RAM which you can see in Display settings or Device manager using API. I am in C++ application. I have tried seraching on net and as per my RnD I have come to conclusion that we can get the graphics memory info from 1. DirectX SDK structure called DXGI_ADAPTER_DESC. But what if I dont want...

Unique file identifier in windows

Is there are way to uniquely identify a file (and possibly directories) for the lifetime of the file regardless of moves, renames and content modifications? (Windows 2000 and later). Making a copy of a file should give the copy it's own unique identifier. My application associates various meta-data with individual files. If files are ...

How can I show Perl console output in a GUI?

I have several simple Perl programs writing to the standard output, but this has some problems : some of my users are scared by a console my users works on Windows, so my program output is displayed on a cmd console, so I cannot control the way it is displayed (colors and terminal size), and worse, the console is not resizeable (at lea...

Casting a void pointer (data) to a function pointer

I know this has been asked before but none of the cases I've seen here are like this one. I am importing some API functions at runtime, the general declaration on those functions would be like: // Masks for UnmapViewOfFile and MapViewOfFile typedef BOOL (WINAPI *MyUnmapViewOfFile)(LPCVOID); typedef LPVOID (WINAPI *MyMapViewOfFile)(HAND...

Which file locks can be ignored ... as a rule of thumb?

We have an app which needs to go through the file system and perform various operations on files (mostly copy). It's OK if we encounter a file lock "This process cannot access the file xxx because it is being used by another process" , because we will just skip it, but the app has to report it to the user. However we want to ...

Delphi SDI application - Not handling cascade/tile horizontal & tile vertically?

My application doesn't seem to receive or handle the same windows messages for the Cascade, Tile Horizontal/Tile Vertical on specific windows versions. Windows XP x32 - Not working Windows XP x64 - Not tested Windows Vista x32 - Not working Windows Vista x64 - Works fine?? Windows 7 x32 - Not tested Windows 7 x64 - Not ...

100 kHz Timer Frequency in Windows XP

There's a popular hobby level CNC machine tool control that operates in Windows XP and it has a timer that operates at a user selectable rate ranging from 25 kHz up to 100 kHz. It just so happens that I also build CNC machine tool controllers but I have been using a Galil Motion Control Inc. DMC1800 series DSP motion controller board wh...

WebDAV: What is the default file size limit for Windows 7?

We have an application at work that mounts a virtual drive using WebDAV. In the past we had to manually set the following values to work around the defaults used by previous versions of the Windows WebDAV client as discussed in KB 900900. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\FileSizeLimitInBytes HKE...

Objective C - how to resize a window programmatically with given window id?

How to resize a window of any application programmatically with objective-c / cocoa? So far I've got the app name and the window number but don't know how to access the window. I could do it with AppleScript but want to learn it with objective c. AppleScript example: tell application "System Events" set frontApp to name of first a...

Library for defragmenting memory

Does anyone know of a dll to defragment memory for a Windows 2003 server? Here's the background: We have a .net ecommerce site that uses a pre-made framework for most of the heavy lifting. The website occasionally gets out of memory exceptions when trying to allocate memory when adding objects to the cache. It mostly happens when the ...

Python unable to acquire Oracle environment handle in Apache

I can run my django application using the developer server, but it does not run under apache. The error is: Unable to acquire Oracle environment handle Adding an ORACLE_HOME environment variable pointing to my 10g client did not fix the issue. NOTE: the ORACLE_HOME did not end with a slash. Also, this is using the XAMPP version of...

Get all texts and items of open applications on Windows (UI Automation)

I need a source code to retrieve all Texts and Items (Menu Items, List Items,...) of all open applications... Any idea? ...

How to accomplish a Windows share failover system?

I have a primary and a backup windows 2008 server, and a bunch of windows XP clients that map a drive to a share on the primary server. If the primary server goes down, I want those client machines to automatically re-map their drive to the backup server, so they can continue to access the files. Should I try to write a vbscript or pyt...