The wmi provider link seems discuss the sample at https://github.com/microsoft/Windows-classic-samples/tree/main/Samples/Win7Samples/sysmgmt/wmi/vc/instprov.
After adapting the sample so that it would build with VS2022 I made one change to the MOF file --
I added the following -
#pragma autorecover
#pragma namespace("\\\\.\\Root\\CIMV2")
Then after running mofcomp and regsvr32 I was able to use wbemtest.exe to instantiate an instance of the class