Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving RTF text to Word document
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00584887
Message ID:
00618724
Vues:
31
>>Yes, but in case of interprocess operations (such as clipboard functions) the use of global heap is required.
>
>In Win16; under all Win32 environments, it's a linear address space, and the gloabal heap has no existence outside the process space, unlike Win16 where the global heap is shared by all Win16 apps. See Jeff Richter's "Advanced Windows" for a thorough discussion.

I was thinking near the same before reading MSDN articles:

Memory Management Functions:
"The following are the global and local functions. These functions are slower than other memory management functions and do not provide as many features. Therefore, new applications should use the heap functions. However, the global functions are still used with DDE and the clipboard functions."

SetClipboardData:
"After SetClipboardData is called, the system owns the object identified by the hMem parameter. The application can read the data, but must not free the handle or leave it locked until the CloseClipboard function is called. (The application can access the data after calling CloseClipboard). If the hMem parameter identifies a memory object, the object must have been allocated using the GlobalAlloc function with the GMEM_MOVEABLE flag."

When application allocates a memory to place data into clipboard, this memory block exists even after closing an application and destroying the process heap. And other applications still can access these data in clipboard. I don't know how it implemented, I'm simply using API functions as MSDN says.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform