Highlighted

Get location of AE SDK plugin

Explorer ,
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

310

Likes

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

Get location of AE SDK plugin

Explorer ,
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

311

Likes

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
Adobe Community Professional ,
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.

Likes

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
Reply
Loading...
Explorer ,
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 ?

Likes

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
Reply
Loading...
zcream LATEST
Explorer ,
May 25, 2020

Copy link to clipboard

Copied

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..

Likes

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
Reply
Loading...