TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: David Etheredge
from: Daniel Davis
date: 1995-04-02 14:33:00
subject: OS/2 programming tips ??

DE> 1) I am writing a program for OS/2 that I only want one 
DE> copy to load. How can I detect whether or not a copy is 
DE> already loaded at runtime?

The easiest way (although not very glamorous) is to create a file
(say: INUSE.TXT) when you enter the program and delete this file when
you leave...  

When you enter the program, before you create this file, check to see
if it exists.. If it does, assume the system is in use and prompt a
message.. otherwise, create it and continue..  (We do something similar
to this in Dos Clipper programming for Network applications at work..)
    l8r,
     Scott Davis
    [Team OS/2]

___
 X KWQ/2 1.2i X I'm an OS/2 developer...I don't NEED a life!

--- Maximus/2 2.02
* Origin: Programmer's Den - Home of Cybernet - Freq CYBERNET (1:112/66)
SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 112/66 1 280/1 270/101 105/103 42 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.