I've been experimenting with the ExternalObject feature because I want to integrate a c++ library with my After Effects script. I started with the SampleLib found in the path:
C:\Program Files (x86)\Adobe\Adobe ExtendScript Toolkit CC\SDK\Samples\cpp\build\samplelib
I used VS 2019 to build the solution and got a dll file out of that. Then when I try to load it with:
var lib = new ExternalObject("lib:SampleLib.dll");
What I get is:
I'm not sure what to do at this point. The documentation does not even mention this as a possible error. I've looked everywhere on the internet but I can't seem to find anyone with a similar issue. It seems to work fine for everyone.
Any help would be appreciated!
Copy link to clipboard
I would assume that it has a lot to do with system security stuff. You know, that thing about DLL loading policies on Win 10 and the usual stuff with protected folders, user permissions and whatnot. Conversely, double-check your ExtendScript settings for network access and other such things that may prevent the sandbox from loading external files.
Thanks for the suggestions.
For the first assumption: I'm unfamiliar with any "loading policies", and I don't know what protected folders or user permissions have to do with this issue. I did try to change the project configuration from Debug to Release in VS2019 but that didn't work either.
And for the second one: I didn't find any Extendscript settings for this type of thing. I'm quite sure that "network access" has nothing to do with loading dll files.
Copy link to clipboard
Loading custom ExternalObjects are uncharted territory. I've spent a few days down this path with the same issues and haven't had a chance to get back to it. I'd reach out to Bruce https://community.adobe.com/t5/user/viewprofilepage/user-id/7743763 on this.
Thanks! I will. Is this a common issue? Are there any others who have this IO error? I wonder what could be the cause..
Any luck on this? I'm having a similar issue.
Not yet tested, but this may be an issue (especially because the Adobe samples are old and 32-bit):
I have tested two different versions of a dll library I found online. The 32 bit version produced an IO error, and the 64bit one worked perfectly.
I still don't know how to compile my external project dll into 64bit. All the samples are preconfigured to 32bit, and 64bit isn't mentioned anywhere. Wonder how the library owner made it work.