Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

I/O Error when loading an ExternalObject (dll) in Extendscript

Community Beginner ,
Dec 19, 2019 Dec 19, 2019

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/O error

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!

TOPICS
Error or problem , Scripting
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 20, 2019 Dec 20, 2019

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.

 

Mylenium

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 21, 2019 Dec 21, 2019

Hi Mylenium,

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.

 

Yahia

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 20, 2019 Dec 20, 2019

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 21, 2019 Dec 21, 2019

Thanks! I will. Is this a common issue? Are there any others who have this IO error? I wonder what could be the cause..

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 20, 2020 Feb 20, 2020

Any luck on this? I'm having a similar issue.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 21, 2020 Feb 21, 2020

Not yet tested, but this may be an issue (especially because the Adobe samples are old and 32-bit):

https://stackoverflow.com/questions/37265892/adobe-extendscript-externalobject-on-64-bit-windows/374...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 18, 2021 Sep 18, 2021
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines