Sorry, if not secret
I use for create kmz files ArcGIS functions. It is not best solutions.
You use WinAPI or other interface?