Archive for May, 2006

Published by alax on 29 May 2006

XML-RPC and COM

This is what’s been cooking here for some time and given certain amount of time and intent it is going to be completed to the least usable state.

XML-RPC is a specification to deliver remote procedure calls via XML requests and responses using HTTP connection as a communication channel. Its advantage is it’s quite popular. What I’d like to do is to make a COM proxy (in future stub too) which will accept standard IDispatch compatible calls and translate them into XML-RPC compatible requests.
The thing may look a bit tricky but basically it’s more than halfway done already. COM proxy uses type library information and SAX to prepare XML request and raises COM event for the caller to be able to deliver request, typically using XMLHTTP helper. Received response is parsed back into COM proxy output. A variety of COM-enabled applications are thus given an easy to use XML-RPC capabilities.

Published by alax on 12 May 2006

ATL: Export from registry code snippet

The code snippet exports registry key (with values and subkeys) into .reg file format stream. The stream can be memory stream or any other IStream compatible implemetnation.

See also: How To Add, Modify, or Delete Registry Subkeys and Values by Using a Registration Entries (.reg) File

Visual C++.NET 2003 project: Download

Published by alax on 06 May 2006

Multidimensional VARIANT arrays

VARIANT arrays (SAFEARRAYs) are useful because they are OLE Automation compatible but multidimensional ones are used rather rarely. Unfortunately, the order of indexes is different depending on API. Somewhere it’s normal, somewhere it’s reverse and, as for me, I need to refresh this knowledge almost every time I come across a multidimensional VARIANT array. I use this small utility to quickly remember what is the proper order of indexes, which exactly index I can resize through SafeArrayRedim and how exactly the values are stored in memory.

Continue Reading »