GetGPE (Compact 2013)
3/26/2014
This function executes in the GPE library while processing the DrvEnablePDEV and DrvGetModes DDI functions. The developer must provide this function.
Syntax
GPE* GetGPE(void);
Parameters
None.
Return Value
GPE class pointer.
Remarks
The display driver should create an instance of its GPE-derived class using new and return the resulting class pointer. The display driver should also save the class pointer in a global variable and check the value of that global variable before creating an instance of the GPE-derived class. For example, you can call this function multiple times, but it should only create one instance of its GPE-derived class.
The following is sample code from the flat driver.
// Main entry point for a GPE-compliant driver
//
static GPE gGPE = (GPE)NULL;
GPE* GetGPE(void)
{
if (!gGPE)
{
gGPE = new GPEFlat();
}
return gGPE;
}
Requirements
Header |
gpe.h |
Library |
Gpe_lib.lib |