Going off the llttle bit of info you have provided I'm gonna take a shot at this one. If the game was downloaded from xbox.com open up the games for windows market place. (click the start menu, click all programs, Games folder, then Games for windows marketplace) After you sign in click on downloads, then click on GTA IV. Then view game keys. That is where the code should be.
If the game was downloaded from anywhere else like steam, please contact them to find out where the code is.
If the game is a disk version the code should be in the case either on a loose card or a sticker somewhere in the case.
Finally, If you have the key but it gives you an error like "CD Key has been used too many times" or "Invalid please try again" please call Games for Windows Live support line 1-877-274-4349.
Hope this helps.