N
Neil_Lin
Guest
Hi ,
I tried to use WMI Code Creator to get a output parameter that is uint8[20]
but I could not get it.
How to modify the mof file and asl file.
Thanks a lot
****
my.mof
[
Dynamic,
Provider("Provider_BIOSInterface"),
guid("{5941D1BB-C91C-45be-89C2-E9B30AF1129E}")
]
class BBBuffer
{
[key, read]
string InstanceName;
[read] boolean Active;
[WmiDataId(1), read, write] uint32 Size;
[WmiDataId(2), WmiSizeIs("Size"), read, write] uint8 BBBData[];
//
// Create a Method in Class
//
[
Dynamic,
Provider("Provider_BIOSInterface"),
guid("{7161ef99-cc03-4baf-93c3-cf091421765d}")
]
class Compal_SpecialFunctionDefinition
{
[key, read]
string InstanceName;
[read] boolean Active;
[WmiMethodId(1),
Implemented,
read, write
] uint32 NeilBIOS3([out] uint8 OutData[]);//GetCompalLEDBrightness
// The output will show nothing.
[WmiMethodId(2),
Implemented,
read, write
] void NeilBIOS6([out] BBBuffer OutData);//GetCompalKeystone1
// The output will show"The objOutParams.OutData variable contains an object."
};
**
my.asl
//
// Description of data, and methods supported by this ASL device.
//
Name(_WDG, Buffer() {
// Method GUIDs
//5FB7F0CC-2C63-45e9-BE91-3D44E2C707E4
0xBB, 0xF0, 0xB7, 0x5F, 0x63, 0x2C, 0xE9, 0x45, 0xBE, 0x91,
0x3D, 0x44, 0xE2, 0xC7, 0x07, 0xE4,
65, 67, // Object Id (AC)
1, // Instance Count
0x00, // Flags (WMIACPI_REGFLAG_METHOD)
//
// Method GUIDs
// {7161ef99-cc03-4baf-93c3-cf091421765d}
// Class Name : Compal_SpecialFunctionDefinition
// Instance Count:
// 1: Method Id 1 define to CompalLEDControl that sync with CompalWMI.MOF file.
//
0x9A, 0xEF, 0x61, 0x71, 0x03, 0xCC, 0xAF, 0x4B, 0x93, 0xC3,
0xCF, 0x09, 0x14, 0x21, 0x76, 0x5D,
65, 65, // Object Id (AA)
1, // Instance Count
0x02, // Flags (WMIACPI_REGFLAG_METHOD)
})
Name(OBUF, Buffer(20){}) //Store for output
CreateByteField(OBUF, 0x00, ODA0)
CreateByteField(OBUF, 0x01, ODA1)
CreateByteField(OBUF, 0x02, ODA2)
...
Method(WMAA, 3) {
//
// MethodId
//
Switch (Arg1) {
Case (1) {
Store(0x01,ODA0)
Store(0x01,ODA1)
...
Return(OBUF)
}
Case (2) {
Store(0x02,ODA0)
Store(0x02,ODA1)
...
Return(OBUF)
}
}
More...
I tried to use WMI Code Creator to get a output parameter that is uint8[20]
but I could not get it.
How to modify the mof file and asl file.
Thanks a lot
****
my.mof
[
Dynamic,
Provider("Provider_BIOSInterface"),
guid("{5941D1BB-C91C-45be-89C2-E9B30AF1129E}")
]
class BBBuffer
{
[key, read]
string InstanceName;
[read] boolean Active;
[WmiDataId(1), read, write] uint32 Size;
[WmiDataId(2), WmiSizeIs("Size"), read, write] uint8 BBBData[];
//
// Create a Method in Class
//
[
Dynamic,
Provider("Provider_BIOSInterface"),
guid("{7161ef99-cc03-4baf-93c3-cf091421765d}")
]
class Compal_SpecialFunctionDefinition
{
[key, read]
string InstanceName;
[read] boolean Active;
[WmiMethodId(1),
Implemented,
read, write
] uint32 NeilBIOS3([out] uint8 OutData[]);//GetCompalLEDBrightness
// The output will show nothing.
[WmiMethodId(2),
Implemented,
read, write
] void NeilBIOS6([out] BBBuffer OutData);//GetCompalKeystone1
// The output will show"The objOutParams.OutData variable contains an object."
};
**
my.asl
//
// Description of data, and methods supported by this ASL device.
//
Name(_WDG, Buffer() {
// Method GUIDs
//5FB7F0CC-2C63-45e9-BE91-3D44E2C707E4
0xBB, 0xF0, 0xB7, 0x5F, 0x63, 0x2C, 0xE9, 0x45, 0xBE, 0x91,
0x3D, 0x44, 0xE2, 0xC7, 0x07, 0xE4,
65, 67, // Object Id (AC)
1, // Instance Count
0x00, // Flags (WMIACPI_REGFLAG_METHOD)
//
// Method GUIDs
// {7161ef99-cc03-4baf-93c3-cf091421765d}
// Class Name : Compal_SpecialFunctionDefinition
// Instance Count:
// 1: Method Id 1 define to CompalLEDControl that sync with CompalWMI.MOF file.
//
0x9A, 0xEF, 0x61, 0x71, 0x03, 0xCC, 0xAF, 0x4B, 0x93, 0xC3,
0xCF, 0x09, 0x14, 0x21, 0x76, 0x5D,
65, 65, // Object Id (AA)
1, // Instance Count
0x02, // Flags (WMIACPI_REGFLAG_METHOD)
})
Name(OBUF, Buffer(20){}) //Store for output
CreateByteField(OBUF, 0x00, ODA0)
CreateByteField(OBUF, 0x01, ODA1)
CreateByteField(OBUF, 0x02, ODA2)
...
Method(WMAA, 3) {
//
// MethodId
//
Switch (Arg1) {
Case (1) {
Store(0x01,ODA0)
Store(0x01,ODA1)
...
Return(OBUF)
}
Case (2) {
Store(0x02,ODA0)
Store(0x02,ODA1)
...
Return(OBUF)
}
}
More...