Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #13132

Re: How detect run from IDE/EXE

From "Wolfgang Riedmann" <wriedmann@gmail.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: How detect run from IDE/EXE
Date 2020-11-09 13:14 +0100
Message-ID <i0sq5cFub00U1@mid.individual.net> (permalink)
References <8e61c8a6-baf0-4e80-a928-296d19c6bb7cn@googlegroups.com>

Show all headers | View raw


Hi Gregory,

> is there any way to detect if app is run from IDE or EXE?

check if your runnging exe has the .dbg extension instead of .exe.

function IsStartedFromIDE() as logic
//p wurde das Programm aus der IDE gestartet?
//s
	local lReturn		as logic
	local pszName		as psz
	local cName 		as string

	pszName			:= MemAlloc( 1024 )
	GetModuleFileName( _GetInst(), pszName, 1023 )
	cName 			:= PSZ2String( pszName )
	MemFree( pszName )
	lReturn			:= Upper( Right( cName, 4 ) ) == ".DBG"
	return lReturn 
	
HTH

Wolfgang

P.S. this is easy for VO, but unfortunately not so easy for X# because
there the executable is the "normal" exe

-- 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How detect run from IDE/EXE "Grzegorz R." <ramotny64@gmail.com> - 2020-11-09 04:09 -0800
  Re: How detect run from IDE/EXE "Wolfgang Riedmann" <wriedmann@gmail.com> - 2020-11-09 13:14 +0100
    Re: How detect run from IDE/EXE "Grzegorz R." <ramotny64@gmail.com> - 2020-11-09 06:32 -0800
      Re: How detect run from IDE/EXE "Wolfgang Riedmann" <wriedmann@gmail.com> - 2020-11-13 10:38 +0100

csiph-web