Is there a way that I can tell whether code is running under AREV32 versus running under OI? (OpenInsight 64-bit)
At 01 JUL 2020 02:36:15AM J Mabey wrote:
Is there a way that I can tell whether code is running under AREV32 versus running under OI?
The IFDEF compiler directives don't seem to work since I believe those were intended to detect whether running under Advanced Revelation (DOS) versus Open Insight.
Is there any table that I can try to open to deduce whether running under one or the other or is there another compiler directive?
Thank you,
Jim Mabey
Software Developer
INFORMATION MANAGEMENT TECHNOLOGIES
(714) 230-6246 (Ext. 701)
(800) 314-2476 (voice/fax)
At 01 JUL 2020 06:02AM Carl Pates wrote:
Hi Jim,
Compiler directives only apply at compile time - for runtime you need something like this:
declare function getOIState // (from REV_CONVCONTEXT_EQUATES) equ OISTATE_NORMAL$ to 0 equ OISTATE_CTO$ to 1 equ OISTATE_AREV32$ To 2 oiState = getOIState() begin case case ( oiState == OISTATE_AREV32$ ) // Code is running in Arev32 context ... etc end caseRegards
At 01 JUL 2020 11:22AM Donald Bakke wrote:
Jim - Clearly Carl's response is the right and proper way to do this, but you could also look at RetStack() and identify telltale signs of AREV32 calls.