windows

Suspend System Shutdown for a period of time in C#/VB.net

Hi all, I have created a windows service in C# .net and now I want it to alert me if its going to shutdown. For this I make use of Dispose/Unload events but now I want if the services are stopping due to system shutdown process it will alert me. So is there any way to get access to system shutdown event and execute the set of commands ...

How to configure IIS to host multiple websites?

Suppose there are a.com,b.com,how to host them both with the same IIS? EDIT It's not hello.domain.com and goodbye.domain.com,but two totally different domain names ...

Can I configure Compass to output the CSS on a different drive?

Let's say that I have a Compass project on D:\Compass (this is where I keep my sources) and I want to output my generated stylesheets on E:\CSS, is that possible in any way? I tried changing the --css-dir but it won't work because it has to be relative to the project dir? Has anyone tried this before? ...

T-SQL - Creating a Local User On Windows OS

Hi, My requirement is that I need to create a local user on my System (On my Windows OS) using T-SQL. And I need to set this user under ‘Administrators’ group. Using this local user I should be able to login to my Windows OS (At System Startup). Is it possible? If so may I know how could we do this? Many Thanks, Regards. Anusha. ...

how to deploy Windows Media Encoder ?

Hi All, I have created a small screen capture application using .NET. How can i deploy Windows Media Encoder 9 (WMEncoder.exe) setup with the installation. ? I tried by registering DLLs using regsvr32, but didn't workout very well. is there anyway that i could do this using installshield or another package ? Thanks -Aruna ...

Delphi printing primer

I need to add printing capabilities to an app and I have been looking around for information about printing. Logical/physical sizes, dpi, font scaling, etc, lots to digest since I never programmed printing into any app before. Are there any sites that would offer a primer on the topics of page sizes, margins and all the other elements r...

Windows Mobile API - Find out which phone i'm running

Hi, i'm developing applications for WM smartphones, such as motorola Q and the such. Is there any way to find in my code which phone i'm running on? Thanks, Dan ...

scheduling my appilcation in Windows 2008

Hi everybody :-) I wrote a console application which produces backup from my database and then compresses it to an rar file. it works fine except when it is scheduled in windows 2008. after windows runs my application,it says that it runs completely. but it doesn't compress my file . it only produces backup for me. by the way the window...

Why would Windows Search query my IFilter for a bunch of weird interfaces?

I've implemented an IFilter as a native VC++ ATL in-proc COM server. Windows Search wouldn't use it - it creates an instance of my IFilter and then executes a bunch of QueryInterface() calls, specifically: IMarshal IStdMarshalInfo something with {4C1E39E1-E3E3-4296-AA86-EC938D896E92} interface id and a couple of others. Since my IFil...

How do I implement marshalling in a VC++ ATL COM server?

While implementing my own IFilter I found that most likely some consumers will require marshalling from it. That is they QueryInterface() the IMarshal interface from my object. Proxy/stubs from MIDL can't be used - MIDL will not compile the filter.idl file - the latter uses custom structures and MIDL doesn't know what to do with them. S...

Is it possible to set an application's windows compatibility mode at run-time?

We are using a 3rd party library that sometimes does not work correctly on Win7. WE know how to configure this at installation time, but we'd also like to consider setting it at run time. Is this possible, or does that context have to be set prior to launch? (I think there is a slim to none chance, but figured I would ask anyway) (C+...

Mercurial over ssh client and server on Windows

I'm trying to configure Mercurial for use with both a windows server (freeSSHd) and client (both command line and TortoiseHG). I'm using the most recent versions of everything... all downloaded in the past few days. Using public key auth, I have been able to get connected to the server and I'm able to use plink to execute "hg version" ...

.NET windows service getting stopped abruptly

HI Guys, I have created a windows service which spawns three threads.The first thread wakes up every 15 sec, the second thread wakes up every min. and the third thread once in a day. My Code looks something like this: var timer1 = new Timer(); timer1.Elapsed += ProcessTimerEvent1; timer1.Interval = 60000; ...

Transferring Win32 API WndProc Key messages from one window to the other

Hello, I'm developing for Windows Mobile in C++, and i'm running into a problem - I added my window class, and in it i handle the keyboard input with my WndProc implementation. The problem is that i'm getting the wrong codes, and identifying keys such as the func key incorrectly. And to make it worse, the values i'm getting (the wParam o...

Why does Excel throw an exception on Quit when started from command line?

I have a simple Excel file that queries a database when it opens and then closes automatically. If I double click the file to open it from within Windows Explorer (I'm running Windows XP and Excel 2002), it works fine. However, if I run it using Excel "C:\DataUpdate.xls" from Start > Run or from Shell within another instance of Exc...

Kernel mode transition

If I understand correctly, a memory adderss in system space is accesible only from kernel mode. Does it mean when components mapped in system space are executed the processor must be swicthed to kernel mode? For ex: the virtual memory manager is a frequently used component and is mapped in system space. Whenever the VMM runs in the cont...

How to know if my program crashed the last time it ran?

If my program doesn't tear down correctly, the system becomes unstable. There is no workaround really. So, should my program crash and not tear down correctly, then I need to tell the user when he tries to run it again that the system was left in an unstable state. Is the right way to do this is to create a lock file when I start and del...

Can Go compiler be installed on Windows?

I've been looking on golang.org for a Windows compiler, but I can't seem to find it. I can only see Linux and OS X compilers. Does anyone know if Go programming can be done on Windows, or is it something that Google hasn't implemented yet? ...

Find out if computer rebooted since the last time my program ran?

How can my program know if windows rebooted since the last time it ran? All versions of windows XP and on. ...

Visual "strings" Tool for Windows

I'm looking for something that does what the unix "strings" program does, but in Windows. And visual, too. Occasionally, I have a binary file and want to see if certain strings are present in it. Right now, I use notepad, and turn on wordwrap, and just ignore all the garbage and visually search for strings. Anyone have anything neat t...