diff -r ebc84c812384 -r 46218c8b8afa Symbian3/PDK/Source/GUID-D1C5BB01-6780-41D6-B47B-43D4C983B0B6.dita --- a/Symbian3/PDK/Source/GUID-D1C5BB01-6780-41D6-B47B-43D4C983B0B6.dita Thu Mar 11 15:24:26 2010 +0000 +++ b/Symbian3/PDK/Source/GUID-D1C5BB01-6780-41D6-B47B-43D4C983B0B6.dita Thu Mar 11 18:02:22 2010 +0000 @@ -1,51 +1,51 @@ - - - - - -API -ExportThis document discusses how to export a device driver API. -

A driver can export its API to be used by other Kernel code by using EXPORT_C in -the declaration and IMPORT_C in the definition. When the -driver is built, these functions are exported to a .def file. -The .def file is specific to the platform to which the -driver is built.

-// Kernel extension internal API -class DExController: public DBase - { - … - void MyExAPI(); - … - }; - -// Client interface API -class TExClientInterface - { - … - // static function being exported, this API will go into def file - // generated while building - IMPORT_C static void MyExAPI(); - … - }; - -// Global instance of the object -DExController *ExController = NULL; - -// Implementation of the kernel extension's exported function -EXPORT_C void TExClientInterface::MyExAPI() - { - … - ExController->MyExAPI(); - … - } -

Kernel extensions can also provide information to user programs by setting -attributes that can be read through the system HAL (Hardware Abstration Layer) -API. See Handler Implementation for -more information on this.

+ + + + + +API +ExportThis document discusses how to export a device driver API. +

A driver can export its API to be used by other Kernel code by using EXPORT_C in +the declaration and IMPORT_C in the definition. When the +driver is built, these functions are exported to a .def file. +The .def file is specific to the platform to which the +driver is built.

+// Kernel extension internal API +class DExController: public DBase + { + … + void MyExAPI(); + … + }; + +// Client interface API +class TExClientInterface + { + … + // static function being exported, this API will go into def file + // generated while building + IMPORT_C static void MyExAPI(); + … + }; + +// Global instance of the object +DExController *ExController = NULL; + +// Implementation of the kernel extension's exported function +EXPORT_C void TExClientInterface::MyExAPI() + { + … + ExController->MyExAPI(); + … + } +

Kernel extensions can also provide information to user programs by setting +attributes that can be read through the system HAL (Hardware Abstration Layer) +API. See Handler Implementation for +more information on this.

\ No newline at end of file