X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FDriverSampleDxe%2FDriverSample.c;h=204c043ff45e9617935f68aadb8ef9f9e1f72079;hp=1484404687e5cc789a29f972d87a6e060a5de817;hb=9bd22b08d1a9b0b4c2fd325a928b58acd176d9d1;hpb=78c2b9a33478ee0cb7e39466fb12191dde56b210 diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c index 1484404687..204c043ff4 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -2,7 +2,7 @@ This is an example of how a driver might export data to the HII protocol to be later utilized by the Setup Protocol -Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -18,10 +18,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define DISPLAY_ONLY_MY_ITEM 0x0002 -EFI_GUID mFormSetGuid = FORMSET_GUID; -EFI_GUID mInventoryGuid = INVENTORY_GUID; -EFI_GUID MyEventGroupGuid = EFI_IFR_REFRESH_ID_OP_GUID; - CHAR16 VariableName[] = L"MyIfrNVData"; CHAR16 MyEfiVar[] = L"MyEfiVar"; EFI_HANDLE DriverHandle[2] = {NULL, NULL}; @@ -38,10 +34,7 @@ HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath0 = { (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) } }, - // - // {C153B68D-EBFC-488e-B110-662867745B87} - // - { 0xc153b68d, 0xebfc, 0x488e, { 0xb1, 0x10, 0x66, 0x28, 0x67, 0x74, 0x5b, 0x87 } } + DRIVER_SAMPLE_FORMSET_GUID }, { END_DEVICE_PATH_TYPE, @@ -63,10 +56,7 @@ HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath1 = { (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) } }, - // - // {06F37F07-0C48-40e9-8436-0A08A0BB76B0} - // - { 0x6f37f07, 0xc48, 0x40e9, { 0x84, 0x36, 0xa, 0x8, 0xa0, 0xbb, 0x76, 0xb0 } } + DRIVER_SAMPLE_INVENTORY_GUID }, { END_DEVICE_PATH_TYPE, @@ -293,7 +283,7 @@ ValidatePassword ( BufferSize = sizeof (DRIVER_SAMPLE_CONFIGURATION); Status = gRT->GetVariable ( VariableName, - &mFormSetGuid, + &gDriverSampleFormSetGuid, NULL, &BufferSize, &PrivateData->Configuration @@ -386,7 +376,7 @@ SetPassword ( BufferSize = sizeof (DRIVER_SAMPLE_CONFIGURATION); Status = gRT->GetVariable ( VariableName, - &mFormSetGuid, + &gDriverSampleFormSetGuid, NULL, &BufferSize, &PrivateData->Configuration @@ -398,7 +388,7 @@ SetPassword ( // // Get user input password // - Password = &PrivateData->Configuration.WhatIsThePassword2[0]; + Password = PrivateData->Configuration.WhatIsThePassword2; PasswordSize = sizeof (PrivateData->Configuration.WhatIsThePassword2); ZeroMem (Password, PasswordSize); @@ -418,7 +408,7 @@ SetPassword ( // Configuration = AllocateZeroPool (sizeof (DRIVER_SAMPLE_CONFIGURATION)); ASSERT (Configuration != NULL); - if (HiiGetBrowserData (&mFormSetGuid, VariableName, sizeof (DRIVER_SAMPLE_CONFIGURATION), (UINT8 *) Configuration)) { + if (HiiGetBrowserData (&gDriverSampleFormSetGuid, VariableName, sizeof (DRIVER_SAMPLE_CONFIGURATION), (UINT8 *) Configuration)) { // // Update password's clear text in the screen // @@ -428,7 +418,7 @@ SetPassword ( // Update uncommitted data of Browser // HiiSetBrowserData ( - &mFormSetGuid, + &gDriverSampleFormSetGuid, VariableName, sizeof (DRIVER_SAMPLE_CONFIGURATION), (UINT8 *) Configuration, @@ -448,7 +438,7 @@ SetPassword ( EncodePassword (Password, StrLen (Password) * 2); Status = gRT->SetVariable( VariableName, - &mFormSetGuid, + &gDriverSampleFormSetGuid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, sizeof (DRIVER_SAMPLE_CONFIGURATION), &PrivateData->Configuration @@ -672,7 +662,6 @@ AppendAltCfgString ( ) { EFI_STRING StringPtr; - EFI_STRING TmpPtr; UINTN Length; UINT8 *TmpBuffer; UINTN Offset; @@ -682,6 +671,7 @@ AppendAltCfgString ( UINTN ValueWidth; EFI_STATUS Status; + TmpBuffer = NULL; StringPtr = *RequestResult; StringPtr = StrStr (StringPtr, L"OFFSET"); BlockSize = sizeof (DRIVER_SAMPLE_CONFIGURATION); @@ -693,11 +683,6 @@ AppendAltCfgString ( } while (*StringPtr != 0 && StrnCmp (StringPtr, L"OFFSET=", StrLen (L"OFFSET=")) == 0) { - // - // Back up the header of one - // - TmpPtr = StringPtr; - StringPtr += StrLen (L"OFFSET="); // // Get Offset @@ -834,7 +819,7 @@ ExtractConfig ( BufferSize = sizeof (DRIVER_SAMPLE_CONFIGURATION); Status = gRT->GetVariable ( VariableName, - &mFormSetGuid, + &gDriverSampleFormSetGuid, NULL, &BufferSize, &PrivateData->Configuration @@ -852,7 +837,7 @@ ExtractConfig ( // Allocate and fill a buffer large enough to hold the template // followed by "&OFFSET=0&WIDTH=WWWWWWWWWWWWWWWW" followed by a Null-terminator // - ConfigRequestHdr = HiiConstructConfigHdr (&mFormSetGuid, VariableName, PrivateData->DriverHandle[0]); + ConfigRequestHdr = HiiConstructConfigHdr (&gDriverSampleFormSetGuid, VariableName, PrivateData->DriverHandle[0]); Size = (StrLen (ConfigRequestHdr) + 32 + 1) * sizeof (CHAR16); ConfigRequest = AllocateZeroPool (Size); ASSERT (ConfigRequest != NULL); @@ -865,14 +850,14 @@ ExtractConfig ( // Check routing data in . // Note: if only one Storage is used, then this checking could be skipped. // - if (!HiiIsConfigHdrMatch (Request, &mFormSetGuid, NULL)) { + if (!HiiIsConfigHdrMatch (Request, &gDriverSampleFormSetGuid, NULL)) { return EFI_NOT_FOUND; } // // Check whether request for EFI Varstore. EFI varstore get data // through hii database, not support in this path. // - if (HiiIsConfigHdrMatch(Request, &mFormSetGuid, MyEfiVar)) { + if (HiiIsConfigHdrMatch(Request, &gDriverSampleFormSetGuid, MyEfiVar)) { return EFI_UNSUPPORTED; } // @@ -996,7 +981,7 @@ ExtractConfig ( Progress ); if (!EFI_ERROR (Status)) { - ConfigRequestHdr = HiiConstructConfigHdr (&mFormSetGuid, VariableName, PrivateData->DriverHandle[0]); + ConfigRequestHdr = HiiConstructConfigHdr (&gDriverSampleFormSetGuid, VariableName, PrivateData->DriverHandle[0]); AppendAltCfgString(Results, ConfigRequestHdr); } } @@ -1074,7 +1059,7 @@ RouteConfig ( // Check routing data in . // Note: if only one Storage is used, then this checking could be skipped. // - if (!HiiIsConfigHdrMatch (Configuration, &mFormSetGuid, NULL)) { + if (!HiiIsConfigHdrMatch (Configuration, &gDriverSampleFormSetGuid, NULL)) { return EFI_NOT_FOUND; } @@ -1082,7 +1067,7 @@ RouteConfig ( // Check whether request for EFI Varstore. EFI varstore get data // through hii database, not support in this path. // - if (HiiIsConfigHdrMatch(Configuration, &mFormSetGuid, MyEfiVar)) { + if (HiiIsConfigHdrMatch(Configuration, &gDriverSampleFormSetGuid, MyEfiVar)) { return EFI_UNSUPPORTED; } @@ -1092,7 +1077,7 @@ RouteConfig ( BufferSize = sizeof (DRIVER_SAMPLE_CONFIGURATION); Status = gRT->GetVariable ( VariableName, - &mFormSetGuid, + &gDriverSampleFormSetGuid, NULL, &BufferSize, &PrivateData->Configuration @@ -1211,7 +1196,7 @@ RouteConfig ( // Status = gRT->SetVariable( VariableName, - &mFormSetGuid, + &gDriverSampleFormSetGuid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, sizeof (DRIVER_SAMPLE_CONFIGURATION), &PrivateData->Configuration @@ -1240,7 +1225,7 @@ RouteConfig ( // Status = gRT->SetVariable( VariableName, - &mFormSetGuid, + &gDriverSampleFormSetGuid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, sizeof (DRIVER_SAMPLE_CONFIGURATION), &PrivateData->Configuration @@ -1340,7 +1325,7 @@ DriverCallback ( HiiUpdateForm ( PrivateData->HiiHandle[0], // HII handle - &mFormSetGuid, // Formset GUID + &gDriverSampleFormSetGuid, // Formset GUID 0x3, // Form ID StartOpCodeHandle, // Label for where to insert opcodes NULL // Insert data @@ -1498,7 +1483,7 @@ DriverCallback ( PrivateData->Configuration.DynamicOneof = 2; Status = gRT->SetVariable( VariableName, - &mFormSetGuid, + &gDriverSampleFormSetGuid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, sizeof (DRIVER_SAMPLE_CONFIGURATION), &PrivateData->Configuration @@ -1509,14 +1494,14 @@ DriverCallback ( // Configuration = AllocateZeroPool (sizeof (DRIVER_SAMPLE_CONFIGURATION)); ASSERT (Configuration != NULL); - if (HiiGetBrowserData (&mFormSetGuid, VariableName, sizeof (DRIVER_SAMPLE_CONFIGURATION), (UINT8 *) Configuration)) { + if (HiiGetBrowserData (&gDriverSampleFormSetGuid, VariableName, sizeof (DRIVER_SAMPLE_CONFIGURATION), (UINT8 *) Configuration)) { Configuration->DynamicOneof = 2; // // Update uncommitted data of Browser // HiiSetBrowserData ( - &mFormSetGuid, + &gDriverSampleFormSetGuid, VariableName, sizeof (DRIVER_SAMPLE_CONFIGURATION), (UINT8 *) Configuration, @@ -1595,7 +1580,7 @@ DriverCallback ( HiiUpdateForm ( PrivateData->HiiHandle[0], // HII handle - &mFormSetGuid, // Formset GUID + &gDriverSampleFormSetGuid, // Formset GUID 0x1234, // Form ID StartOpCodeHandle, // Label for where to insert opcodes EndOpCodeHandle // Replace data @@ -1644,7 +1629,7 @@ DriverCallback ( HiiUpdateForm ( PrivateData->HiiHandle[0], // HII handle - &mFormSetGuid, // Formset GUID + &gDriverSampleFormSetGuid, // Formset GUID FormId, // Form ID StartOpCodeHandle, // Label for where to insert opcodes NULL // Insert data @@ -1657,7 +1642,7 @@ DriverCallback ( // Status = gRT->SetVariable( VariableName, - &mFormSetGuid, + &gDriverSampleFormSetGuid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, sizeof (DRIVER_SAMPLE_CONFIGURATION), &PrivateData->Configuration @@ -1669,10 +1654,10 @@ DriverCallback ( // EfiData = AllocateZeroPool (sizeof (MY_EFI_VARSTORE_DATA)); ASSERT (EfiData != NULL); - if (HiiGetBrowserData (&mFormSetGuid, MyEfiVar, sizeof (MY_EFI_VARSTORE_DATA), (UINT8 *) EfiData)) { + if (HiiGetBrowserData (&gDriverSampleFormSetGuid, MyEfiVar, sizeof (MY_EFI_VARSTORE_DATA), (UINT8 *) EfiData)) { EfiData->Field8 = 111; HiiSetBrowserData ( - &mFormSetGuid, + &gDriverSampleFormSetGuid, MyEfiVar, sizeof (MY_EFI_VARSTORE_DATA), (UINT8 *) EfiData, @@ -1683,50 +1668,6 @@ DriverCallback ( } break; - case 0x1237: - // - // User press "Exit now", request Browser to exit - // - *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT; - break; - - case 0x1238: - // - // User press "Save now", request Browser to save the uncommitted data. - // - *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT; - break; - - case 0x1241: - case 0x1246: - // - // User press "Submit current form and Exit now", request Browser to submit current form and exit - // - *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT; - break; - - case 0x1242: - // - // User press "Discard current form now", request Browser to discard the uncommitted data. - // - *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD; - break; - - case 0x1243: - // - // User press "Submit current form now", request Browser to save the uncommitted data. - // - *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY; - break; - - case 0x1244: - case 0x1245: - // - // User press "Discard current form and Exit now", request Browser to discard the uncommitted data and exit. - // - *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT; - break; - case 0x2000: // // Only used to update the state. @@ -1767,6 +1708,57 @@ DriverCallback ( } break; + case EFI_BROWSER_ACTION_CHANGED: + switch (QuestionId) { + case 0x1237: + // + // User press "Exit now", request Browser to exit + // + *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT; + break; + + case 0x1238: + // + // User press "Save now", request Browser to save the uncommitted data. + // + *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT; + break; + + case 0x1241: + case 0x1246: + // + // User press "Submit current form and Exit now", request Browser to submit current form and exit + // + *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT; + break; + + case 0x1242: + // + // User press "Discard current form now", request Browser to discard the uncommitted data. + // + *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD; + break; + + case 0x1243: + // + // User press "Submit current form now", request Browser to save the uncommitted data. + // + *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY; + break; + + case 0x1244: + case 0x1245: + // + // User press "Discard current form and Exit now", request Browser to discard the uncommitted data and exit. + // + *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT; + break; + + default: + break; + } + break; + default: Status = EFI_UNSUPPORTED; break; @@ -1803,12 +1795,17 @@ DriverSampleInit ( DRIVER_SAMPLE_CONFIGURATION *Configuration; BOOLEAN ActionFlag; EFI_STRING ConfigRequestHdr; + EFI_STRING NameRequestHdr; MY_EFI_VARSTORE_DATA *VarStoreConfig; + EFI_INPUT_KEY HotKey; + EFI_FORM_BROWSER_EXTENSION_PROTOCOL *FormBrowserEx; // // Initialize the local variables. // ConfigRequestHdr = NULL; + NewString = NULL; + // // Initialize screen dimensions for SendForm(). // Remove 3 characters from top and bottom @@ -1886,7 +1883,7 @@ DriverSampleInit ( // Publish our HII data // HiiHandle[0] = HiiAddPackages ( - &mFormSetGuid, + &gDriverSampleFormSetGuid, DriverHandle[0], DriverSampleStrings, VfrBin, @@ -1912,7 +1909,7 @@ DriverSampleInit ( PrivateData->DriverHandle[1] = DriverHandle[1]; HiiHandle[1] = HiiAddPackages ( - &mInventoryGuid, + &gDriverSampleInventoryGuid, DriverHandle[1], DriverSampleStrings, InventoryBin, @@ -1925,6 +1922,18 @@ DriverSampleInit ( PrivateData->HiiHandle[1] = HiiHandle[1]; + // + // Update the device path string. + // + NewString = ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL*)&mHiiVendorDevicePath0, FALSE, FALSE); + if (HiiSetString (HiiHandle[0], STRING_TOKEN (STR_DEVICE_PATH), NewString, NULL) == 0) { + DriverSampleUnload (ImageHandle); + return EFI_OUT_OF_RESOURCES; + } + if (NewString != NULL) { + FreePool (NewString); + } + // // Very simple example of how one would update a string that is already // in the HII database @@ -1954,35 +1963,59 @@ DriverSampleInit ( // // Try to read NV config EFI variable first // - ConfigRequestHdr = HiiConstructConfigHdr (&mFormSetGuid, VariableName, DriverHandle[0]); + ConfigRequestHdr = HiiConstructConfigHdr (&gDriverSampleFormSetGuid, VariableName, DriverHandle[0]); ASSERT (ConfigRequestHdr != NULL); + NameRequestHdr = HiiConstructConfigHdr (&gDriverSampleFormSetGuid, NULL, DriverHandle[0]); + ASSERT (NameRequestHdr != NULL); + BufferSize = sizeof (DRIVER_SAMPLE_CONFIGURATION); - Status = gRT->GetVariable (VariableName, &mFormSetGuid, NULL, &BufferSize, Configuration); + Status = gRT->GetVariable (VariableName, &gDriverSampleFormSetGuid, NULL, &BufferSize, Configuration); if (EFI_ERROR (Status)) { // // Store zero data Buffer Storage to EFI variable // Status = gRT->SetVariable( VariableName, - &mFormSetGuid, + &gDriverSampleFormSetGuid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, sizeof (DRIVER_SAMPLE_CONFIGURATION), Configuration ); - ASSERT (Status == EFI_SUCCESS); + if (EFI_ERROR (Status)) { + DriverSampleUnload (ImageHandle); + return Status; + } // // EFI variable for NV config doesn't exit, we should build this variable // based on default values stored in IFR // + ActionFlag = HiiSetToDefaults (NameRequestHdr, EFI_HII_DEFAULT_CLASS_STANDARD); + if (!ActionFlag) { + DriverSampleUnload (ImageHandle); + return EFI_INVALID_PARAMETER; + } + ActionFlag = HiiSetToDefaults (ConfigRequestHdr, EFI_HII_DEFAULT_CLASS_STANDARD); - ASSERT (ActionFlag); + if (!ActionFlag) { + DriverSampleUnload (ImageHandle); + return EFI_INVALID_PARAMETER; + } } else { // // EFI variable does exist and Validate Current Setting // + ActionFlag = HiiValidateSettings (NameRequestHdr); + if (!ActionFlag) { + DriverSampleUnload (ImageHandle); + return EFI_INVALID_PARAMETER; + } + ActionFlag = HiiValidateSettings (ConfigRequestHdr); - ASSERT (ActionFlag); + if (!ActionFlag) { + DriverSampleUnload (ImageHandle); + return EFI_INVALID_PARAMETER; + } } FreePool (ConfigRequestHdr); @@ -1992,35 +2025,44 @@ DriverSampleInit ( VarStoreConfig = &PrivateData->VarStoreConfig; ZeroMem (VarStoreConfig, sizeof (MY_EFI_VARSTORE_DATA)); - ConfigRequestHdr = HiiConstructConfigHdr (&mFormSetGuid, MyEfiVar, DriverHandle[0]); + ConfigRequestHdr = HiiConstructConfigHdr (&gDriverSampleFormSetGuid, MyEfiVar, DriverHandle[0]); ASSERT (ConfigRequestHdr != NULL); BufferSize = sizeof (MY_EFI_VARSTORE_DATA); - Status = gRT->GetVariable (MyEfiVar, &mFormSetGuid, NULL, &BufferSize, VarStoreConfig); + Status = gRT->GetVariable (MyEfiVar, &gDriverSampleFormSetGuid, NULL, &BufferSize, VarStoreConfig); if (EFI_ERROR (Status)) { // // Store zero data to EFI variable Storage. // Status = gRT->SetVariable( MyEfiVar, - &mFormSetGuid, + &gDriverSampleFormSetGuid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, sizeof (MY_EFI_VARSTORE_DATA), VarStoreConfig ); - ASSERT (Status == EFI_SUCCESS); + if (EFI_ERROR (Status)) { + DriverSampleUnload (ImageHandle); + return Status; + } // // EFI variable for NV config doesn't exit, we should build this variable // based on default values stored in IFR // ActionFlag = HiiSetToDefaults (ConfigRequestHdr, EFI_HII_DEFAULT_CLASS_STANDARD); - ASSERT (ActionFlag); + if (!ActionFlag) { + DriverSampleUnload (ImageHandle); + return EFI_INVALID_PARAMETER; + } } else { // // EFI variable does exist and Validate Current Setting // ActionFlag = HiiValidateSettings (ConfigRequestHdr); - ASSERT (ActionFlag); + if (!ActionFlag) { + DriverSampleUnload (ImageHandle); + return EFI_INVALID_PARAMETER; + } } FreePool (ConfigRequestHdr); @@ -2029,10 +2071,38 @@ DriverSampleInit ( TPL_NOTIFY, DriverSampleInternalEmptyFunction, NULL, - &MyEventGroupGuid, + &gEfiIfrRefreshIdOpGuid, &mEvent ); ASSERT_EFI_ERROR (Status); + + // + // Example of how to use BrowserEx protocol to register HotKey. + // + Status = gBS->LocateProtocol (&gEfiFormBrowserExProtocolGuid, NULL, (VOID **) &FormBrowserEx); + if (!EFI_ERROR (Status)) { + // + // First unregister the default hot key F9 and F10. + // + HotKey.UnicodeChar = CHAR_NULL; + HotKey.ScanCode = SCAN_F9; + FormBrowserEx->RegisterHotKey (&HotKey, 0, 0, NULL); + HotKey.ScanCode = SCAN_F10; + FormBrowserEx->RegisterHotKey (&HotKey, 0, 0, NULL); + + // + // Register the default HotKey F9 and F10 again. + // + HotKey.ScanCode = SCAN_F10; + NewString = HiiGetString (PrivateData->HiiHandle[0], STRING_TOKEN (FUNCTION_TEN_STRING), NULL); + ASSERT (NewString != NULL); + FormBrowserEx->RegisterHotKey (&HotKey, BROWSER_ACTION_SUBMIT, 0, NewString); + HotKey.ScanCode = SCAN_F9; + NewString = HiiGetString (PrivateData->HiiHandle[0], STRING_TOKEN (FUNCTION_NINE_STRING), NULL); + ASSERT (NewString != NULL); + FormBrowserEx->RegisterHotKey (&HotKey, BROWSER_ACTION_DEFAULT, EFI_HII_DEFAULT_CLASS_STANDARD, NewString); + } + // // In default, this driver is built into Flash device image, // the following code doesn't run.