Archive for January, 2006

New domain !

I’m still in progress setting www.hardcode.ro to this page – the domain registration process here in Romania is completely crap. So, soon, noone will ever have to remember the loooong URL above ( kro … it was something with “blogs” wasn’t it ? :) ). The DNS server is really needed, unlikely what thought in the first place. Thanks to Dragos Novac for getting this done.

OLE presentation cache

Discarding the presentation cache for ole client items is pretty simple using IOleCache::EnumCache and IOleCache::Uncache, however when re-opening the file the object will be empty. There’s a catch here: you still need to cache at least one item (even empty like FORMATETC aFormat = { 0, 0, DVASPECT_CONTENT, -1, TYMED_MFPICT }) otherwise the object won’t refresh and instead throw a OLE_E_BLANK.
The interesting stuff to do here though is not discard the cache but rather compress it (to PNG or something lossless like that) – I’m still researching on that.

Get an html element’s on-screen position ?

In pixels – and please without recursive routines that process the top and left CSS styles. Well first I’ve tried using IDisplayServices::TransformPoint but it appears there’s a much more friendly routine (that really works!) – IHTMLTextRangeMetrics2::getBoundingClientRect (be sure to set a IHTMLTxtRange to the element you need).

X1900

What a silent move by ATI … no counter or indication on their web page at all. Tomorrow we’ll all see X1900 launched and available from day one – something new in the ATI camp.

More Windows 2003 SP1 issues …

After few days of living with it (needed it back for SQL Server 2005) I’ve noticed some warnings when building an InstallShield Express setup:

ISEXP : warning -4354: The build was unable to extract COM information from the file [1]. Please ensure that the file is self-registering and verify that the self-registration process does not fail.

Indeed – it was caused by 2003 Server SP1 so I’ve ended up uninstalling it again. And, guess what – SQL Server 2005 (including management studio) runs exceptionally fine without it.

To come soon …

Together with Pisi I am involved in a startup site that wishes to index restaurants in Bucharest – it will be a winner. Of course, it’s not only this that is doing – you will see at launch.

Windows Challenge

I’ve just registered to the contest along with Alin Lazar (3rd place last year there with his team) and Mihai Ciureanu – our team is named Release Candidates :D .
In case you didn’t know, the contest is open to students from technical universities and involves creating a solution (based on Microsoft embedded technologies, of course) to help “preserving, protecting and enhancing” the environment.

Fake caller ID

Kudos to this guy that developed SMSExtender and TripleXtender – unique solutions for spoofing the caller ID of mobile phone calls and SMSs. Apparently he’s the one behind Simeda Gmbh (very innovative company, has developed apps like the SoundCover and ActiveViewer).

Bug (feature?) with Picture control’s border style

If you have a picture control in Visual C++ resources and set a simple border (yes – the thin black one) it gets modified at run-time (even when Ctrl-T) to WS_EX_CLIENTEDGE (a big ugly sunken border). Is this a feature for the old programs (Win3.1) to look better? Anyway – you can set the styles correctly afterwards at run-time:

Accessing IE’s rendered content

IDisplayServices::GetComputedStyle is the key function – it helps you retrieving an element’s style as it is displayed on screen. You can get the markup pointer with IMarkupServices::CreateMarkupPointer and then MoveAdjacentToElement.
Oh, and another point, IHTMLDocument4::createDocumentFromUrl fails on a newly-created document (so right after CreateInstance) – you’ll have to call InitNew on its IPersistStreamInit (I specified this here but only for ActiveX controls so the resolution is strange as the HTMLDocument is not an activex object class).