httpd-cli-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hammett" <>
Subject source code review
Date Sat, 02 Oct 2004 17:01:00 GMT
Hello all!

I invited myself to put my nose in the code just to see how things works.
Its surprisingly simple, I was expecting thousands of lines. Very neat. Of
course the HRESULT hr = DoSomething is something that send me back to 3 or 4
years, when I was a COM programmer working with C++ and ATL. I wonder why i
thought it was a good idea at the time :-\

Well, the CLI module is pretty simple. Just wanna ask you about a few things
that I don't remember exactly how they work, and if my assumption is correct
can be a small bug.

- mod_aspdotnet.cpp : Lines 310-321

Two possibilities of execution of _com_raise_error, which I don't rememer if
it only populate the error info or actually throws a com_error. If its the
late, then pAppDomainIUnk won't be properly released. Have you considered
using smart pointers? I used to use CComPtr or something with a similar

- mod_aspdotnet.cpp : Lines 335-346

Same thing with pDefaultDomain

- mod_aspdotnet.cpp : Line 350

I'd use the CComVariant to ensure the VariantClear

- mod_aspdotnet.cpp in general...

Personal preference, I'd refactor it to small chunks, methods. Don't know,
I'm a big fan of intentional programming :-)

The rest of the managed code is pretty straighforward, but I'd look at them
again later today, I need to prepare lunch :-)


View raw message