locking tabs
tom, the sockets will interchange on the contacts on 9004 and 9007 bulbs... ... BUT..... the internal wiring of the bulbs is different. on the 9004 bulbs, the "A" wire is "common" to both filaments. on switched 12v+ trucks, that is the ground wire. on switched ground trucks, that wire is constant 12v+ (even with the switch off). on 9007 bulbs, the "B" wire is "common"--same explanation as the "common" on the 9004 bulbs. you can see, that if you interchange a bulb in a socket, it won't perform right. to prevent you from doing that, the locking tabs are a different pattern. even if you inter change a 9007 bulb where you have a 9004 bulb, it won't go in the headlight unit, and seat, and therefore, the lock ring won't lock. if you have a chance to look at the two bulbs, look at the way the locking tabs are placed around the circumference of the bulbs.
soooo... ... ... if you are looking for a replacement socket, a 9007 will work for a 9004--just wire it as follows: 9004's "A" is common; "B" is low beam; and "C" is high beam. on 9007's "A" is low beam; "B" is "common"; and "C" is high beam. IF you are working on a switched ground truck, the "common" will be constant 12v+. IF you are working on a swiched 12v+ truck, "common" will be ground. i always suggest grounding back to batt (-). also, ALWAYS use the same gage wire or BIGGER to ground. this is especially true where you will be lighting two filaments in a bulb. remember, the ground has to carry the same current as the supply, to complete the circuit, and make the filament light up.
sorry for the length of the post... ... ...
herb