changed get-message return type BOOL to int (MSDN even said it returns -1)