Is the PIChannelPortsSuite available to UXP hybrid plugins?

I’m working on a plugin and was able to successfuly ‘acquire’ the ChannelPort suite, but any attempt to create a channel port, read or write, results in an error: 0x5041524D, which translates to ‘PARM’ = errPlugInBadParameters.

I have been troubleshooting this for several hours so far without any luck.

Is it just that UXP plugins don’t have access to channel ports?

What I’m ultimately trying to do is write to the document directly from C++, without the added cost of communicating with UXP for every function call.

As of now, UXP hybrid plugins don’t have full access to the PIChannelPortsSuite — it’s mainly supported in classic CEP/ExtendScript environments. That error (errPlugInBadParameters) typically points to unsupported operations in UXP. Direct document writing from C++ in UXP is quite limited at the moment.

I ran into this too and opened a thread with more detail: Channel Ports from a hybrid .uxpaddon: any way to get a live document port?

Short version, and I think it explains the errPlugInBadParameters above. PSDLLMain fires in the addon and kPSChannelPortsSuite acquires fine, but there’s no way to get a handle on the actual document’s ports: the descriptor comes in null, every read call takes a port you already hold, and the only two port-producing methods are New(), which gives a blank scratch port, and NewCopyOnWrite(), which needs a base port you already have. Live ports seem to arrive only through a plug-in’s documentInfo, which an addon never gets. So there’s no valid document port to pass, which is what create/read/write are complaining about.