I've added some custom OIDs to an NDIS driver we are developing. I also
wrote a user app in C# that correctly querys and sets these ULONG values as
long as it is run on Windows XP.

When running on Windows 2000 I can query at will, but all attempts to set a
value fail with a result of WBEM_E_INVALID_PARAMETER.

I have a breakpoint set at the beginning of my driver's xxxSetInformation
function that never gets hit.

I get the same result, (query OK, set object fails, breakpoint never hit),
when I access the OID via
<windows>\system32\wbem\wbemtest.exe,
so the problem isn't in my user level code.

I'm running as an administrator in both cases so I don't think there are any
security releated issues.

Q1) Do I need to configure Windows 2000 in some way to allow write access to
custom OIDs?

Q2) Does my NDIS miniport driver need to do anything special for Windows
2000 to allow write access?

RE: WMI .Put() works on XP, but fails on Windows 2000 by jumarpaule

jumarpaule
Wed Aug 06 16:02:38 CDT 2003

------=_NextPart_0001_6A8D684B
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

What service pack are you seeing this with? If it is what i think, then it
will be fixed in Service Pack 3.

The problem fixed:

WMI PutInstance and ExecMethod sometimes returns

WBEM_E_INVALID_PARAMETER when nothing is wrong.



Q286803



The file involved is wmiprov.dll.

The link to this article:

http://support.microsoft.com/default.aspx?scid=kb;en-us;286803.

The article Q286803:


WMI: WDM Provider Rejects Dynamic Arrays Of Zero Length WGID:206
ID: 286803.KB.EN-US CREATED: 2001-01-25 MODIFIED: 2003-05-20


Public |

\* Security : Public

============================================================================
===
----------------------------------------------------------------------------
---
The information in this article applies to:

- Microsoft Windows Management Instrumentation 1.5 (Version: 1.5)
- the operating system: Microsoft Windows 2000

----------------------------------------------------------------------------
---

SYMPTOMS
========


The Windows Driver Model (WDM) Provider in Windows Management
Instrumentation (WMI) rejects dynamic arrays of zero size. Any attempt to
store an instance of an object that includes a dynamic array of zero size
will result in an "Invalid Parameter" error.


As an example, the following MOF declares a variable length array.


class Test_DiagnosticsStatus
{
datetime timeoflastrun;
uint16 numberofresults;
[read,WmiSizeIs("NumberOfResults")]
Test_DiagnosticsResult DiagResults[]; // Varying array
};




The problem arises when the dynamic array (DiagResults[]) is of zero length.




DiagnosticsStatus = instance of Test_DiagnosticsStatus
{
NumberOfResults = 0;

TimeOfLastRun = "16010101000000.000000+000";
};




Any attempt to store the above instance (DiagnosticsStatus) would result in
an "Invalid Parameter" error (0x80041008).


RESOLUTION
==========

To resolve this problem, obtain the latest service pack for Windows 2000.
For additional information, click the following article number to view the
article in the
Microsoft Knowledge Base:


KBLink:260910.KB.EN-US: How to Obtain the Latest Windows 2000 Service
Pack


The English-language version of this fix should have the following file
attributes or later:




Date Time Version Size File name Platform
--------------------------------------------------------------
2/13/2001 19:36 1.50.1085.49 110,660 Wmiprov.dll Intel



How to Use the Hotfix Installer
-------------------------------

NOTE: You can use this method only for Intel-based computers with Windows
2000 installed.



1. Copy the Q286803.exe hotfix file to a local folder on your computer
or to a share on your network.

2. Run the Q286803.exe file and follow the directions.

3. Restart your computer.


STATUS
======

Microsoft has confirmed that this is a problem in the Microsoft products
that are listed at the beginning of this article.
This problem was first corrected in Windows 2000 Service Pack 3.

MORE INFORMATION
================

For additional information about how to obtain a hotfix for Windows 2000
Datacenter Server, click the article number below
to view the article in the Microsoft Knowledge Base:



KBLink:265173.KB.EN-US: The Datacenter Program and Windows 2000
Datacenter Server Product
For additional information about how to install multiple hotfixes with only
one reboot, click the article number below
to view the article in the Microsoft Knowledge Base:



KBLink:296861.KB.EN-US: Use QChain.exe to Install Multiple Hotfixes
with One Reboot
For additional information about how to install Windows 2000 and Windows
2000 hotfixes at the same time, click the article number below
to view the article in the Microsoft Knowledge Base:



