Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.pascal.borland    |    Borland Pascal was actually pretty neat    |    2,978 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 2,079 of 2,978    |
|    Wolf Behrenhoff to Femme Verbeek    |
|    Re: Communication between Borland Pascal    |
|    12 Mar 06 23:39:06    |
   
   From: NoSpamPleaseButThisIsValid3@gmx.net   
      
   Femme Verbeek schrieb:   
   > Dr John Stockton schreef:   
   >>> A BP program can start any 32 bit windows program simply with exec(....)   
   >>> If you know how to do it between two windows programs, a very simple   
   >>> method would be to let the BP application start a tiny 32 bit   
   >>> consolemode progam at the moment the event should occur. The 32 bit   
   >>> program creates the event for the dos program e.g. by putting a message   
   >>> on the windows clipboard or in shared memory.   
   >>   
   >> Since a message can be conveyed with a Longint or a short ShortString,   
   >> ISTM that it should be practical and could be useful for someone to   
   >> write a minimal such 32-bit program, with a parameter to identify (if   
   >> appropriate) the means of transfer, a parameter for the data type, and a   
   >> parameter for the date -- or whatever parameters are actually needed.   
   >>   
   >   
   > Why so difficult. Just a string containing any information you like   
   > makes it a universal tool   
   > ok, here it is:   
   (...)   
   > Run it from a bp application in the following way   
   >   
   > Program testmsg;   
   > uses dos;   
   > {$M 8192,0,0}   
   > begin   
   > swapvectors;   
   > exec(getenv('COMSPEC'),'/c msg2clip.exe Hello World');   
   > swapvectors;   
   > end.   
      
   You can use interrupt 2Fh, AX=1703h to set clipboard data. Calling an   
   external program has several disadvantages - one of them being execution   
   speed. You don't want to do that.   
      
   Anyway, I don't recommend using the clipboard for communication between   
   two programs. That's not what it is for! The user doesn't expect a   
   program to change the content of the clipboard! Maybe there are some   
   functions which allow a DOS program to talk to windows. Have a look at   
   Ralf Brown's interrupt list, it can MAYBE help you (maybe not, I don't   
   know).   
      
   Wolf   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca