[EMAIL PROTECTED] wrote: > Is there a simple way (component or API) to use, when transfering text > strings from one application to another? (Both running on the same PC!) > > I can use shared memory with the string stored at a common memory > location, but is that it ?
If you're talking about an AnsiString, then no, you can't do that. You'd have to convince the memory managers of both applications that the shared memory is a place where AnsiStrings can live. The memory managers don't allocate shared memory for themselves, so they won't automatically sub-allocate AnsiStrings from shared memory, either. PChars will work just fine because the language doesn't do anything special with them. > Nothing more direct similar to SendMessage etc. (transfers numbers, I > know) ? It transfers anything you want. You just need to make sure the recipient will know what to do with what it gets. The wm_CopyData message is designed for this. > I have found a component named AlMailSlot, that is said to be able to > do it. It is mainly used to transfer strings between computers, and it > may require a network card in the computer. (I do have one, so no > problem in that) Mailslots work locally, too. I've used them before. In addition to mailslots, messages, and shared memory, there are also pipes, sockets, the clipboard, and atoms. -- Rob _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

