I accidentally bought a Mac platform code for Black Ops instead of a Windows code off of amazon. Is there a way to convert the code for use in Windows?
I have an hp envy x360.
In the general case, if a PC game redeem code is restricted to one Operating System only then it is unlikely there is any way to change or transfer it directly.
Your best bet is to contact the place from which you purchased it and request a replacement code for the PC platform you intended to buy, or a full refund.
Do note that this should be a rare occurrence - if a game is stated to run on multiple OSs and it's managed by any of the major PC game platforms (Steam, Origin, Battle.NET etc), it's likely that the code will not be locked to a particular OS; so long as you log in with your account you will have access to download, install and play the game on any type of PC that it supports.