KBLink:249149.KB.EN-US: Installing Microsoft Windows 2000 and Windows
2000 Hotfixes

------=_NextPart_0001_6A8D684B
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20 What service pack are you seeing this with? If it is what i think, then it will be fixed in Service Pack 3.
\par
\par The problem fixed: WMI PutInstance and ExecMethod sometimes returns WBEM_E_INVALID_PARAMETER when nothing is wrong. Q286803 The file involved is wmiprov.dll.
\par
\par The link to this article:
\par
\par http://support.microsoft.com/default.aspx?scid=kb;en-us;286803.
\par
\par The article Q286803:
\par
\par
\par WMI: WDM Provider Rejects Dynamic Arrays Of Zero Length WGID:206
\par ID: 286803.KB.EN-US\tab CREATED: 2001-01-25\tab MODIFIED: 2003-05-20
\par
\par
\par Public |
\par
\par \\* Security\tab : Public
\par
\par ===============================================================================
\par -------------------------------------------------------------------------------
\par The information in this article applies to:
\par
\par - Microsoft Windows Management Instrumentation 1.5 (Version: 1.5)
\par \tab - the operating system: Microsoft Windows 2000
\par
\par -------------------------------------------------------------------------------
\par
\par SYMPTOMS
\par ========
\par
\par
\par The Windows Driver Model (WDM) Provider in Windows Management Instrumentation (WMI) rejects dynamic arrays of zero size. Any attempt to store an instance of an object that includes a dynamic array of zero size will result in an "Invalid Parameter" error.
\par
\par
\par As an example, the following MOF declares a variable length array.
\par
\par \tab
\par \tab class Test_DiagnosticsStatus
\par \tab\{
\par \tab datetime timeoflastrun;
\par \tab uint16 numberofresults;
\par \tab [read,WmiSizeIs("NumberOfResults")]
\par \tab Test_DiagnosticsResult DiagResults[]; // Varying array
\par \tab\};
\par \tab\tab\tab\tab\tab
\par
\par
\par
\par The problem arises when the dynamic array (DiagResults[]) is of zero length.
\par
\par
\par
\par \tab
\par \tab DiagnosticsStatus = instance of Test_DiagnosticsStatus
\par \tab\{
\par \tab NumberOfResults = 0;
\par \tab
\par \tab TimeOfLastRun = "16010101000000.000000+000";
\par \tab\};
\par \tab\tab\tab\tab\tab
\par
\par
\par
\par Any attempt to store the above instance (DiagnosticsStatus) would result in an "Invalid Parameter" error (0x80041008).
\par
\par
\par RESOLUTION
\par ==========
\par
\par To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the
\par Microsoft Knowledge Base:
\par
\par
\par \tab KBLink:260910.KB.EN-US: How to Obtain the Latest Windows 2000 Service
\par \tab Pack
\par
\par
\par The English-language version of this fix should have the following file attributes or later:
\par
\par
\par
\par
\par \tab Date Time Version Size File name Platform
\par \tab --------------------------------------------------------------
\par \tab 2/13/2001 19:36 1.50.1085.49 110,660 Wmiprov.dll Intel
\par \tab\tab\tab\tab\tab
\par
\par
\par How to Use the Hotfix Installer
\par -------------------------------
\par
\par NOTE: You can use this method only for Intel-based computers with Windows 2000 installed.
\par
\par
\par
\par 1. Copy the Q286803.exe hotfix file to a local folder on your computer
\par or to a share on your network.
\par
\par 2. Run the Q286803.exe file and follow the directions.
\par
\par 3. Restart your computer.
\par
\par
\par STATUS
\par ======
\par
\par Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
\par This problem was first corrected in Windows 2000 Service Pack 3.
\par
\par MORE INFORMATION
\par ================
\par
\par For additional information about how to obtain a hotfix for Windows 2000 Datacenter Server, click the article number below
\par to view the article in the Microsoft Knowledge Base:
\par
\par
\par
\par \tab KBLink:265173.KB.EN-US: The Datacenter Program and Windows 2000
\par \tab Datacenter Server Product
\par For additional information about how to install multiple hotfixes with only one reboot, click the article number below
\par to view the article in the Microsoft Knowledge Base:
\par
\par
\par
\par \tab KBLink:296861.KB.EN-US: Use QChain.exe to Install Multiple Hotfixes
\par \tab with One Reboot
\par For additional information about how to install Windows 2000 and Windows 2000 hotfixes at the same time, click the article number below
\par to view the article in the Microsoft Knowledge Base:
\par
\par
\par
\par \tab KBLink:249149.KB.EN-US: Installing Microsoft Windows 2000 and Windows
\par \tab 2000 Hotfixes
\par
\par
\par }
------=_NextPart_0001_6A8D684B--


