First you need to know how to modify registry in c++, here is a post that explains that:
In the link you provided you have the keys that you need to update
HKEY_CLASSES_ROOT/[yourextension]
the call to SHChangeNotify is only needed to tell explorer to refresh once you modified the icon.