I want to extract a icon from shell32.dll and write it to a new file. Here my non-working script: #include <WinAPIIcons.au3> $hIcon = _WinAPI_LoadShell32Icon(71) ; the next statement writes only a hexalue (e.g. 0x01CB07C9)to the file ; how to write the icon to the file? FileWrite(@ScriptFullPath & ".ico", $hIcon) _WinAPI_DestroyIcon($hIcon) How to create the file? got it myself:  #include <WinAPIGdi.au3> $hIcon = _WinAPI