I figured out the problem with your code: It's not 64-bit safe. In particular, in your little test program, make the variable 'strlen' of type size_t instead of int, and it'll work. --Kai