Re: WMI .Put() works on XP, but fails on Windows 2000 by AndyC

AndyC
Thu Aug 07 15:21:08 CDT 2003

I've reproduced this on a laptop machine running Windows 2000 Professional
Checked/Debug with Service pack 3 Checked/Debug.

I've also reproduced it on a desktop machine running Windows 2000
Professional Checked/Debug with Service pack 4 Checked/Debug.

Both machines are routinely restored to an initial state using Symantec
Ghost. There is not much installed on either one except for a basic set of
tools for building and testing the software. Exact descriptions each system
and what has been added are as follows:



============================================================================
==

System #1 -- Laptop

Disk is 10GB, partitioned in one partition, NTFS

Dell Inspiron 3800 Laptop

Fresh install of Windows 2000 Professional, Checked/Debug build,

plus Checked/Debug Service Pack 3

plus no adjustment for daylight savings time

plus driver signing is silently ignored during installation

plus set paging file to a constant 512MB

plus configure for full memory dump to c:\zzz

plus Acrobat reader 5.0

plus Araxis Merge

plus Winzip 8.0

plus install debug tools for Windows, (WinDBG) 6.1.17.2

plus add debug symbols --> c:\zzz\w2ksp3sym_x86_chk for Windows 2000 +
Service Pack 3 (Checked/Debug)

plus audio driver for Dell Inspiron (ESS Maestro 3i Wdm Audio Driver)

plus configuring and testing the COM1 serial port at 115200 baud

plus addition of a second boot option for kernel debugging

plus Visual Studio 6.0

plus Visual Studio 6.0, Service Pack 5

plus Windows XP Service Pack 1 DDK

plus SoftICE Driver Suite 2.7

plus disable Windows recognition of Xircom Ethernet card

** Move \WIN2KCHK\driver cache\i386\drivers.cab --> c:\save\driver
cache\i386\drivers.cab

