General information
Category:
COM/DCOM and OLE Automation
I've been reading a bit more about memory mgt in Windows.
I still don't see how a MTDLL COM object, running in its own thread, can allocate process-wide global memory, such as with GlobalAlloc(), and _also_ put the handle to that global section someplace where the other threads can get to it. With a VFP MTDLL, the DLL has no access to or awareness of the data structures in the global storage of the containing process. I cannot find a function that supports the concept of a "named" memory section, which would let you test for the section's existence and:
- if it existed, return the handle
- if it didn't exist, create it and return the handle
So I'm still stymied.
>Hi Mark,
>
>> What is the preferred way to set a global state indicator among all running threads that represent an instance of the same MTDLL COM object?
>
>I'm not sure what the preferred way is, but I use shared memory. It's relatively easy to set up and SYS(2600) provides convenient access. You could also use TLS if you have a way to share the TLS index across all threads.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only