After I create my Internet.Application object using _IECreate, I use the following DLL call to change the user agent:
Description in API:
__in_bcount_opt(dwBufferLength) LPVOID pBuffer,
__reserved DWORD dwReserved
[in] An unsigned long integer value that contains the option to set. This can be one of the following values.