windows

vss intializefor backup fails with return code E_UNEXPECTED

#include "vss.h" #include "vswriter.h" #include <VsBackup.h> #include <stdio.h> #define CHECK_PRINT(result) printf("%s\n",result==S_OK?"S_OK":"error") int main(int argc, char* argv[]) { BSTR xml; LPTSTR errorText; IVssBackupComponents *VssHandle; HRESULT result = CreateVssBackupComponents(&VssHandle); CHECK_PRINT(result); resul...

How can I pass managed objects from one Process to another?

I have two assemblies that I'm trying to link together. One is a sort of background process that's built with WinForms and will be designed to run as a Windows Service. I have a second project that will act as a UI for the background process whenever a user launches it. I've never tried attempting something like this with managed code be...

Forcing Windows to re-scan for drivers

As part of our software's installation, we install drivers for a required 3rd party hardware component. Currently it's up to the user to manually scan for their hardware's drivers once our installation is completed. Is there an easy way to get Windows to automatically look for the drivers we installed? If so, how does it work? Do we ...

Eclipse JUnit Plugin Test very slow to re-execute Test Suite on Windows

I'm having an odd, and stressing, problem with running a large JUnit Plugin test suite in Eclipse. When I try to re-run a JUnit plugin suite that has just been executed, Eclipse hangs for quite some time before it eventually wakes up and launches. It can take up to 5 minutes sometimes, and increases with the size of the suite. Visually, ...

Which edition of windows internals should I read?

Hello, I want to get into windows driver development. I heard from the community that before diving into driver development one must be familiar with windows internals that means one must read "Windows Internals by Mark Russinovich. I'm going to buy this book today. Which edtition should I buy? 4th edition covers Windows XP & Windows 2...

How to kill a process from VC++

Am using VC++ compiler i want to know how to kill a process. is there any functions. i tried with TerminateProcess(); but i couldn't do... ...

How to set PATH to another variable value with spaces in Windows batch file

I've got a Windows batch script issue that I'm bashing my head against (no pun intended). The problematic script looks like this: if defined _OLD_VIRTUAL_PATH ( set PATH=%_OLD_VIRTUAL_PATH% ) When I run it and _OLD_VIRTUAL_PATH is set I get: \Microsoft was unexpected at this time. _OLD_VIRTUAL_PATH is a variable that was origin...

Some questions about focus on WPF

Hello, I've a little problem about focus on WPF. I whant to create a window, always on top, and that never get the focus (even if we click on it). Here's my solution : public partial class SkinWindow : Window { public SkinWindow() { InitializeComponent(); Loaded += ( object sender, RoutedEventArgs e ) => SetNoA...

How does GDI+ support floating point values?

Given that GDI+ is a wrapper around GDI, how does it handle floating point values? I don't see any support for floating point co-ordinates in the GDI documentation. ...

Windows API to trigger the time syncronization

Is there a windows API that would achieve the equivalent of cliking the "Update now" button in the "Date and time properties"/"Internet time" tab (opened by double clicking the clock in the taskbar)? Is there a way to monitor when the time syncronization is trigered by windows and when it succeeds or fails? ...

cmd.exe: complex conditions?

in DOS batch files, In an IF statement, is it possible to combine two or more conditions using AND or OR ? I was not able to find any documentation for that Edit - help if and the MS docs say nothing about using more than one condition in an if. I guess a workaround for AND would be to do if COND1 ( if COND2 ( cmd ) ) but th...

"remote file operation failed" on Hudson

I am running a Windows slave for Husdon 1.337 (Linux master). When running a project on the Windows node, it fails with the following message: Building remotely on winTestSlave Checking out a fresh workspace because there's no workspace at C:\hudson\***\ejb remote file operation failed It did work yesterday and I have not upgraded Hud...

how can I modify the drivers for a specific (any) NIC ?

I want to force one way communication only, between two computers in MS windows 2003 server OS for security purposes. ...

Compiler installation which is simple.

Is there any compiler for C++ that works under W7 and is easy to install, except VC++? I never get these scripts and linux emulations to work, and really just want to try another compiler. ...

Luasql and SQLite?

Hello I just got started looking at Lua as an easy way to access the SQLite DLL, but I ran into an error while trying to use the DB-agnostic LuaSQL module: require "luasql.sqlite" module "luasql.sqlite" print("Content-type: Text/html\n") print("Hello!") Note that I'm trying to start from the most basic setup, so only have the follo...

Internet Explorer URL blocking with Python?

I need to be able to block the urls that are stored in a text file on the hard disk using Python. If the url the user tries to visit is in the file, it redirects them to another page instead. How is this done? ...

Increase the TCP receive window for a specific socket

Hi, How to increase the TCP receive window for a specific socket? - I know how to do so for all the sockets by setting the registry key TcpWindowSize, but how do do that for a specific one? According to MSFT's documents, the way is Calling the Windows Sockets function setsockopt, which sets the receive window on a per-socket ...

rsyslog server on windows

Is rsyslog server available on Windows? ...

How to set up Erlang + Emacs with erlang.el?

I have downloaded and installed Erlang and EmacsW32. But how do I use erlang.el in Emacs? Where do I place it or install it? I have read Erlang/OTP R13B04 documentation and Erlang mode for Emacs documentation but I haven't found any information about how to set up it. UPDATE 1: I have found more documentation on The Erlang mode for Ema...

Problem while Building a Setup Project for a windows Service?

Hi guys, I have created windows service project in vs2008. I have created simple serivce project and implemented simple serivce sucessfully. Unlike other application i cannot run service exe file, so I had to first installed service using ServiceInstaller in my service project. Now i am building setup project for my service (MSI). In ...