NO

Author Topic: Add-In details  (Read 1046 times)

Offline John Z

  • Member
  • *
  • Posts: 433
Add-In details
« on: May 30, 2021, 03:52:09 pm »
Do Add-Ins run in their own threads? 

John Z

Grincheux

  • Guest
Re: Add-In details
« Reply #1 on: May 30, 2021, 09:16:19 pm »
Thread or Process?


It can't be in a same thread but in the same process. I think.

Offline John Z

  • Member
  • *
  • Posts: 433
Re: Add-In details
« Reply #2 on: May 30, 2021, 11:58:31 pm »
I'm wondering if Add-In(s) run in their own thread using for example:
hThread = CreateThread(NULL,0,Show_Escape,NULL,NORMAL_PRIORITY_CLASS,&threadPtr);

I've minimized use of globals but knowing if they run in a thread opens up that possibility.

John Z

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1974
Re: Add-In details
« Reply #3 on: May 31, 2021, 07:47:39 am »
« Last Edit: May 31, 2021, 07:55:06 am by TimoVJL »
May the source be with you

Offline John Z

  • Member
  • *
  • Posts: 433
Re: Add-In details
« Reply #4 on: May 31, 2021, 11:39:32 am »
Thanks very much TimoVJL.

I think that answers my question, well, unless so fast that the thread existence is not captured.  So best to keep Globals to a minimum..

John Z

Grincheux

  • Guest
Re: Add-In details
« Reply #5 on: May 31, 2021, 01:47:05 pm »
As seen in WiW

Offline John Z

  • Member
  • *
  • Posts: 433
Re: Add-In details
« Reply #6 on: May 31, 2021, 03:05:02 pm »
Thanks!  Great example (and using your new tool too!)

Shows Pick Font using the same thread as poide - plenty of time to view as Pick Font is waiting user input.

 :) :) :)

John Z

Offline John Z

  • Member
  • *
  • Posts: 433
Re: Add-In details
« Reply #7 on: May 31, 2021, 05:20:55 pm »
Process Explorer shows only one thread id.


These Add-Ins create own thread:
https://forum.pellesc.de/index.php?topic=7845.msg29154#msg29154
https://forum.pellesc.de/index.php?topic=8107.msg29671#msg29671

SrcFileCC_WS_a1:
Great example code to do various things, like add buttons instead of menu items.



John Z