windows

running a program in Unix vs in Windows

I'm compiling a simple program written in C and I'm using Eclipse as an IDE, both in Windows 7 and on my MacBook Pro. Very simple program my friend wrote and asked me to help him with: int a = 0; char b[2]; printf("Input first class info:\n"); printf("Credit Hours: \n"); scanf("%d", &a); printf("Letter Grade: "); scanf("%s", b); So wh...

How does tomcat set its executable file as a windows service?

Firstly, I am not at all familiar with windows batch file programing. Recently I am curious about how tomcat sets itself as a windows service using a batch file. I downloaded the service.bat file from tomcat 6. However, I still don't understand some part of it. I guess this is the line that the batch actually register the exe file to th...

Trouble with creating WPF window extended on the title area (like Office 2007/2010)

I want to make WPF window extended on the title area (like Office 2007/2010). I implemented DwmWindow (see DwmTest.zip) where I put required stuff. Commonly, it works fine except one disgusting thing: the window appears as white rectangle (see DwmIssue.png) and after a few second this rectangle disappears and the content of the window is...

Windows Identity Foundation - Local STS on Windows Azure.

Hello, I am trying to use Federated authentication on Azure. I found a example of having a local sts outside azure which is used for authentication from a web role hosted in azure. This works perfectly. My issue is, i dont want to have an application outside azure. Instead, I want to host the local sts website also in azure. So in effe...

crash with CoUnintailize() api of COM

My main process(main.exe) initilaized COM library and created a thread which creates a new process(p1.exe) this new process is again initializing COM library and after making all references as zero unintialized COM here.. the unintailezed COM in the main process (i.e main.exe) also.... When i run p1.exe individually it is successful.. b...

Add / Remove the default documents of IIS7 using vb.net 2.0 windows application

Hai, I wrote the coding for add / remove the default documents of IIS7 in vb.net 2.0 windows application using Microsoft.Web.Administration.dll. The coding is working fine. After adding a new document, the messagebox showing that newly added document name. Simillarly if I remove any document, the messagebox not showing that document nam...

Does Apache support PHPIniDir on windows?

PHPIniDir "D:/Dev/PHP/" The above instruction can make my apache die on windows. But I'm just not sure if that's true. BTW,I found xmpp/wampserver copies the php.ini to the directory of httpd.exe,maybe for the lack of support? ...

Manipulating source packages from Hackage how to easy deploy to several windowsboxes?

Recently when I have found good sources packages for ghc 6.12/6.10 on Hackage I've been forced to do some minor or major changes to the cabal files to make those packages to work under windows. Besides to fork and merge my fixes with github, what seems to be the best way/ good enough practice to take these modified builds to a couple of ...

Identify Windows Editions with Python

I am writing a function which prints out detailed Windows Version informations, the output may be a tuple like this: ('32bit', 'XP', 'Professional', 'SP3', 'English') It will be supporting Windows XP and above. And I'm stuck with getting the Windows edition, e.g., "Professional", "Home Basic", etc. platform.win32_ver() or sys.getwi...

RSync copies only folder directory structure not files

I am using RSync to copy tar balls to an external hard drive on a Windows XP machine. My files are tar.gz files (perms 600) in a directory (perms 711). However, when I do a dry-run, only the folders are returned, the files are ignored. I use RSync a lot, so I presume there is no issue with my installation. I have tried changing permi...

Destroy process-less console windows left by Visual Studio debug sessions

A known bug with a Windows XP security update KB978037 can occur with Visual Studio 2005 (and 2008) where sometimes if you restart a debugging session on a console app then the console window doesn't get closed even though the owner process no longer exists. The problem is discussed further here: http://stackoverflow.com/questions/24028...

Help with Cygwin bash file

Hi, I have a bash file, which I’m trying to run in Cygwin on a Windows 7 platform, but I gives me some odd errors when doing so. The bash file works on my Linux system. The bach file looks like this: for ((r=0; r <10; r++)) netcat localhost 4444 < myfile.file & done wait but I’m getting an error for my for-loop. More precise i...

Installing ffmpeg module for php on windows server

I got PHP Fatal error: Class 'ffmpeg_movie not found I found several archives with php_ffmpeg.dll also I have add extension=php_ffmpeg.dll in php.ini, restart the apache but nothing related with ffmpeg shows up when check phpinfo() My server is running on Windows and I need help with installing that library. I just look in error...

Explain DLL Dependencies to a lay person

This follows from a previous posting I made about lack of a clean test machine for software installations. I'm doing a bad job of explaining how DLL dependencies work and how some machines might not have the right libraries at the time of installation. The problem is that it's being viewed as a defect with the build process. I'm tryin...

Focus stealing is evil.

A quick Google search for solutions to Focus Stealing in Windows reveals two main result categories: People suggesting incomplete solutions involving the ForegroundLockTimeout registry entry (or TweakUI, which I believe simply changes the aforementioned registry entry), which isn't very effective. Incessant hordes of Windows users comp...

Where do I place GLib DLLs on a Windows machine?

I am using GLib in a Windows application. Where do I place the GLib DLLs? What is the "accepted" practice here? Do I use a shared location like C:\Windows\System32 or should I keep a local copy within my application folder? ...

Store username and password persistent in windows mobile(6.0) app

Hi I need some help developing my mobile app. I have to store user data permant (name, password), so what is the best way to do that? I dont know a special API for it, so where to store persistent data's on a windows phone? Maybe in the win mobile registry or inside a file? Or should I use a light database? Someone has experience with...

Invalidating non-client areas

I've a window which has custom border/caption, in order to do that I handle WM_NCPAINT message. My caption has two backgrounds a brighter one for the active window, and a darker one for the background window. But under some circumstances, for example when the window loses/gain focus, my caption is not updated so I end with the wrong ba...

Visual C++ - Memory Leak Detection

Any suggestions? This SO post talks about Visual Leak Detector, but I'm looking for other tools. Also, please don't recommend this. ...

Is there a 'Mercurial Notifier' program that will tell me when an external repository has changed?

There are a few different tools for Subversion that run in the background, pinging the central repository every few minutes, and will alert you if any changes are detected (I'm using Windows 7, but this is true for OS X and Linux as well). Is there anything like that for Mercurial, that will watch a specific repository and alert me to a...