The simplest way for an application to use the LayGO Hardware Interface is to statically link to the appropriate LayGO library. The LayGO API functions exported are identical. Only the implementation is different. The correspondence of standard and Hardware Interface libraries is shown below:
|Operating System||Standard API||Hardware Interface|
Note that a special version of the LayGO Device Library is required (one linked against the Hardware Interface version of the API), but the LayGO message library is the same for both standard and hardware interface versions.
As an alternative to static linking, the LayGO Toolkit supports type-safe dynamic loading of the LayGO libraries via the LayGO Dynamic Loading API. Both the standard and Hardware Interface versions of the LayGO API can be loaded in this way with the choice made at runtime. This means that an application can be written to use either the standard API or the Hardware Interface API. LayGO for Java uses this method to support both the standard API and the Hardware Interface version in a single JNI implementation. See the LayGO Dynamic Loading API for details.