Below is my status update from July 5th. I am leaving Krakow for a few days, so this is my last status report before the midterm evaluations.
Another thing I have been working on since Monday is support for member variables (static and non-static). I am happy to say that they are implemented now. I have also modified the code to support COM properties – now if you access the wrapped code from Delphi or VBScript you don’t have to use getter/setter methods to access global and member variables. This means you can now write:
wrappedObject.memberVar := 15;
This is only ‘syntactic sugar’, but it was almost trivial to do, so I decided to implement this feature.
I have also modified the COM module to generate a .rc file, which includes the type library (.tlb) file for the wrapped module. I think this might be helpful for people who do not know (or do not want to know) too much about Win32 oddities. This can be turned off by a command line switch (-norcfile). I plan to make the initialization routine (DllMain), the class factory function (DllGetClassObject) and the registration functions (Dll[Un]LoadNow) more flexible for people who might want to have multiple wrapped objects in one DLL, or who have other requirements.
To sum up my work since May 26th – I haven’t completed some of the things I planned to do during the first half of SoC, e.g. constants/enums (which I have not really looked at yet), constructors and method overloading. On the other hand I have already done some things that I intended to do much later – those are the factory methods, component registration and IDispatch. The code currently in Subversion is reasonably functional and can already be used in some scenarios – notably functions and variables are made available through COM and can be accessed/modified/executed in a natural way. The creation and registration of a COM server does not require much manual work for the user – only compilation, linkage and registration. Overall I think I am on track with my project and I have a good chance of completing it by the end of this year’s Summer of Code.