Answer: B
(1) Inventions and creations completed while performing the tasks of the unit or mainly utilizing the material and technical conditions of the unit are service inventions. (2) The right to apply for patents for service-based inventions: ① If the invention is completed by utilizing the material and technical conditions of the unit, it shall be subject to the agreement; ② If the task of the unit is completed, it shall belong to the unit. (3) In this case, Wang completed the invention by performing the tasks of his unit, and the right to apply for the patent belongs to Company A.