Refresh / Rescan non-removable USB Drive Key (e.g JumpDrive Secure)

Hi,
I often get into problems of refreshing / rescaning disks for USB
Drive key ( e.g. Jumpdrive Secure Devices ) after creating partitions.
Currently I am using Diskpart to do this. Does anyone know an easier
way to ‘reliably’ rescan disks after creating partitions on fixed
drive ? Where can I find source code for Diskpart utility ?

Thanks in advance.

Ramesh Ahuja
Inventor Of JumpDrive Secure Technology (Patent Pending)
http://winfs.tripod.com