Q: What happens if power is lost and regained while the driver is connected?

The driver will automatically reinitialize the mount with the settings in the Initialization Setup group box.

Q: The driver's virtual window does not close when I disconnect from TheSkyX using TeleAPI. How do I properly shut down the APv2 driver when connected via TeleAPI in TheSkyX?

Bob Denny (author of the TeleAPI) wrote this on the ASCOM forum:

=============================
From the ReadMe document that appears after the TeleAPI installation:

 NOTE: Due to a complexity in TheSky X that is not present in TheSky 6, disconnecting from a telescope that has an executable driver will not automatically release and allow the driver executable to exit. If you wait long enough (up to 10 minutes), the executable driver WILL automatically release and exit. It's best to just let it exit on its own; if you want to have it end sooner you'll have to kill it with the Task Manager.

The AP driver is an executable driver, and it is showing the number of references to it;  the above applies. You may find that the reference count will drop after 10 minutes. If you repeatedly connect and disconnect, it will keep adding to the reference count, and you'll have to wait the 10 minutes (or more) after the last one!

 -- Bob
==============================

Astro-Physics AP V2 Driver v5.60.xx