windows

Use of activeX object on non-MFC applications

Hi all, I'd like to use an activeX component in Visual C++. The ocx file has been registered and I can insert the component in a dialog of the resource editor. But how I get a wrapper class to use the activeX object now?? On MFC applications, the editor creates a wrapper class for the ocx, but I'm not using MFC... Thanks! Henry ...

Make a window Static as well as allow adding text using CreateWIndowEx()

I'm using CreateWindowEx() function to create an "EDIT" window, i.e. where a user can type. g_hwndMain = CreateWindowEx(0, WC_TEXT, NULL, WS_VISIBLE | WS_BORDER | ES_AUTOHSCROLL, 0, 0, 400, 200, ...

VC++: How to get the time and date of a file?

How do I get the file size and date stamp of a file on Windows in C++, given its path? ...

Installing a Total instance for Performance Counters

VS 2005, C# 2.0, .NET 2.0/3.0, Win2003 I'm trying to install a set of performance counters for a MultiInstance. I noticed that some system performance counter categories manage to keep a "total" alive even when there are no other instances. ASP.NET Apps 2.0.50727 is an example. So I've been trying to duplicate this. I created the follo...

C Runtime objects, dll boundaries

Hi, What is the best way to design a C API for dlls which deals with the problem of passing "objects" which are C runtime dependent (FILE*, pointer returned by malloc, etc...). For example, if two dlls are linked with a different version of the runtime, my understanding is that you cannot pass a FILE* from one dll to the other safely. ...

Run another installer in an Inno Setup installation

My company is developing an application that has a dependency on another of our applications. That second application already has an Inno Setup installer. So I think I'd like to bundle the second application's installer within the Inno Setup installer for the first application. But I'm not sure how to go about that properly. Does anyone...

How can I redirect Windows COM port output to a file?

Is there a simple way of redirecting serial port output to a file, that I can put into place on a test Windows desktop system without changing any code? I'm trying to debug a problem in a serial receipt printer module and I don't have the real device handy today. I don't want to start making any changes to the code if I can help it, I ...

(C#) How to detect when a windows form is being minimized

How to? I know that I can get the current state by WindowState, but I want to know if there's any event that will fire up when the user tries to minimize the form. ...

Is there any way to create a "project file" in emacs?

I say "project file" in the loosest sense. I have a few python projects that I work on with ropemacs using emacs W32 for Windows. What would be ideal is if I could have an icon I could click on on my desktop to open up emacs, open up the rope project, and set the speed bar in the top-level directory of that project. Then I could also ...

KeyboardProc returning TRUE causes performance drops

I'm developing an interface for an add-on to a game. I can't use the game API (for several reasons including the fact that the code must be game-agnostic) and I need to get keyboard input from the user so I've decided to use a keyboard hook (WH_KEYBOARD) to process user input when certain conditions are met. The problem is that while I c...

DirectInput analogue joystick range

I use DirectInput to handle input devices, I enumerate devices and elements on each device. When using the analogue sticks on my game pad, they report values in the range 0-65535. Is this always the case for all types of absolute axis? If not: is there any way to find out the range of an DX8 input element's DIDEVICEOBJECTDATA::dwData (...

How do I programatically mount a raw iscsi volume in windows, and get it ready to use?

The API for creating a new volume on our SAN is pretty straight forward. What I have not been able to figure out is how to programatically connect the iSCSI initiator to it, initialize the space (in the windows disk manager sense) and finally format it and mount it is a drive letter. I currently use win2k3, however moving to win2k8 is ...

Changing python interpreter windows

Hi guys. I have two python installations, 2.5 and 2.6 I want to change the default python interpreter from 2.5 to 2.6. Anyone know how? ...

Is there any COM library for Java that works well?

I'm rewriting a script that uses COM to automate a windows application, and I'd like to rewrite it in Java. The thing is, the COM libraries seem a little outdated, and I don't want to waste time with code that doesn't work. Is there anything you tried and worked? ...

How to know when the window zorder changes

Looking for a way to be notified when any windows ZOrder changes? Zorder refers to the layering of the windows. a zorder of 0 is at the bottom. I don't know any other way to ask this question. This would be for Windows XP or newer, using .NET, c# OR vb.net. ...

Is it possible to make a read only directory in windows XP?

According to http://support.microsoft.com/kb/326549 the read only attribute is typically used for reasons other than marking a folder as actually read-only. Therefore it seems to me that it is not possible to make a directory read only in the same sense as linux using chmod a-w. ...

Executing win32 file ( using UpdateResource winapi ) in unix

I guess it is impossible, but I will ask it anyway. I have a Windows application that executes BeginUpdateResource / UpdateResource / EndUpdateResource Can I somehow execute this on Linux/Unix? Its server-side, so no GUI emulator could be running. ...

Is there anyway to display a custom form in Java that acts similar to TrayIcon.displayMessage()?

Using Java is there anyway to display a custom form/image that behaves similar to TrayIcon.displayMessage() function in that it displays just above the system tray for a while then disappears? I am also looking for a way to display multiple notifications at the same time by having them display above each other. If not, how do I find th...

Installing a Windows Service with dependencies

Hi all, My installer program doesn't suppport installing services but I can run a program/command line etc so my question is how can I install a Windows Service and add 2 dependencies using the command line? The program is a .Net 2.0 app. Thanks ...

Expected Loop error on VBScript for adding users into AD via csv

I need to add a bunch of users to an AD domain and obviously don't want to manually enter. I also don't want to use CSVDE because I want to add passwords in. I don't have much of a background with writing VBScripts so i found one on the internet from techrepublic. The problem is when I run the script I get an expected loop error and t...