Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the GDI+ background thread do?

Upon initialization, GDI+ (non .NET) creates a background thread, which can optionally be suppressed subject to calling some hook functions. MSDN, however, doesn't say what this thread actually does. Google doesn't seem to know either.

What is it for?

like image 368
uj2 Avatar asked Apr 29 '10 11:04

uj2


1 Answers

This thread provides a general explanation:

GDI+ spins up a background thread as soon as you start manipulating images. It's name doesn't provide much of a hint what it does, "BackgroundThreadProc()". This is pretty common in Microsoft libraries. Some sort of internal management thread, probably has something to do with memory management or threading. It creates a hidden window, that's classic too.

Nothing to worry about, everything is normal. Including the exit code.

FWIW, this thread recommends suppressing the background thread:

If you do not suppress the background GDI+ thread, DDE commands can be prematurely issued to the application before its main window has been created. The DDE commands issued by the shell can be prematurely aborted, resulting in error messages.

like image 187
Justin Ethier Avatar answered Sep 30 '22 18:09

Justin Ethier