Spain died in 1665, the great powers wondered how long his heir, the sickly Charles II, would last. Wilhelm was put to work by France to begin negotiations related to the succession in Spain and in the Spanish Netherlands. In the run up to the War of Devolution, Wilhelm carried funds to Maximilian to fund the build-up of an army for Cologne. He also visited the Count Palatine of Neuburg, Philip Wilhelm, and the Elector of Bavaria to persuade them not to allow Austrian forces to move through their lands to oppose French maneuvers in the Netherlands. On 8 January 1667, Wilhelm went to Vienna representing Cologne (but acting on behalf of France) to sound out the Emperor's feelings about the succession, perhaps splitting the Netherlands from Spain after the death of Charles. There he spent much time establishing relationships with various ministers at the court. He was offered titles and money to join the Habsburg side and work for the end of the League of the Rhine, but he demurred. He was also sought by Petar Zrinski, who wished his help (and thus French help) in a Hungarian revolution. Wilhelm avoided being seen too often with him. However, he did let Louis XIV know of the Hungarian revolutionaries, and their potential to provide an opportune diversion for Austrian forces. This laid the ground for a 1668 treaty between France and Austria agreeing that if Charles died without an heir, France would receive the Spanish Netherlands, the County of Burgundy, Navarre, the Philippines, the Two Sicilies, and Morocco, while the remaining Spanish territories would go to Austria. In early 1668, Wilhelm was negotiating with Grand Pensionary Johan de Witt to try and come to an arrangement in the War of Devolution to partition the Spanish Netherlands between France and the Dutch Republic. Early in 1669, he spent a month training with his French regiment in Lille. He had been appointed colonel of this regiment shortly before. This appointment made it even harder for others to believe he was not working directly for Louis XIV. However, Wilhelm was not above taking advantage of the French for personal gain. That July, he had his brother, Hermann Egon, arrange a meeting so that it would appear the Dutch were negotiating trade agreements with the League of the Rhine against France. This was done so that the French would give the brothers money that