X Process HBITMAPs

Skip to first unread message

Jos Vernon

Feb 15, 2001, 3:42:54 AM2/15/01
I'm trying to use HBITMAPs cross process. Up until now I've been using
standard COM which handles the marshalling for you between processes or
between machines. However I've recently hit some snags using Neutral
threaded components. It appears that the interception that goes on between
components that are Neutral Threaded chokes on anything other than
automation compatible arguments. So HBITMAPs are out.

I'm not really bothered about X Machine use because the amount of data
transfer would be prohibitive. However it seems to be that there ought to be
a way to use HBITMAPs X Process since GDI objects are systemwide. Does
anyone know how one might manage this?


jos vernon
ASP and VB Image Components

Feng Yuan

Feb 15, 2001, 11:55:44 AM2/15/01
On Windows NT/2000/XP, GDI does have a system-wide GDI object table. But
certain data is stored in per-process user mode area, and the process ID of
the creating process is stored in GDI object table.

For every operation with a GDI object, GDI32.DLL always checks for matching
process ID. So cross-process usage of GDI object is not allowed by design,
at least for NT/2000/XP.

For a detailed discussion on GDI internal data structure on Windows 2000,
read Chapter 3.

Feng Yuan ( for the GDI book to read, check www.fengyuan.com )

Reply all
Reply to author
0 new messages