windows

Is there a Bonjour SDK for Windows?

Hello..I want to know how to implement bonjour on windows, so that i can set up server on windows and access files in windows(server) using bonjour service from my iphone(client). Can anyone tell me whether we have any java api for windows or any bonjour sdk for windows? Thanks in advance.. ...

How to check if a file is already open by another process in C?

I see that standard C has no way of telling if a file is already opened in another process. So the answer should contain several examples for each platform. I need that check for Visual C++ / Windows though. ...

Watchdog built into the same process as the program it controls

I run a Visual C++ console test program inside the daily build. Every now and then the test would call some function that was changed by other developers improperly, descend into an infinite loop and hang thus blocking the build. I need a watchdog solution as simple as possible. Here's what I came up with. In the test program entry poin...

When including header files, is the path case sensitive?

Given this directory tree: src/MyLibrary/MyHeader.h src/file.cpp file.cpp: #include "mylibrary/myheader.h" ... Compiling file.cpp works with VS, fails in gcc. What does the standard say? If the path is case sensitive, why is this wise? What's the best practice, keep all file/folder names lowercase and thus do the same when includi...

Is there a way to make iTunes automatically sync with Apple's device ?

I am finding a way if I can write a Win32 application to sync media files into iTunes library and then use this Win32 application to launch iTunes to sync the new library to the Apple device. Is there any COM or other libraries operate like that? ...

Screen grab of a window

Hi, I've been writing some code to do a screen grab of a window (in Windows). The code works fine, however prior to the screen grab I have to bring the window to the front that I want to capture and force a redraw. I force the redraw with InvalidateRect, I then have to pump some messages from the message loop in order for the WM_PAINT...

How to get full path from SHBrowseForFolder function?

I'm using SHBrowseForFolder and SHGetPathFromIDList functions to get the selected folder path by user. However this method does not return the drive path of the full path. How to additionally get that information too? ...

Microsoft Access Text ODBC Driver on Windows 7

I created a Delphi application which utilizes an ODBC data source to access text files in csv format. The driver is the "Microsoft Access Text Driver". But when I deploy my application on a Windows 7 computer it does not work because this driver is not available (there are only two available in odbcad32: sql native client and sql serve...

windows to mac via bonjour

Hello, We have an issue with Bonjour on Windows. Our requirement is to transfer files from one machine to another with our app which uses Bonjour. While the transfer has been working just fine between Mac to Mac, it doesn't between a Mac and a Windows machine. Please note that there is no issue in the discovery of Windows Machine (which...

In an ANT build.xml file, how can I iterate over the items in the ${env} variable?

This is in a Windows XP environment. I'm trying to install and edit some files that have default settings. I want to update these settings use items from ${env} ...

https in apache2traid

How do I configure apache to use https mode? In other words, what should I do to make a certain page use https instead of http? ...

How can I change a config file variable using ant build?

I'm using Jboss 4/5 and have some .war .properties files with default configuration settings I want to update these settings using information from the windows xp environment variables. ${env} in ant ...

Best & Fast way to find out if an ip address is reachable

I need the fastest way to see if an ip address is reachable. On each ip address theres a server listening on a specific port so let me know if your method is about to find if a server is listening on a port. The reason for this is that suppose I have 10 ip addresses with 10 server listening on port 101 on each ip address. I want my clie...

How do I call a function from a dll from php on windows?

Hi ! I'm using xampp. I search and it looks like for php 4.x, there was an extension called php_w32api.dll which seems to have vanished for php 5.x. Nevertheless, it's still in the documentation on php.net but marked as experimental. Some suggested to use win32std in pecl instead, but that just wraps some function of the win32 api, bu...

Win32: How to custom draw an Edit control?

i need to implement the functionality of EM_SETCUEBANNER, where a text hint appears inside an Edit control: The catch is that i cannot use version 6 of the Common Controls, which is what is required to get the Microsoft supplied implementation of a cue banner. i've looked into simply changing the text of the edit control, and the fon...

Uncertified Windows Driver

OK, I am working on developing a USB device. I have created a custom windows driver for the device based on a pre-made Windows driver from my MCU manufacturer. The driver works fine on Windows XP, and Windows 7 (32-bit), BUT on my Windows 7 64-Bit machine, it will not let me use the driver. The driver will install just fine but when i go...

Basic Questions about Pipes

Hi, I have some basic questions about pipes I am unsure about. a) What is the standard behavior if a process writing to a pipe gets killed (ie. SIGKILL SIGINT) Does it close the pipe? Does it flush the pipe? Or is the behavior undefined? b) What is the standard behavior if a process returns normally? Is it guaranteed to flush the p...

Determine runtime of Windows Server via ASP.Net

Hi folks, is there a built-in property in any of the ASP.net classes that determines what the uptime of the webserver, where the webapplication is running on, is? These are some of the possibilities that popped into my mind: global.asax and the Application_OnStart Event. Get the timestamp and to determine the uptime, I just substract ...

how to achieve net-snmp log file rotation on Windows 2003 with out stop/start-ing the daemon?

I am using net-snmp snmptrapd daemon on Windows 2003 server. How to achieve log rotate functionality with out stopping/starting the daemon? It is not allowing to rename/move the file while the daemon is running. ...

How do I log every time I start an application in Windows?

I'd like to log or record every time I start an application to gain insight into which applications I use most on my Windows system. I was thinking I could create an event in the event log and listen for it in a .Net program. Questions: Is this the best way to solve this problem? If so, which .Net library should I use? I am also ope...