Acquite exclusive lock on the pen. This will prevent any other application from using the pen until the unlock is called.
public PenAPI.PenResponseCode Lock();
PenAPI.PenResponseCode: Success=LS_OK
Smartpen Methods