windows

Is there a programmatic way I can hook into user logins and logouts (Windows SBS 2003) with the goal of simple logging?

I'm trying to write a central reporting tool that will allow time tracking based on Windows users logging into a domain. Initially I was going to create a small executable that would run on 'all users' start-up on each computer, track the logged in username and update a central database. The main problems with this would be having to m...

Windows: Is it *possible* to create a (virtual) video card driver?

i want to create a virtual monitor. The way this would work is that the virtual monitor would appear in a window on my desktop. As far as Windows knows it is just another monitor. It occurs to me that it would, as a practical matter, have to be done as video card driver (i.e. rather than the video going out a wire to an LCD panel, it wo...

When to use DwmExtendFrameIntoClientArea?

As we know, several modern applications (IE9, Firefox 4, Chrome, Paint.NET, etc.) use DwmExtendFrameIntoClientArea for the Aero glass effect. What type of applications should you really use this for, though? For browsers I can understand minimizing as much extraneous space as possible, but really, what's the point? Why not just create t...

Show Windows Users Dialog

Hello Folks, How do you (programatically) show the windows local users/groups dialog? In Vista it's usually under Control Panel - Administrative Tools - Computer Management - Local Users and Groups. Similar kind of dialog with the same functionalities (add/remove users/groups) is also acceptable, as long as supported by Windows Xp and a...

FTP User Isolation

Hi, I have a website set up as an FTP server too. I want to use the FTP server to allow to access content from a folder outside the root. I guess this could set up easily by adding a virtual directory. Problem is that I dont want the users to see this outside folder by browsing to the site by http. Is this possible? Thanks ...

DLL Get Symbols From Its Parent (Loader)

I am porting a program to MS Windows. This program uses dynamically loaded plugins. The plugins reference symbols in the main program. I cannot even get the DLLs past the linker without all symbols being resolved. Is there a way to solve this? ...

single exe with changable settings

Hi i am trying to make a simple application which will be used to point a web browser control to some of our web applications at my work. I would like to have only one exe file but also have an admin window to change some of the settings and have them persist when the application is closed. is that possible? i have looked at the applicat...

How to use Red Gate Ants Profiler on the Command Line

Hello, I am trying to use Redgate Ants memory profiler with the command line. I have seen the redgate page on the command line but did not find it very informative. Does anyone have a more detailed description on how to do this? Thanks for any help. ...

python+win32: detect window drag

Is there a way to detect when a window that doesn't belong to my application is being dragged in windows using python/pywin32? I want to set it up so that when I drag a window whose title matches a pattern near the desktop edge, it snaps to the edge when the mouse is let go. I could write code to snap all windows with that title to the d...

Returning string to JavaScript from C++ function

I have a class (JSObject) that implements the IDispatch interface. The class is exposed to JavaScript running in my hosted web browser control (IWebBrowser2). See more here about how this works: http://stackoverflow.com/questions/3747414/calling-c-function-from-javascript-script-running-in-a-web-browser-control I can call in to JSObjec...

Using Visual Studio 2010, how do I provide input to a Visual C++ Win32 Console Application?

I am using Visual Studio 2010 Pro for simple C programming, I would like to know how I can provide input to the program without having to manually do so. The enviroment I am used to working is your standard commandline Unix enviroment. Once I compile a C file call "inputsInts" it becomes "a.out" and to test input I would type: The easy ...

Resource recommendations for Windows performance tuning (realtime).

Hi all, Any recommendations out there for Windows application tuning resources (books web sites etc.)? I have a C++ console application that needs to feed a hardware device with a considerable amount of data at a fairly high rate. (buffer is 32K in size and gets consumed at ~800k bytes per second) It will stream data without under run...

Translate drive letter to full path for CD burner.

In the following code, I am trying to get a folder location from the user. However, when I selected E:\ in the folder browser, szAbsolutePath doesn't give me the path for the CD burner temporary folder. This prevents me from saving to this location. However, if I choose something like E:\folder1\, I get the full path and can write out fi...

BJAM , building for vc-80 instead of vc7.1

How can i build a boost library date_time using bjam for vc80. currently I am using ..\bjam.exe release debug threa ding=multi --toolset=msvc-8.0 stage --with-date_time --build-type=complete --deb ug-configuration -d+2 This only generates libraries with the vc7.1 version, what I need is vc80. I also noticed that the v1 verion Boost.Bu...

How to add a new Windows user to the Users group by default

I have a piece of code that creates a Windows user. Everything is fine and the user is indeed created. However, when I try to pinvoke LoadUserProfile, the operation fails, because the user is not in the Users group. Now, I know how to pragmatically add this user to the Users group, but I dont want to hard-code group name "Users", since i...

boilerplate installer for windows "chroot"

I'm looking at distributing an windows app that needs to use the "Chroot" on windows solution described here. I've build some simple installers before but nothing complicated (i.e. one that creates users and deals with windows permissions) so I'm looking for a starting point. Does anyone know of a installer that sets up the stuff needed ...

Get a processes Private Working Set memory

Hi all, Trying to programmatically get the private working set of a process. Currently I am able to get the working set without issue but having trouble getting the private working set. Here's method: private void GetProcessesForServer(string serverName) { var runningProcesses = new Process[0]; try { runningProc...

Prevent numbers from being pasted in textbox in .net windows forms

I have prevented numbers from being typed in text box using key down event. But when using Ctrl+V or pasting content through mouse, the numbers are being entered in the text box. How to prevent this? I have to allow all text to be pasted/typed except numbers. ...

WPF Component in Windows Application

Hi all, i have created one component in WPF. its working fine with WPF but when i tried to use it in windows application i am getting one issue. i have one textbox in that control so in when the control hosted in windows applicaion and i try to type something in that textbox its not working. i tried to put some messageboxes in "KeyPrev...

How do we register Shell extension with a certain file extension

I have tested a small shell extension referring to the article on code project. Though the whole process is quite complicated , I have some how idea what are the follwoing methodsand what do thet do.: Initialize,DragQueryFile,GetCommandString,InvokeCommand,QueryContextMenu But after reading through it I can not understand how Our Co...