First thing I noticed is that this: pBuf[iRcvd] = NULL; is a buffer overrun. What happens if iRcvd is 1024? You write a 0 to one byte past the end of the array, overwriting whatever is on the stack at that point. --Mike-- The Internet is a place where absolutely nothing happens. -- Strong Bad 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm