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

Get location of AE SDK plugin

Contributor ,
May 25, 2020 May 25, 2020

Copy link to clipboard

Copied

Hi. I want to get the location of the plugin via AE SDK, so I can query the file creation time. How would I do this ?

Its better to get it dynamically in case the user has a non-standard path where the plugin is installed.

TOPICS
SDK

Views

498

Translate

Translate

Report

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 ,
May 25, 2020 May 25, 2020

Copy link to clipboard

Copied

this is what i use for mac:

NSString *appParentDirectory = [[[NSBundle bundleForClass:[SomeClassNameUniqueToYourPlugin class]] bundlePath] stringByDeletingLastPathComponent];
 
and for windows:
GetModuleFileNameW((HINSTANCE)&__ImageBase, folderW, MAX_PATH);
 
i'm sure there are other ways, but this works for me.

Votes

Translate

Translate

Report

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
Contributor ,
May 25, 2020 May 25, 2020

Copy link to clipboard

Copied

Thanks. I can understand the char buffer and size values - folderW and MAX_PATH.

What would __ImageBase be ? Is it just the name of the filter I have compiled ? i.e. XXX.aex ?

Votes

Translate

Translate

Report

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
Contributor ,
May 25, 2020 May 25, 2020

Copy link to clipboard

Copied

LATEST

EDIT:- A simple search helped 🙂

EXTERN_C IMAGE_DOS_HEADER __ImageBase;

....

WCHAR   DllPath[MAX_PATH] = {0};
GetModuleFileNameW((HINSTANCE)&__ImageBase, DllPath, _countof(DllPath));

Thanks a lot Shachar..

Votes

Translate

Translate

Report

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