DesktopSDK 0.7 - PenComm Library (C#) Documentation
ContentsIndexHome
Examples
Topics

This section contains C# examples for performing common operations on the pen.

In most of the examples in this documentation, the method calls (such as Smartpen.DataGet, Smartpen.PropertyGet, Smartpen.ListSessions...) are put in try/catch block. The reason is that the methods can raise SDK Exceptions if error happens. See SmartpenExceptions for more detail about the SDK Exceptions.

Name 
Description 
To communicate with smartpen, application needs to initialize the PenComm Client Library by doing the following:

  1. Create Smartpens object passing the location for log file. It will initialize the PenComm library and allocation resources to communicate with pens.
  2. Register callback (attach/detach) by using the SmartpenAttachNormalEvent and SmartpenDetachNormalEvent events of the Smartpens object. With the attach events, application can retrieve pen information via the Smartpen object.

 

 
 
To register the desktop application with the PenComm Service, do the following:

  1. Provide register information in a RegAppInfo struct that has the members: Auto Start, Description, Version and Application Path.
  2. Call Smartpens.DesktopApplications.RegisterApp(). The call will return the application handle. You must provide the application handle when calling Smartpens.DesktopApplications.RegisterPackage() and Smartpens.DesktopApplications.RegisterDataCallback().


To receive data from a particular package, do the following:

  1. Register a package as a 'package of interest' for your desktop application by calling Smartpens.DesktopApplications.RegisterPackage(). For the regPackageInfo parameter, create a RegPackageInfo structure and store:
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright © 2010 Livescribe, Inc. All rights reserved.