|
Reference Guide
class Core2
The Core2 class (and its predecessor Core) are the only ARK classes that can be instantiated directly using CoCreateInstance in C++ or the New operator or CreateObject in Visual Basic. When Core2 initializes, it queries the Windows registry to find out what controller components and product component libraries are installed on the system then populates the two catalog objects, Programmers and Libraries. ARK components are then located and instantiated using these catalog objects.
Core2 differs from the original Core class in how the registry query is implemented. The original class used Windows "component categories" to identify ARK components, and the built-in component category API to locate installed components. This API turned out to be rather slow and caused applications to incur a performance penalty when initializing the Core class. To improve performance, the Core2 class looks for the list of installed components directly, under HKEY_LOCAL_MACHINE\Software\Gennum\ARK\Programmers and HKEY_LOCAL_MACHINE\Software\Gennum\ARK\Libraries. This requires that the registry scripts for Core2-compatible components be modified so that they add registry keys in this new location. To do this, a block of entries similar to the one below should be added to the end of the Library.rgs file.
HKLM
{
NoRemove SOFTWARE
{
NoRemove Gennum
{
NoRemove ARK
{
NoRemove Libraries
{
ForceRemove {F957EA06-1B4D-45DD-8F16-D6BBD5519162} = s 'GB3210'
{
val Title = s 'Gennum GB3210 Demo Library'
val ManID = d '1'
val LibraryID = d '1'
}
}
}
}
}
}
The Core class is still available in the ARK 2 Core Component, for backwards compatibility with fitting software in the field, but it is recommended that developers switch to Core2 and recompile their ARK 1 components with updated registry scripts.
|