Tag Archives: RXI file

Subject to change…

Those of you reading to the end of the posts in this blog may have noticed a small disclaimer we put at the bottom of each article explaining that things might change between now and the final release.  This post is just a small example of that in action as we’ve recently renamed a couple of properties in the interests of clarity and usability:

  • The WINDOW TRANSPARENCY property has been renamed to TRANSLUCENCY
  • The WINDOW APPUSERMODELID property has been renamed to TASKBARID (along with it’s switch in the RXI file)

More news as it happens …

(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).

OpenInsight and Direct2D

As you may have noticed in a previous post on RXI files OpenInsight 10 provides the option to use Direct2D rendering when painting windows and controls on the screen.  If you’re not familiar with Direct2D it’s a new graphics engine Microsoft introduced with Windows 7 that aims to replace the traditional GDI graphics interface that has been a part of Windows since time began.  Essentially it’s a hardware-accelerated API that takes advantage of modern GPUs to provide high-performance rendering of 2D geometry, bitmaps and text.

(The official MSDN Direct2D documentation can be found here).

By default OpenInsight will use Direct2D if it is available on the platform (usually Windows 7, Windows 8 and Vista SP2) unless you override this via the aforementioned /2D switch or the UseD2D option to turn it off.  You can also disable it at runtime by using the SYSTEM object’s D2D property, which takes a simple boolean value of 1 or 0.

Of course you’re probably asking why you would want to disable this?  Well, to be honest you probably don’t, but it’s a sad fact that not all graphics cards are created equal (or at least their drivers aren’t) and it’s nice to have the option to drop back to standard GDI rendering in case you ever run across a problem.  We’ve also found it useful during our own development cycle here to see how the system behaves when Direct2D is not available, such as when running on an XP platform (of course we do actually test on XP itself, but switching platforms mid-development slows the entire process down, so initial testing of GDI rendering is done on Windows 7).

(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).

The RXI Files – Part II

In the previous post where we introduced the new RXI files we mentioned some new command line switches added to OpenInsight 10. In this post we’ll take a look at them and describe what they do.

/TB (taskBarID)

Under Windows 7 and 8 multiple instances of an executable launched from the same directory are grouped under one icon on the taskbar, making navigating between them quite tedious. To allow an executable to override this behavior Microsoft introduced a new application property called the “Application User Model ID” – a simple string that can be applied to an executable instance to differentiate it from other sibling instances, thereby allowing them to be un-grouped.

Windows assigns a default value to this property at runtime based on the executable name and the starting directory.  The OpenInsight /TB switch (or taskBarID element in an RXI file) allows you to set your own unique value for this property so that your application can be differentiated on the Windows taskbar (A read-only property called TASKBARID is exposed by the SYSTEM object at runtime to provide access to this value).

The Application User Model ID must be set before any forms are created by an executable which is why it can only be set via the RXI file or the command line switch.

If you wish to find out more details about the Application User Model ID please see the MSDN documentation about the SetCurrentProcessExplicitAppUserModelID function.

/SI (singleInstance)

This is a boolean (1/0) flag that ensures there is only one instance of the specified OI application executing on a workstation.  Any other OI applications from the same executable are unaffected.

/EL (elevate)

This is a boolean flag (1/0) that specifies if the application requires Administrator privileges when it is launched. If this switch is set to “1” and the Windows user is not an administrator they will be asked to provide Administrator level credentials before they can continue (via the standard Windows UAC prompt).

/MD (minDisplaySecs)

When displaying a banner image file at startup this switch specifies the minimum number of seconds to display the banner for.

/EP (enginePath)

This switch specifies an alternative OpenEngine path (normally the Presentation Server expects to load OpenEngine from the same directory where it is located).

/2D (useD2D)

This is a boolean flag (1/0) that specifies if the system should use Direct2D technology for rendering when available.  By default OpenInsight will attempt to use Direct2D where it can (Windows Vista SP2, Windows 7 and later), but it can be forced to use GDI rendering instead if this flag is set to “0”.

/DP (useDPIScaling)

This is a boolean flag (1/0) that specifies if the application should automatically scale coordinates when used on a high-DPI system.

[Edit: 01 Feb 13 – AM switch renamed to TB and taskBarID]

[Edit: 08 Jan 13 – Added DPI Scaling modifications]

(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).

The RXI Files

As you probably know OpenInsight has plenty of command line switches and naturally for version 10 we’ve managed to add some more.  Here’s a list so far of the old and new ones (We’ll take a look at the new ones in a later post):

Switch Description
TB Taskbar ID
AP Application ID
UN Username
PW Password
SN ServerName
QN QueueName
AE AutoExec
CA Caption
DV DevMode
SM Show Monitor
NS No Spy
HI Hide PS
HE Hide Engine
BN Show Banner
SI Single Instance
EL Elevate
MD Minimum Banner Display
EP Engine Path
2D Use Direct 2D rendering
DP Use DPI scaling

Of course remembering to add all these to a shortcut can be tedious and error prone, so a new feature of OI 10 is the RXI (Revelation Xml Ini) file. This is basically a configuration file that stores the equivalent of these switches for a specific application and is parsed when the Presentation Server is first booted.

The contents of an RXI file are simple XML which looks like this:

<revPS appID="SYSPROG">
 <taskBarID>RevX.SYSPROG</taskBarID>
 <serverName>\\.\REVXPS_DEBUG</serverName>
 <queueName></queueName>
 <autoExec>REV_IDE</autoExec>
 <bannerFile>revx.png</bannerFile>
 <caption>Revelation X Dev System</caption>
 <showBanner>1</showBanner>
 <showMonitor>1</showMonitor>
 <noSpy>1</noSpy>
 <hidePS>0</hidePS>
 <hideEngine>0</hideEngine>
 <singleInstance>1</singleInstance>
 <elevate>0</elevate>
 <minDisplaySecs>0</minDisplaySecs>
 <useD2D>1</useD2D>
 <enginePath>C:\RevSoft\RevX.Dev</enginePath>
 <useDPIScaling>1</useDPIScaling>
</revPS>

An RXI file can be created for each of your OI applications using the Application ID as the file name with an extension of “.rxi”, e.g.

  • sysprog.rxi
  • examples.rxi
  • zzxadm.rxi

To use the RXI file specify the appropriate Application ID with the “/AP” command line switch when you start OpenInsight.  It is important to note that any of the settings contained within an RXI file are overridden by it’s corresponding command line switch if the switch is present.

Another point to bear in mind is that just as with command line switches the information contained within an RXI file is only used when the Presentation Server is first booted.  For example if you boot into SYSPROG and then change the application to EXAMPLES the “examples.rxi” file will not be processed.  This is because the information in the RXI file can only be processed and applied at boot-time.

[Edit: 01 Feb 13 – AM switch renamed to TB and taskBarID]

[Edit: 08 Jan 13 – Added DPI Scaling modifications]

(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).