I've been trying to write some code to interact with Photoshop, both by adding a COM reference and by late binding. It took me a while to realise that the code did work, but not with the 64-bit version of Photoshop.
The exception I get with 64-bit Photoshop is as follows:
COMException was unhandled
Retrieving the COM class factory for component with CLSID {D9389EDE-AEF8-4092-9377-075E94B7CB9A} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
Is it possible for my application to communicate with the 64-bit version of Photoshop? Or is it limited to just communicating with the 32-bit version?
I've come across this in one of my numerous attempts to find a solution, but I don't see how I could put the CLSCTX_ACTIVATE_64_BIT_SERVER
flag into use with either a COM reference or late binding, well, supposing that it is the solution.
The exception occurs here:
Type photoshopType = Type.GetTypeFromProgID("Photoshop.Application");
if (photoshopType != null)
{
object photoshop = Activator.CreateInstance(photoshopType);