Be very careful if you buy the wine sold as cooking wine from the grocery store. It is rendered "safe" to sell outside of liquor departments, stores, by the addition of one helluva lot of SALT!
I found this out the hardway after making a beef stew using red cooking wine.
Luckily, husband was able to salvage the stew by adding a quartered potato to it. Remove the tater once it's done soaking up the excess salt. From that time on, I've used regular wines/sherries/madeira for cooking. Note that you don't need the good stuff to cook with. Just watch the sherry and for cooking purposes, make sure you get a dry sherry.
I went to using the little single serve bottles after husband crossed over. Before he got sick,he would help out with the used bottles of cooking liquor, either by making another dish or two with them, or, in the case of the sherry, drinking it as a dessert wine.
I like good sherry as well, and madeira is wonderful IN desserts, but I cannot drink it without the migraine. Cooked into something, it doesn't bother me. "Raw" in fruit salad is tasty but not worth it.