I did this several times and same situation as yours, my h1 expires in Nov, 485 pending.
a) you need Canadian visa, google canadian embassy/consulate in us and find out all required documents, can be done via mail
b) dont go to any other country besides Canada, dont apply US visa when you are in Canada, then you can come back to US without an US visa stamp within 30 days according to automatic visa validation rules.
hope these help.