windows

How to ask Windows to open an external file based on file association?

Using Win32-specific APIs, is there an easy way to start an external application to open a file simply by passing in the path/name of the file? For example, say I have a file called C:\tmp\image.jpg. Is there a single API that I can call to tell Windows to open the application associated with .jpg files? Without having to do a bunch o...

Using Win32 API in Qt OSE project

It is a messy question, hopefully you can figure out what I want :) What is the best way to use Win32 functionality in a Qt Open Source Edition project? Currently I have included the necessary Windows SDK libraries and include directories to qmake project file by hand. It works fine on a small scale, but its inconvenient and cumbersome...

Deallocation doesn't free mem. in Windows/C++ Application

Hi, My Windows/C++ application allocates ~1Gb of data in memory with the new operator and processes this data. The data is deleted after processing. I noticed that if I run the processing again without exiting the application, the second call to "new" operator to allocate ~1gb of data fails. I would expect Windows to deliver back the ...

Tool to show processes writing to the hard drive?

Is there a tool that will show me what applications are writing to the hard drive in real time? I'm thinking something like Task Manager but for I/O. I've got a number of background processes running, and can never tell when Visual Studio is holding everything up, or some other process is hogging the disk (especially when the processor i...

P/Invoke to correct version of Win32 DLL?

I've got some P/Invoke code that invokes DBGHELP.DLL. I'll add the signatures to pinvoke.net later. The version of DBGHELP.DLL that ships with Windows 2003 is too old, and my code requires the version of DBGHELP.DLL that shipped with "Debugging Tools for Windows" version 6.9. How do I do one of the following? Ensure that DllImport re...

Is there a way to debug installer executable created using installshield universal?

Hi, I have created a windows executable with some custom actions and some UI stuffs. I am facing a strange behavior with the installable. I tried probing through the code and kracking the installer as much as i can, but i did not find any idea why the strange behavior is available. So, i wanted to debug the installer at every point o...

How can i start a console application using the 'network service' account

Hello, I have a console application that i would like to run as 'NT AUTHORITY\NetworkService', but i cant remember how to do so - the only reason is that i will be hosting my service in a windows service, but for kerberos authentication testing i want to use the spn that is already at the domain (it does have delegation enabled) In sho...

git can't remember my passphrase

I have just start using git and i can't get it to remember my passphrase I'm using cmd.exe elevated and my git host is github and i have create a ssh key like that guide on github but i still get *\subnus.mvc>git push origin master Enter passphrase for key '/c/Users/Subnus/.ssh/id_rsa': ...

How can I add a context menu to the Windows Explorer for a Java application?

How would one go about adding a submenu item to the windows explorer context menu (like for example 7-Zip does) for a Java application? ...

What's the best way to write a Windows client app other than .NET?

I'm trying to evaluate whether I should make the .NET Framework a requirement for my new Windows app. I believe .NET is the best and most efficient way to write Windows client apps, so it comes down to how painful the next best alternative is. Specifically, I'm trying to avoid the installation of the .NET Client Profile, which downloads ...

Accessing a USB device without using the drive letter in Windows

Is it possible to access a USB drive or Flash card without using the drive letter that Windows assigns it? I thought I read somewhere that the Volume GUID or something can be used but will that allow me to open it up in explorer once I identify it? The reason this is important to me is because there may not be enough drive letters to han...

convert a keycode to the relevant display character

In a C# Windows.Forms project I have a control that does not supply the KeyPressed event (It’s a COM control – ESRI map). It only supplies the KeyUp and KeyDown events, containing the KeyEventArgs structure. How can I convert the information in KeyEventArgs to a displayable Unicode character, taking the current active keyboard layout ...

Find Programming Language Used

Whats the easiest way to find out what programming language an application was written in? I would like to know if its vb or c++ or delphi or .net etc from the program exe file. ...

Reverse SSH tunnel monitor

I've setup a reverse ssh tunnel, using PuTTY, to allow me to VNC into a home computer without having to enable NAT port forwarding. Works great, no problem. I would like to set the tunnel up as a "persistent service" that will connect on boot up and reconnect when dropped. PS. this is on Windows. Exhaustive googling found a few produ...

Is there an open-source alternative to Windows compound files?

I'm trying to save a couple of files to a container file. The files can be modified later which means the container might have to be enlarged. The user should only see this container as a single file in the file system. The application is written in C++ and running on Windows, but the files should be portable to other platforms as well. ...

How do I get a specific drive's icon for any version of Windows?

In a .NET WinForms app, how do I get a specific drive's icon (C:\ for example) for whatever version of Windows the client might be running? ...

.net open source and running platform choices

Hi Guys, We have been asked to look into a fully open source solution for a big project, they want the project be as near to 100% Open Source as possible, mainly because as its a community project there may be very little money available in the future except for the running of a host. Using OS software saves on licence costs as the serv...

How would I go about backing up the Windows Application Log at a regular interval?

I'm working with an application that logs to Windows Application Log regularly (viewable through the Event Viewer administrative tool), and I'm looking for a way to back it up on a daily basis. This is important because we sometimes discover a problem with the application - and to investigate further we need information that was logged a...

Can someone explain the c++ FAILED function?

I've seen a lot of example c++ code that wraps function calls in a FAILED() function/method/macro. Could someone explain to me how this works? And if possible does anyone know a c# equivalent? ...

Detecting how a batch file was executed

Assuming Windows, is there a way I can detect from within a batch file if it was launched from an open command prompt or by double-clicking? I'd like to add a pause to the end of the batch process if and only if it was double clicked, so that the window doesn't just disappear along with any useful output it may have produced. Any cleve...