windows

How to receive ip multicast, using only one NIC

Hi, i have a problem here! I have server with multiple NICs, running windows server 2003. My application receive multicast packets, but now i need to receive multicast packets just from one single network interface. I think this can help, but i have some questions. ip_mreq mreq; mreq.imr_multiaddr.s_addr = multicast group address mr...

Initialize Critical Section only once for a process

In a multi threaded application, is there a way to ensure that a Critical Section is initialized only once except for putting the code in DLL main() ?? ...

ctypes bindings for Subversion in windows

Is there a binary installer or a faq for the new ctypes bindings for Subversion 1.6 in Windows (32 and 64bit)? What library would you use to make an easy to deploy (both win32 and x64) svn client in python for svn version >= 1.5? ...

ServerXMLHTTP Error: Cannot find window class.

I am getting an error using the MsXml.ServerXmlHttp object from JScript under classic ASP when the call is asynchronous. The error message is "cannot find window class" The environment is: Windows Server 2003 SP2; IIS v6; Classic ASP; JScript When ServerXmlHttp.open is called with asynch = true the error occurs on the send method. Wh...

Windows Explorer like folder tree browser

I am trying to implement a platform independent file/directory tree browser. Basically, I am trying to replicate windows explorer's tree control to browse the computer. However, I can't figure out how to find the "Desktop" or "My Computer" folder string (It changes in every pc and os type, version and language). If I can find a way to ge...

How To: Prevent Timeout When Inspecting Unavailable Network Share - C#

We have some basic C# logic that iterates over a directory and returns the folders and files within. When run against a network share (\\server\share\folder) that is inaccessible or invalid, the code seems to 'hang' for about 30 seconds before returning back from the call. I'd like to end up with a method that will attempt to get folder...

How do I sleep in my MSVC++ console application?

The title says it all. I want to call Sleep(x), where x is milliseconds to sleep. I know this is the function, but it doesn't work for me. What do I need to include? ---SOLVED--- I was using the compiler option /Za, which disabled the native Windows extensions used in Sleep()'s implementation. ...

Local user group modifications via C#

Alright, so question. I'm working on an application that was previously hosted on a Windows 2000 machine, and now I have to move it to Windows XP. The application needs the ability to switch its user account from Administrators, to a restricted account, and vice-versa (with reboots in between). Using a netapi32.dll wrapper this work...

How to receive MPEG-TS multicast from Windows

We currently have a system with live video encoded to an MPEG-TS multicast stream, being received by televisions with STBs. In addition to televisions we'd like to embed the video in our Windows application. I know that VLC will receive the stream, but would prefer both a solution that I can embed in an existing application without play...

Where to write log for Windows app

I've got a .NET Windows application that's deployed via ClickOnce to a Web server. There are approximately 100 users at any given time, all centrally located. I'm using log4net to log within the application, but I'm having trouble arriving at the best place to put the log. I've tried having them write to a shared network location, but s...

Why does this variadic function fail on 4th parameter on Windows x64?

Below is code which includes a variadic function and calls to the variadic function. I would expect that it would output each sequence of numbers appropriately. It does when compiled as a 32-bit executable, but not when compiled as a 64-bit executable. #include <stdarg.h> #include <stdio.h> #ifdef _WIN32 #define SIZE_T_FMT "%Iu" #else ...

LiveUpdate for a .NET service

I am building a .NET based windows service. Part of its functionality is supposed to be checking if a newer version of itself is available on a site. It is then supposed to download the new "package" and somehow upgrade itself. Anyone know of any libraries that can help with that? I am assuming I will run into issues of overwriting the e...

What happens when GetTickCount() wraps?

If a thread is doing something like this: const DWORD interval = 20000; DWORD ticks = GetTickCount(); while(true) { DoTasksThatTakeVariableTime(); if( GetTickCount() - ticks > interval ) { DoIntervalTasks(); ticks = GetTickCount(); } } Eventually, ticks is going to wrap when the value doesn't fit in a ...

Carriage return required when printing to the console in Windows?

It seems like just putting a linefeed is good enough, but I know it is supposed to be carriage return + line feed. Does anything horrible happen if you don't put the carriage return and only use line feeds? This is in ANSI C and not going to be redirected to a file or anything else. Just a normal console app. ...

Example of how to use msilib to create a .msi file from a python module

Can anyone give me an example of how to use python's msilib standard library module to create a msi file from a custom python module? For example, let's say I have a custom module called cool.py with the following code class Cool(object): def print_cool(self): print "cool" and I want to create an msi file using msilib tha...

Windows Mobile Development: Choice of .Net compact vs. Native (c++) code

Hey there, I work on an experienced and diverse development team and we are preparing to approach our first mobile development which will be for Windows Mobile 6 (platform changes are not an option). We have skills and experience in both Visual C++ and .Net technologies for Windows desktop and server development. The mobile developm...

What's the difference between kernel object and event object in Windows?

As far as I know , both of them are pointed by a HANDLE which can be manipulated by user. What is the difference? ...

Unable to access Winforms control in a class

I am currently working in a small windows forms project in C# using Visual studio 2008. I have added a custom class to the project, but in this class I am unable to access the forms controls (like listbox, textbox, buttons ) in order to programmatically change their properties. The class file has using system.windows.forms included and ...

Java Applet Closes IE for Users not Admins - where is JAVAPOLICY.EXE file ?

I have issue with Win2003 that Java Applet Closes IE for Users not Admins. I found out the following solution but it refers to missing JAVAPOLICY.EXE file: http://www.experts-exchange.com/Programming/Languages/Java/J2SE/Q_22694925.html where is this javapolicy.exe file, its not included with newest JRE6 ? ...

Python script - SCP on windows

Hi, How is it possible to do secure copy using python (windows native install - ActivePython). Unfortunately pexpect module is for unix only and we don't want cygwin locally. I wrote a script that based on pscp.exe win tool - but always stops at first execution becuse of fingerprint host id. and haven't found option to switch this off. ...