BNCS Single V4.5 Panel Host

Description

bncs_v45_host.exe is a simple V4.5 client host that hosts a single V4.5 UI – either simple “bncs_ui” (XML dialog description) or DLL (compiled C++ script).

It expects the usual V4.5 environment - CC_ROOT/CC_SYSTEM environment vars set as well as supporting DLLs (e.g. custom controls) in the “usual” place.

File/Path | Notes
%PATH% Binary dependencies
Practically this means the contents of the windows\lib directory of a V4.5 system.
For example (this may not be a comprehensive list):
  • bncs_config.dll
  • bncs_string.dll
  • dcw.dll
  • bncs_stylesheet.dll
%CC_ROOT%\%CC_SYSTEM%\windows\lib\qt_plugins\designer Custom Controls.
For example (this may not be a comprehensive list):
  • bncs_ssmart.dll
%CC_ROOT%\%CC_SYSTEM%\windows\lib\qt_plugins\styles | Drawing DLLs - bncs_style.dll
%CC_ROOT%\%CC_SYSTEM%\windows\lib\qt_plugins\sqldrivers SQL drivers (if required). For example (this may not be a comprehensive list):
  • qsqlmysql.dll
  • qsqlodbc.dll

Configuration

Style is taken from g_pnlman.ini (same as panelman) - found here: %CC_ROOT%\%CC_SYSTEM%\config\g_pnlman.ini

[Styles]
Style=bncs_style5

Panel

bncs_v45_host follows the same rules for loading panels as normal V4.5 panel manager "panelman.exe". i.e. give it the directory name of the UI to load. If a DLL is found with the same name as the directory then it's loaded, otherwise it'll search for a bncs_ui file of that name.

e.g.for

c:\bncs\panels\mySimplePanel\mySimplePanel.bncs_ui

use

bncs_v45_host /load=mySimplePanel

the path (c:\bncs\panels) is defined by the CC_ROOT/CC_SYSTEM environment variables and the file to load is assumed to be the same name as the directory.

Application Control from bncs_v45_host

You may close the host application (from a scripted (DLL) application only) with the command:

hostNotify( "/close" );

You can execute applications by using:

hostNotify( “EA <application name>” );

where <application name> is a full path or relative to the panels directory of the V4.5 system. This is largely equivalent to ApplCore EA command.

Command Line

Entry | Mandatory | Notes
/load=panel | yes | The directory of the panel to load
/x=0 | x pos of the window (this overrides the value defined by the panel loaded)
/y=0 | y pos of the window (this overrides the value defined by the panel loaded)
/w=1280 | width of the window (this overrides the value defined by the panel loaded)
/h=924 | height of the window (this overrides the value defined by the panel loaded)
/instance=instanceName | Can be used to pass an instance to the panel loaded

Running bncs_v45_host without a full V4.5 install

It is possible to run bncs_v45_host without having done a full V4.5 install.

You can use a batch file that looks a bit like this:

set CC_ROOT=c:
set CC_SERVER_ROOT=c:
set CC_SYSTEM=bncs
set CC_WORKSTATION=%1
set path=%cc_root%\%cc_system%\windows\lib;%path%
start bncs_v45_host /load=packaging\package_editor /x=0 /y=0 /w=1280 /h=924

Note: You should provide the workstation number as the command line parameter to this script.

Alternatively there is an application helper bncs_client_helper.exe that does the equivalent of this batch file - but is simpler to use (separately documented).

Written by David Yates. Copyright Atos 2012