windows

Window Size when SizeToContent is not specified

When the following XAML used, the window size is not 5000x5000, but some small window where the button is cropped. <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" > <Button Width="5000" Heig...

How to remove or change port number once allocated

I have .exe file which only run the application(not a setup) of 1 mb...if i run it on windowes 2003 server it normally ask for port number...i hvae allocated a port ,now it is giving an arreor (;6overflow)...application is buit in vb6. to solve this problem i want o give a try by changing port no...how can i remove/change port no once a...

How to press the Windows button programmatically using C# SendKeys

Hi, Basically I want to simulate in code a user clicking on the windows button. I know there is SendKeys which allows me to send key presses to windows if I get a handle to them, but what I can't figure out is what I need to get a handle on in order to send Windows button commands. E.g. Windows Button + L. Having read into this a bit i...

Working around fls limitations with too many statically linked CRTs?

When loading external DLLs (not under our control) via LoadLibrary, we're hitting a problem where the statically linked CRT in those DLLs are failing to allocate fiber-local storage. This is similar to mskb 193462, except that this is FLS and there's only 128 of them. Are there any useful ways to work around the problem? The CRT is usi...

Windows Limited User Installation

I have a Win32 application that includes an EXE, an ActiveX control (DLL) and a COM server (EXE) and I am using Inno Setup 5 to build my installer. Many of our customers use limited user accounts where the user has no admin rights and because the COM components require to be registered (which writes to HKEY_CLASSES_ROOT), my setup file ...

How do I find full path to an application in a batch script

How do I in a batch script find the full path to application XYZ if it is installed Clarifications: The application is not in the PATH All I have is it's name in this case "ISTool.exe" and I would like to get C:\Program\ISTool\ISTool.exe ...

Can windows detect when a monitor, mouse, keyboard is disconnected?

Can windows detect when a monitor, mouse or keyboard is disconnected from the computer? If so what Win32 API is used for this? ...

How to fix Inno Setup error EndUpdateResource failed (110)

When compiling an Inno Setup installer script I get this error Line: xx Resource update error: EndUpdateResource failed (110) line xx contains SetupIconFile= pathToIconFile What causes the error and how can I fix it? ...

tar (on Windows) a list of files in c#

I then to tar and then gzip a list of files in C#. I need some help with how to set the arguments to tar. Say I have tar.exe in a folder c:\tar\tar.exe and a method like the following: private void RunTar(string outputFileName, List<string> fileNamePaths) { using (Process p = new Process()) { p.Star...

Getting the Current Logged On User from a different User Session

Hi Guys, I'm running a .Net application as a service under a special application user. From this service, i would like to get the User Name running the currently logged in session. I tried getting the user name that owns the Explorer.exe process, but the restricted user does not have access to this as it throws an exception if i try an...

Win32 API function to programatically enable/disable device

I am writing a small C# app to disable a device (my laptop touchpad) whenever another mouse device is detected, and enable the touchpad again if a mouse is not detected. I am not even able to disable the touchpad in device manager (it is running on the default mouse class driver). I am getting into device driver development so I though...

How do I set where my grails plugins should be installed?

Hi I saw the light and install the joda-time plugin for grails. However, when I tried to commit my changes to source control I realised that grails had located the files in: C:\Users\Steve\.grails\1.1.1\plugins instead of somewhere under the project directory of: f:\grails\projects\myproject Yeah I'm using windows :-\ So now whe...

How can I get a Windows batch or Perl script to run when a file is added to a directory?

I am trying to write a script that will parse a local file and upload its contents to a MySQL database. Right now, I am thinking that a batch script that runs a Perl script would work, but am not sure if this is the best method of accomplishing this. In addition, I would like this script to run immediately when the data file is added to...

Help me understand these memory statistics from Process Explorer

I'm trying to do a very rough measurement of the amount of memory my large financial calculation requires in order to run. Its a very simple command line tool which prices up a large number of financial instruments and then prints out a result. I decided to use Process Explorer to view the memory requirements of the program. Can somebo...

Wrapper Class for Win32 Shared Memory? (interprocess-communication)

Hi, what wrapper class can you recommend for IPC on Win32? I have tried XQueue, I found it slightly clunky, and would like to hear what else is out there. Building something on InterlockedPopEntrySList() seems nice but that requires server 2003. Thanks, Adam ...

what is winver?

I was looking at some code and they had this line: #define WINVER 0x0501 in stdafx.h file? Why do you need to define WINVER? How does it affect your code? Can someone please explain? ...

Is there a good (visual) Git tool for Mac OS X or Windows?

I'm looking at porting my projects to Git from SVN (I'm convinced that Git is worth the move) and I'm trying to come up with a set of tools to use for the project. I've googled around for some tools but I wasn't really impressed with what I found. What visual tools are recommended for Git users on Mac OS X? What about Windows? (I hav...

programmatically check for subsystem

I have a .exe created with a windows subsystem. I copy that .exe to another .exe, and I run: editbin.exe /SUBSYSTEM:CONSOLE my.exe So my intention is to have a .exe that runs with a GUI, and another .exe that is meant for command line operations (no GUI). How do I check what subsystem is currently active in my C++ code? ...

IIS 7.5 under Win7 Prof. 64bit Returning Blank Page (No HTML at all)

Hello all -- I am trying to setup my development environment in Windows7 and am having trouble getting IIS to work. I have set everything up like I have been doing since IIS6 so I have the basics down. My problem must be in something that has changed between IIS7 and IIS7.5 or in the OS. None of my websites will return html. Not the...

Windows Peer-to-Peer SDK Statistics

Does anyone happen to have any throughput and speed statistics on the Windows SDK? I am attempting to do a comparative analysis of this to other P2P implementations and can not for the life of me find any form of statistical data on this SDK. ...