windows

Need to Run Windows Security Dialog Box from Comand Line

You know, what you normally get when typing ctrl-alt-del or ctrl-alt-end. Except in this scenario I can't press those keys, but I want to launch that box. Specifically I want to be able to pull up the change password dialog from the command line. Thanks ...

How to determine minimum system requirements

How do you decide what the minimum system requirements are for a Windows application? (OS, RAM, HD, CPU). I usually go with my gut, but I'd like to be able to back that up with something. ...

How to determine the memory layout of a process in Windows?

How can I determine what memory is accessible by a process, other than calling ReadProcessMemory() on every single byte/page/whatever to see if it wins or fails? (I know it must be possible as several tools show this sort of information, e.g. IDA Pro debugger, WinHex, Sysinternals' Process Monitor, ...) ...

Extending a C++ application with C# plugins

I have a C++ Windows application that can be extended by writing C++ plugins, using an API that is exposed by the application. There is also one plugin that translates the C++ API to Python (e.g. plugins can be written in Python). I want to allow users to write plugins in C# in addition to C++ and Python. Since I'm not very familiar wit...

Optimum installation folder structure for a Windows application

Hi, I have created an installation package using Wix which installs a Windows service on the user's machine. Currently, the files are being installed to [%ProgramFiles%\APLICATIONNAME]. Is this a future proof way of structuring an installation folder? Should I be installing to [%ProgramFiles%\APLICATIONNAME\VERSION_NUMBER] instead? An...

Product Installation and Configuration on a Windows Machine

Hi, I am working on a .NET 3.5 project which consists of a web application and a Windows service. Both need to be deployed on the server machine. I have created an msi package using Wix 3 which installs the application files, creates shortcuts and registers the service. My next task is to implement the following: Post-install step t...

How do I link PDCurses to a C++ application on Windows?

I'm building a C++ application and need to use PDCurses on Windows. I'm compiling with VC++ from MS VS 2005 and I'm getting a link error. error LNK2019: unresolved external symbol __imp__GetKeyState@4 referenced in function __get_key_count There are 11 errors all with the same error code and different symbols. The missing symbols...

Should developers fear updates to their workstation software / development stack?

As I have discovered, many developers avoid any updating (automatic or manual), because they fear it might do changes to their machine they don't understand, and the software they are developing might fail at some point for reasons they don't know. strategy A.) LEAVE THE SYSTEM AS IT IS, FOR AS LONG AS POSSIBLE. I personally like to ha...

Responding to ACPI fixed feature button in Windows?

My laptop's got a mysterious extra button on it that doesn't cause any keyboard messages -- I've verified this with a low-level keyboard hook. It appears that it's an "ACPI Fixed Feature Button". Any ideas how I'd go about responding when it's pressed? I found some discussion of how it works in kernel mode. Does this information percola...

Troubleshooting Intermittent Failures on Web Applications (ASP.NET)

Got reports of a web app going down twice in three weeks. Need to do some root cause analysis. works fine after a reboot. I'm not really an expert in this field. It is hosted on IIS and Windows 2003. There is nothing interesting in the event viewer, and IIS logs just show lots of successful GET operations. There is nothing interesting ...

VB6 lives forever like Cobol

In the last 3-5 years I have been renewing an insurance application and a commmercial integration toolkit based on vb6. According to Microsoft's "It just works policy" the IDE is no longer supported after april 8th 2008 It still works to develop and deploy vb 6 apps. The question is: When will it be impossible to support vb6 applicatio...

QueryPerformanceCounter and thread safety

Hey all, I'm thinking about making repeated calls (spinning) to QueryPerformanceCounter in two threads that will be active at the same time. I'm not sure if this is really an issue as I've not seen anything written about it but is QueryPerformanceCounter thread safe? Thanks ...

"Windows" key as part of a shortcut key

I very often open a console window while doing my development. Usually win+r -> cmd -> enter. However, Windows also lets you add a shortcut key to any shortcut ... but when I try to add Win + C to make the shortcut for my favorite-sized/shaped/buffered console appear, it uses ctrl+alt+c instead (already used in various editors and othe...

COM object to create a "Open File" dialog under Vista?

I would like to use the Windows Common Dialog "Open File", to get a file from the user under JScript. This used to be possible using "ShowOpen()" on MSCOMDLG.commondialog object but, I can't find an equivalent way to do this that works under Vista. ...

Expression Web: Shortcut doesn't point to an exe file, but I want to use it to edit

Problem: I have to support users who need to edit web pages. Some of these web pages exist only as textarea controls. Fortunately, there is a firefox plugin that allows the user to open the textarea in a default text editor. Unfortunately, this plugin requires you to point to the EXE file of the text editor you want to invoke. This is a...

What is the proper way to cast from an 'OLE_HANDLE' to an 'HICON'?

What is the proper way to cast from an 'OLE_HANDLE' to an 'HICON' for an x64 target build? In particular with a normal C-Style cast, I get this warning when compiling with an x64 config: warning C4312: 'type cast' : conversion from 'OLE_HANDLE' to 'HICON' of greater size Here is the offending code: imgList.Add((HICON)ohIcon); The a...

Avoiding "(Not Responding)" label in windows while processing lots of data in one lump

I occasionally need to process a large amount of data from one package off the network, which takes sufficiently long that when the user tries to interact with the application windows adds the "(Not Responding)" string to the window title. I am aware this is because the processing is being done within a call to handle a message (some way...

Passing function Pointers in C++

i want to do this simple piece of code work. #include <iostream> #include <windows.h> void printSome (int i) { std::cout << i << std::endl; } void spawnThread (void (*threadName)(int i)) { CreateThread ( 0, // default security attributes 0, // use default stack s...

SQLite for read-only applications?

Will SQLite work OK for a multi-user read-only application where the database resides on a Windows network drive? ...

Windows - Power off an usb device in software

I would like to power cycle an usb device through software on windows. I am doing development on a small usb power microcontroller. This chip will revert to native behavior on a power cycle and allow a code download. Since my code will crash the device when things go wrong -- making it ignore all USB commands -- I have to physically ...