From: Ryan Leavengood Date: 2005-04-26T03:27:48+09:00 Subject: Re: Get the Current Domain Name in Windows Brian Takita wrote: [snip] > reserved = "\0" * 4 Here is the main problem. You need to pass 0 (or nil) for reserved. If you had checked the return code from the first function call you would see it was 87 (which is ERROR_INVALID_PARAMETER.) After changing reserved to 0, I got 0 back for the response (success), but the result in buffer was unreadable (I assume it is Unicode, but AFAIK there is no Ruby Unicode library.) But making the change I suggested above should at least start you moving forward. Ryan