This project is read-only.

NovaCoreSdk helper class

The NovaCoreSdk class provides some helper methods to ease error handling. You can check the outcome of an API call using the Failed and Succeeded methods, or automatically throw an exception if the call failed with ThrowOnFailure. This method will generate the appropriate exception for the error code given to it. The class also provides easy access to the unmanaged SDK's version number.

Session Management

The Managed NovaCore SDK (MNC) handles sessions a little differently than the unmanaged SDK. Normally, you would need to call the appropriate ReleaseSession function for the modules. However, MNC uses SafeHandles that automatically release the session when it is no longer being used. There is a customized SafeHandle class for each NovaCore module.

Example
CoreHandle core = Core.NvtlCommon_CreateSession();

When the GC cleans up the core object, CoreHandle will automatically call out to Core.NvtlCommon_ReleaseSession.

Last edited Dec 16, 2009 at 7:59 PM by davidbrown, version 1

Comments

No comments yet.