Discussion:
Writting wmi provider
(too old to reply)
sekar
2008-07-01 14:29:00 UTC
Permalink
I am writting a WMI provider to manage the storage array connected to my
winXp host. I realize that I must write a mof file and a dll. But I am having
trouble in how to start. Can some one provide me pointers/sample on how to
write the mof and dll. Is there any sample mof file that has class to execute
some method and what all should be there in the dll.
I am sorry if the questions are very silly but please help me on how to go
about this
urkec
2008-07-01 20:38:11 UTC
Permalink
Post by sekar
I am writting a WMI provider to manage the storage array connected to my
winXp host. I realize that I must write a mof file and a dll. But I am having
trouble in how to start. Can some one provide me pointers/sample on how to
write the mof and dll. Is there any sample mof file that has class to execute
some method and what all should be there in the dll.
I am sorry if the questions are very silly but please help me on how to go
about this
There is a sample here:

http://msdn.microsoft.com/en-us/library/cc268228.aspx
--
urkec
sekar
2008-07-02 02:36:01 UTC
Permalink
Post by urkec
Post by sekar
I am writting a WMI provider to manage the storage array connected to my
winXp host. I realize that I must write a mof file and a dll. But I am having
trouble in how to start. Can some one provide me pointers/sample on how to
write the mof and dll. Is there any sample mof file that has class to execute
some method and what all should be there in the dll.
I am sorry if the questions are very silly but please help me on how to go
about this
http://msdn.microsoft.com/en-us/library/cc268228.aspx
--
urkec
Thanks for the response. I am writing the provider in C++. I need some
sample in C++. Also how is it different from writing a coupled service
provider to a decoupled service provider. I thought they differ only in the
way the client uses them. Could some one please clarify?
urkec
2008-07-02 15:19:01 UTC
Permalink
Post by sekar
Post by urkec
Post by sekar
I am writting a WMI provider to manage the storage array connected to my
winXp host. I realize that I must write a mof file and a dll. But I am having
trouble in how to start. Can some one provide me pointers/sample on how to
write the mof and dll. Is there any sample mof file that has class to execute
some method and what all should be there in the dll.
I am sorry if the questions are very silly but please help me on how to go
about this
http://msdn.microsoft.com/en-us/library/cc268228.aspx
--
urkec
Thanks for the response. I am writing the provider in C++. I need some
sample in C++. Also how is it different from writing a coupled service
provider to a decoupled service provider. I thought they differ only in the
way the client uses them. Could some one please clarify?
This is the only one C++ sample I know of:

http://www.codeproject.com/KB/system/WMI__Hi-Perf_Provider.aspx

It is a Hi-Perf provider sample. For coupled vs. decoupled providers see here:

http://msdn.microsoft.com/en-us/library/aa392893.aspx#determining_a_hosting_(implementation)_model_for_a_provider
--
urkec
sekar
2008-07-02 17:04:05 UTC
Permalink
Thanks a ton for the information. That helped a lot. Now I will ask something
about my work. Please let me know if I have understood correctly. I am
writing a provider to do volume management function( I have the SDKs that I
will be incorporating). Can I define a class say, win32_MangeLogicalDisk that
derives from class Win32_LogicalDisk, inside the mof file(similar to what you
pointed) ,and just add an additional method say "extend" inside the new
class. And in the dll can I have the implementation for this method "extend".
In the dll I can have a class "CDiskMgmtProvider". Should that derive from
any specific Iwbem* classes. In that case what all implementaions will become
mandatory(like IwbemProviderInit::Initialize, QueryInterface, AddRef ....).

Please let me know if I have misunderstood anything here. Thanks in advance
for your patience :)
urkec
2008-07-02 17:32:01 UTC
Permalink
Post by sekar
Thanks a ton for the information. That helped a lot. Now I will ask something
about my work. Please let me know if I have understood correctly. I am
writing a provider to do volume management function( I have the SDKs that I
will be incorporating). Can I define a class say, win32_MangeLogicalDisk that
derives from class Win32_LogicalDisk, inside the mof file(similar to what you
pointed) ,and just add an additional method say "extend" inside the new
class. And in the dll can I have the implementation for this method "extend".
In the dll I can have a class "CDiskMgmtProvider". Should that derive from
any specific Iwbem* classes. In that case what all implementaions will become
mandatory(like IwbemProviderInit::Initialize, QueryInterface, AddRef ....).
Please let me know if I have misunderstood anything here. Thanks in advance
for your patience :)
Sorry, I don't use C++.
--
urkec
Loading...