> It's quite safe to share HANDLEs of events across threads, and for that > matter, handles of mutexes, etc. except critical sections. This is how > they're supposed to be used.
My original confusion was thinking that I could not share even an HWND across threads; but of course, this is wrong - you CAN - it's the CWnd pointer wrapping it that can't be shared. My bad. So can ALL HANDLEs be shared? E.g., one created by CreateFile()? > for each process, and the HANDLEs are plain indices through it; so, if you > simply pass the numerical value of a HANDLE to another process, and it > accesses it, it would be no different that passing a pointer to > something in > your address space to another, which would spell disaster. Right, understood. > > Feel free to ask more questions if you're still dizzy. I think > it's important > you get these topics well. Well, that has certainly cleared up HANDLEs for me... but I do have a question: A DLL counts as the same process as an app, because it is mapped into the application's address space - correct? What about an OCX? Same process, or not? Automation of a server embedded in an EXE is clearly not the same process since it's a separate EXE... but I'm wondering about a proper .OCX file? -- Jason Teagle [EMAIL PROTECTED] _______________________________________________ msvc mailing list [email protected] See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.
