🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.c
Article #344

Re: プログラムの複数起動の抑止の方法

#344
From: Sato Masahiro
Date: Fri, 17 Apr 1998 00:00
23 lines
1487 bytes
fj.os.ms-windows.programming のほうが回答が得やすいと
思いますので、followup to fj.os.ms-windows.porgramming 
です。

santeku wrote:
> WindowsNT3.51 で VC++4.0 を使ってプログラムしています。
> 
> atコマンドで起動したバックグラウンドで実行しているプログラムを
> 複数起動しないようにしたいのですが方法が分かりません。
> 
> ウィンドウがあるプログラムでは FindWindow で起動されているか
> どうか調べることができるのですが、ウィンドウがない場合は
> どうすればいいのでしょうか。
> 
> どなたか教えて下さい。

Mutex を使用してはいかがでしょうか。Win32 API ならば、
CreateMutex などを調べてみてください。

-- 
Computer Institute of Japan, Ltd.
佐藤正宏 masahiro@cij.co.jp
Technical Details
Message-ID: <35384AF8.3070@cij.co.jp>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <01bd69df$d281fe40$241e1eac@fmv5120c08>

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: 110a07,63e21f93eb39272d,start
X-Google-Attributes: gid110a07,public
X-Google-Thread: 106434,8b79b4a6d7e162f8
X-Google-Attributes: gid106434,public
From: Sato Masahiro <masahiro@cij.co.jp>
Subject: Re: プログラムの複数起動の抑止の方法
Date: 1998/04/17
Message-ID: <35384AF8.3070@cij.co.jp>
X-Deja-AN: 345052868
Content-Transfer-Encoding: 7bit
References: <01bd69df$d281fe40$241e1eac@fmv5120c08>
Followup-To: fj.os.ms-windows.programming
Content-Type: text/plain; charset=iso-2022-jp
Organization: Computer Institute of Japan, Ltd.
Mime-Version: 1.0
Newsgroups: fj.lang.c,fj.os.ms-windows.programming