Thursday, February 22, 2007

Build Apache on Vista

It's reported that APR fails to compile on Vista with the latest SDK. This is due to the new macro MCAST_JOIN_SOURCE_GROUP in Vista. The workaround is quite simple:
1. open the generated apr.h;
2. set _WIN32_WINNT to 0x0600;
3. set APR_HAVE_IPV6 to 1 (or there would be a link error with the function find_if_index).

Btw, just got back to Beijing this morning. Well, there's rather a lot of work to do.

Update1: ASF Bugzilla Bug 40398
Update2: APR 1.2.9 on Vista

Wednesday, February 21, 2007

Chinese New Year

Wow, this is my boy. Why is he always that cute:-)

Lanterns everywhere.

The skyline of Haikou (Google Maps).

Wednesday, February 14, 2007


There is no messenger service in Vista, and I cannot get notifications from the SVN server by "net send". So I use the HTTP Server API in Vista to build a lightweight message delivery service called "Mercury" for receiving notifications (by cURL, for example) and popping up message boxes. It's quite simple, only about 150 lines C++ code. Here are some notes.

1. ATL is of great help for building Windows services.

2. The model of HTTP Server API 2.0 is more flexible, which requires binding handles to URL groups. Notably, HttpAddUrlToUrlGroup returns the error "access is denied" when running as a basic user.

4. I/O cancellation in Vista simplifies the development of asynchronous programs. I've successfully used CancelIoEx to cancel blocking HttpReceiveHttpRequest in another thread; However, CancelSynchronousIo does not work. I'm still trying to figure out why.

4. Services in Vista are running in a separate session so that MessageBox has no effect for user sessions; use WTSSendMessage instead for notifications.

5. The security model in Vista is interesting and sometimes a little boring; set the appropriate privilege level when registering services or attaching processes in Visual Studio.

Friday, February 09, 2007

The Vista Era Begins

I'm on Windows Vista Now. It took me the whole afternoon to migrate all my files from XP to Vista. All applications run well, and my current code also works on Vista: at least the TLS implementation does not change and even low-level instrumentation is fine. It's awesome. Maybe I'll try the new system features later, especially some I/O improvements.