# COMCreateObject (W*S)

COM Subroutine: A generic routine that executes either COMCreateObjectByProgID or COMCreateObjectByGUID.

## Module

USE IFCOM

USE IFWINTY

## Description

Your application obtains its first pointer to an object’s interface by calling COMCreateObject. It creates a new instance of an object class and returns a pointer to it.

Parent topic: Automation Server (AUTO) and Component Object Model (COM) Library Routines

## See Also

COMCreateObjectByGUID
COMCreateObjectByProgID