Take a piece of stiff wire (a coat hanger ) about a foot long. Bend a small hook in one end. Insert the hooked end, with the hook flat,into the space between the hood and the headlights on the drivers side. Once you have the wire inserted a few inches rotate the hook downward. Gently withdraw the wire until you feel the hook engage the hood release cable. Give the wire a sharp tug and your hood catch should release. You can then proceed to put on a battery charger, or jump from another vehicle to apply some power. You will then be able to use the power locks to unlock your car. This is a useful exercise to practice when you don't need it so that you are prepared when you do need to use it.
This refers to left hand drive cars and was copied from an E32 help side.I think it works also on the E34.