How do I remove/replace a 1998 gmc sonoma passenger mirror?

My mirror broke off, I have the replacement, but I cant get the old connecting screws out of my door/window assy. I also don't understand how the replacement mirror installs.
 
Top