Monday 11 August 2008

Small Update

As expected, i'm no longer publishing here, because everything about the project is happily sitting on www.prosyslib.org. And today I only came to update the links to the website, since I moved from the COM (still valid though) into ORG extension, so now it is www.prosyslib.org

Saturday 26 July 2008

Happy Birthday, project!

Today is the official birthday of the ProSysLib project, to which end the following has been accomplished:


  • Concept and implementation came into a product available for download
  • Documentation have been carefully worded and included into the installation
  • Website and conference were finished for their first version
  • I have started working on my first article about the project, and that’s due early next week to be published first on codeproject and then elsewhere

It seems that this blog just about having fulfilled its purpose, because any news about the project from now on I will be publishing in the website's forum. So, I’m not sure if I will be coming back here to publish in this blog anymore, it’s just double the time, and little point, while the conference will concentrate all information about the project.

If somebody is reading this blog and finds that it hasn’t been updated lately, this means I’m just publishing it all here: http://www.prosyslib.org


To any of my readers, I hope to see you there!

Sincerely yours,

Vitaly

Thursday 24 July 2008

Today

  1. Finalized Stealth Deployment concept and documented it fully: http://www.prosyslib.com/Help/webframe.html
  2. Started on the website design: www.prosyslib.com

Deployment help is finished

Today finished chapter Deployment in the help system: http://www.prosyslib.com/Help/webframe.html

Added all necessary examples to it into the Stealth Deployment, an idea of mine that I'm proud of, and is the best technique for deploying COM libraries.

Stealth COM Deployment

Today I invented a new way for distributing COM objects that completely solves the problem of DLL Hell, and is much better what Microsoft suggests about COM Isolation technique. I called it Stealth Deployment.

This idea was so exctiting, that not only i implemented it and tested it today, but also wrote a lot in documentation about the deployment. I added a lot about it, Chapter Deployment is pretty much finished in just one day, just need a few more code examples in it, and it's done: http://www.prosyslib.com/Help/webframe.html

The project is moving ahead awfully fast :)

Tuesday 22 July 2008

Updating Help System

This evening i was working on the Help system for the project, which i want to finish before publishing articles on the component.

Link to the help system: http://www.prosyslib.com/Help/webframe.html

Worth mentioning, also today i finished the first version of WMI subspace, which was published earlier.

WMI finished

Today finished the first version of WMI interface within the library. Check out definition for IPSLWMI in this document: ProSysLib IDL

Just in case, here's the same declaration re-published. Implementation of this interface has been fully finished and tested.


interface IPSLWMI : IDispatch
{
[id(1), propget, helpstring("Default WMI Namespace as set in the system.")]
HRESULT DefaultNamespace([out, retval] BSTR * pValue);
[id(1), propput] HRESULT DefaultNamespace([in] BSTR newVal);

[id(2), propget, helpstring("Default level of Impersonation used by WMI for scripting environments.")]
HRESULT DefaultImpersonationLevel([out, retval] enum PSLImpersonationLevel * pValue);

[id(3), propget, helpstring("Directory where WMI is installed.")]
HRESULT InstallationDir([out, retval] BSTR * pValue);

[id(4), propget, helpstring("WMI Version.")]
HRESULT Version([out, retval] BSTR * pValue);

[id(5), propget, helpstring("When an exception is raised by the interface, LastError contains the error code that was returned by the system.")]
HRESULT LastError([out, retval] long * pValue);

[id(6), helpstring("Returns a single value from WMI, or an empty object when failed.")]
HRESULT GetValue([in] BSTR NameSpace, [in] BSTR ClassName, [in] BSTR ValueName, [out, retval] VARIANT * pValue);

[id(7), helpstring("For a single-record WMI class, it takes a comma-separated list of columns and returns their values from the first record as an array of objects.")]
HRESULT GetColValues([in] BSTR NameSpace, [in] BSTR ClassName, [in] BSTR ValueNamesCSV, [out, retval] SAFEARRAY(VARIANT) * pValue);

[id(8), helpstring("For a multi-record WMI class, it takes a single column name and returns all record values for that column as an array of objects.")]
HRESULT GetRowValues([in] BSTR NameSpace, [in] BSTR ClassName, [in] BSTR ValueName, [out, retval] SAFEARRAY(VARIANT) * pValue);

[id(9), helpstring("Queries a WMI class for all column names, and returns them as an array of strings.")]
HRESULT GetColNames([in] BSTR NameSpace, [in] BSTR ClassName, [out, retval] SAFEARRAY(BSTR) * pValue);

[id(10), helpstring("Returns a table of data from WMI using WQL query, or NULL when failed.")]
HRESULT GetData([in] BSTR NameSpace, [in] BSTR WQL, [out, retval] IPSLTable ** ppValue);
};

Monday 21 July 2008

Examples of using WMI via ProSysLib

This is what it looks now with the simplified WMI interface. It can be compared with the real WMI for complexity.

Variant v = Sys.Tools.WMI.GetValue(“Win32_OperatingSystem”, “Caption”); // To get a single value;
Variant [] v = Sys.Tools.WMI.GetValues(“Win32_OperatingSystem”, “Caption, Version”); // To get a set of values;
PSLTable t = Sys.Tools.WMI.GetData(“SELECT * FROM Win32_OperatingSystem”); // To get a whole recordset table of values.

Sunday 20 July 2008

WMI

Finalized WMI interface today as shown here.


Hectic Work Day

Today it was mad, i spent the whole day implemeting the concept around WMI that enlightened me yesterday.

Basically, i realised that even though in many ways i'm going away from WMI and into more efficient and nice solutions, there's no reason why i cannot still offer use of WMI as an option, while making it much easier for developers.

At least 95% of all coding for WMI is just to get a value or a set of values. Today i implemented namespace System->Tools->WMI that has two methods:

  1. HRESULT GetValue([in] BSTR NameSpace, [in] BSTR ClassName, [in] BSTR ValueName, [out, retval] VARIANT * pVal);
  2. HRESULT GetData([in] BSTR NameSpace, [in] BSTR WQL, [out, retval] IPSLTable ** ppVal);
These two cover at least 95% of all code that developers need when using WMI. Method 1 is returning a simple value, while the second one can return a whole recordset, even with columns details.

It's all finished today, and works perfectly. In a C++ test application my WMI code went from about 50 lines and into just 5 lines while doing the same, only through ProSysLib. There you go!