** Move \WIN2KCHK\INF\(All *.inf and *.pnf containing "115d" Vendor ID for
Xircom --> C:\save\inf

** Disable PCI serial port corresponding to modem portion of card

plus create desktop shortcut to launch MSVC++ with DDK environment

plus modify SoftICE settings so display is nearly full screen text at
1024x768

plus added command prompt completion == <TAB>

plus added Windows 2000 recovery console to boot options

plus reinstall Windows XP Service Pack 1 DDK, (with special care to include
support to build for Windows 2000 target)

plus Xircom network card has been detected, (used to trigger load of
WL3DSP2K driver)

plus added 'Start SoftICE' desktop icon

plus SoftICE automatically loads symbols if
C:\kauai\projects\wlan_sta\software\pci_driver\wls2000\objchk_wxp_x86\i386\w
l3dsp2k.nms exists

plus desktop option to translate and load symbols for
C:\kauai\projects\wlan_sta\software\pci_driver\wls2000\objchk_wxp_x86\i386\w
l3dsp2k.sys

plus desktop shortcut to Device Manager

plus increase paging file to 738MB

plus turned off indexing service for all files and folders on C: drive

plus install Visual Studio .NET 2003

plus added WMI extensions for VS.NET 2003 Server Explorer




============================================================================
==

System #2 -- Desktop

Dell Dimension XPS T600r

28GB hard drive

Installed Windows 2000 Professional Checked/Debug

plus Windows 2000 Service Pack 4 Checked/Debug

plus convert 28GB system partition to NTFS,

dump partition using Ghost,

repartition for 15GB first half,

restore partition from Ghost

plus set paging file to a constant 512MB

plus configure for full memory dump to c:\zzz

plus driver signing is silently ignored during installation

plus Acrobat reader 6.0

plus Araxis Merge

plus Winzip 8.0

plus add debug symbols --> c:\zzz\w2ksp4sym_en_chk for Windows 2000 +
Service Pack 4 (Checked/Debug)

plus install debug tools for Windows, (WinDBG)

plus configuring and testing the COM1 serial port at 119200 baud

plus addition of a second boot option for kernel debugging

plus addition of an FPGA based prototype of the PCI network card we are
developing





"Paul Edwards" <jumarpaule@hotmail.com> wrote in message
news:Z2yBj4FXDHA.1996@cpmsftngxa06.phx.gbl...
> What service pack are you seeing this with? If it is what i think, then it
> will be fixed in Service Pack 3.
>
> The problem fixed:
>
> WMI PutInstance and ExecMethod sometimes returns
>
> WBEM_E_INVALID_PARAMETER when nothing is wrong.
>
>
>
> Q286803
>
>
>
> The file involved is wmiprov.dll.
>
> The link to this article:
>
> http://support.microsoft.com/default.aspx?scid=kb;en-us;286803.
>
> The article Q286803:
>
>
> WMI: WDM Provider Rejects Dynamic Arrays Of Zero Length WGID:206
> ID: 286803.KB.EN-US CREATED: 2001-01-25 MODIFIED: 2003-05-20
>
>
> Public |
>
> \* Security : Public
>
>
============================================================================
> ===
> --------------------------------------------------------------------------
--
> ---
> The information in this article applies to:
>
> - Microsoft Windows Management Instrumentation 1.5 (Version: 1.5)
> - the operating system: Microsoft Windows 2000
>
> --------------------------------------------------------------------------
--
> ---
>
> SYMPTOMS
> ========
>
>
> The Windows Driver Model (WDM) Provider in Windows Management
> Instrumentation (WMI) rejects dynamic arrays of zero size. Any attempt to
> store an instance of an object that includes a dynamic array of zero size
> will result in an "Invalid Parameter" error.
>
>
> As an example, the following MOF declares a variable length array.
>
>
> class Test_DiagnosticsStatus
> {
> datetime timeoflastrun;
> uint16 numberofresults;
> [read,WmiSizeIs("NumberOfResults")]
> Test_DiagnosticsResult DiagResults[]; // Varying array
> };
>
>
>
>
> The problem arises when the dynamic array (DiagResults[]) is of zero
length.
>
>
>
>
> DiagnosticsStatus = instance of Test_DiagnosticsStatus
> {
> NumberOfResults = 0;
>
> TimeOfLastRun = "16010101000000.000000+000";
> };
>
>
>
>
> Any attempt to store the above instance (DiagnosticsStatus) would result i
n
> an "Invalid Parameter" error (0x80041008).
>
>
> RESOLUTION
> ==========
>
> To resolve this problem, obtain the latest service pack for Windows 2000.
> For additional information, click the following article number to view the
> article in the
> Microsoft Knowledge Base:
>
>
> KBLink:260910.KB.EN-US: How to Obtain the Latest Windows 2000 Service
> Pack
>
>
> The English-language version of this fix should have the following file
> attributes or later:
>
>
>
>
> Date Time Version Size File name Platform
> --------------------------------------------------------------
> 2/13/2001 19:36 1.50.1085.49 110,660 Wmiprov.dll Intel
>
>
>
> How to Use the Hotfix Installer
> -------------------------------
>
> NOTE: You can use this method only for Intel-based computers with Windows
> 2000 installed.
>
>
>
> 1. Copy the Q286803.exe hotfix file to a local folder on your computer
> or to a share on your network.
>
> 2. Run the Q286803.exe file and follow the directions.
>
> 3. Restart your computer.
>
>
> STATUS
> ======
>
> Microsoft has confirmed that this is a problem in the Microsoft products
> that are listed at the beginning of this article.
> This problem was first corrected in Windows 2000 Service Pack 3.
>
> MORE INFORMATION
> ================
>
> For additional information about how to obtain a hotfix for Windows 2000
> Datacenter Server, click the article number below
> to view the article in the Microsoft Knowledge Base:
>
>
>
> KBLink:265173.KB.EN-US: The Datacenter Program and Windows 2000
> Datacenter Server Product
> For additional information about how to install multiple hotfixes with
only
> one reboot, click the article number below
> to view the article in the Microsoft Knowledge Base:
>
>
>
> KBLink:296861.KB.EN-US: Use QChain.exe to Install Multiple Hotfixes
> with One Reboot
> For additional information about how to install Windows 2000 and Windows
> 2000 hotfixes at the same time, click the article number below
> to view the article in the Microsoft Knowledge Base:
>
>
>
> KBLink:249149.KB.EN-US: Installing Microsoft Windows 2000 and Windows
> 2000 Hotfixes
>