http://www.crispen.org/src/archive/0005.html
Not sure if this code works because I didn't try it myself, but it seems you have to make your own implementation that converts from HICON to raw data pointer used in a UpdateResource() call.

Also, it seems that LockResource() should be used instead of GlobalLock().

If you want a sample of how icon data must be provided for exe update, search the following link for "UpdateResource(RT_ICON":
http://cvs.sourceforge.net/viewcvs.p...l.cpp?rev=1.10

Best of luck,