Please sign in to comment.
Maximus5/conemu-inside#12: Query GuiMacro result via callback function.
ConEmuCD.dll and ConEmuCD64.dll now export `GuiMacro` function. Result may be return via BSTR to avoid using of per-process environment variable "ConEmuMacroResult". Caller is responsible to free the result with `FreeBSTR`. Callback function may be passed as argument `ResultCallback`, GuiMacro Prototype extern "C" int __stdcall GuiMacro(LPCWSTR asInstance, LPCWSTR asMacro, BSTR* bsResult = NULL); Function Arguments asInstance is the same as right part (after colon) of ConEmuC `-GuiMacro:...` switch. asMacro is a GuiMacro itself. bsResult must be either NULL, or (BSTR*)-1, or a pointer to a variable receiving BSTR. Returned Value Function returns one of the following integer value * CERR_GUIMACRO_SUCCEEDED /* 133 */ * CERR_GUIMACRO_FAILED /* 134 */ GuiMacro Result Function `GuiMacro` do not print macro result to StdOut. if (bsResult == (BSTR*)-1) then function do not return macro result via environment variable. if (ResultCallback == NULL) then function returns macro result via environment variable "ConEmuMacroResult". Otherwise the result allocated with `SysAllocString` and returned in *bsResult. Caller must free it with `FreeBSTR`.
- Loading branch information
Showing with 24 additions and 34 deletions.