It depends on what USB device you want to emulate.
A device that can connect via RS-232 or USB probably has a USB/serial adapter on board. If so, the application accesses the device as a COM port, the same as if it were a true serial port. So you could emulate it with a virtual serial port.
Jan