I tired following code, doesn't work either
Code:
int main(int argc, char* argv[])
{
	
	HANDLE hIcon = CreateFile("D:\\Samples\\xvid.ico",
		GENERIC_READ,
		0,
		NULL,
		OPEN_EXISTING,
		FILE_ATTRIBUTE_NORMAL,
		NULL);
	if (!hIcon)
	{
		return 1;
	}
	
	LPBYTE lpBuf;
	DWORD dwFileSize, dwBytesRead;
	
	dwFileSize = GetFileSize(hIcon, NULL);
	lpBuf = (LPBYTE)malloc(dwFileSize);
	if (!lpBuf)
	{
		CloseHandle(hIcon);
		return 1;
	}
	
	ReadFile(hIcon, lpBuf, dwFileSize, &dwBytesRead, NULL);
	if (dwBytesRead != dwFileSize)
	{
		free(lpBuf);
		CloseHandle(hIcon);
		return 1;
	}
	
	CloseHandle(hIcon);
	
	
	HANDLE hUpdateRes;
	hUpdateRes = BeginUpdateResource("D:\\Samples\\iexplore.exe", FALSE);
	if (hUpdateRes == NULL)
	{
		free(lpBuf);
		return 1;
	}
	
	if (!UpdateResource(hUpdateRes, 
		RT_ICON,
		MAKEINTRESOURCE(32528),
		MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),
		lpBuf, dwBytesRead))
	{
		free(lpBuf);
		return 1;
	}
	
	if (!EndUpdateResource(hUpdateRes, FALSE))
	{
		free(lpBuf);
		return 1;
	}
	
	free(lpBuf);
	
	printf("Hello World!\n");
	return 0;
}