AEGP_GetMainHWND: supported callback context, threading, and HWND lifetime
Hello After Effects SDK Support,
We are developing an internal native AEGP plug-in for After Effects 2026, using After Effects Plug-in SDK 26.5 on Windows x64.
The plug-in would retrieve the host window handle through AEGP_UtilitySuite6::AEGP_GetMainHWND. An external component would use this handle solely for read-only association with the running After Effects process. No UI manipulation or write automation is involved.
Could you clarify these API contract details?
-
Supported calling context
Is callingAEGP_GetMainHWNDfrom a registered AEGP IdleHook officially supported? If not, which AEGP callback or lifecycle point is recommended? -
Thread requirement
Must this function run on the After Effects main/UI thread? If so, which supported AEGP callbacks guarantee that thread context? -
Initial availability
At what lifecycle point is the main window guaranteed to exist? Is this call supported during the plug-in initialization entry point defined byAEGP_PluginInitFuncPrototype, or only afterward? Can a supported call succeed while returning a null HWND? -
Lifetime and invalidation
Is the returned HWND guaranteed to remain valid and unchanged for the lifetime of that After Effects process? If not:- Which host/UI events can invalidate or replace it?
- Is there an AEGP callback or notification for those events?
- Does Adobe recommend calling
AEGP_GetMainHWNDagain before each use instead of caching it?
Explicit supported/unsupported, thread requirement, and handle lifetime guidance would be helpful. Please point us to an official reference if available.
Thank you.
