| Customize Help
| Save Settings

MdispAlloc



Function Map
Synopsis
Allocate a display.
Syntax
MIL_ID MdispAlloc(
MIL_ID SystemId, //in
MIL_INT DispNum, //in
MIL_CONST_TEXT_PTR DispFormat, //in
MIL_INT64 InitFlag, //in
MIL_ID *DisplayIdPtr //out
)
Description

This function allocates a display on the specified system so that it can be used by subsequent MIL display functions. Use MdispSelect() to select the image buffer to display. Note that the buffer and the display should be allocated on the same system.

In general, the display is presented on the computer running the main MIL application. However, if you are developing a Distributed MIL application or a MILweb server application, you can allocate a display to be shown on a remote computer.

If you are developing a Distributed MIL controlling application and you allocate a display on a DMIL remote system, you can select image buffers allocated on that DMIL remote system to the display. By default, these buffers are displayed on the master computer. However, to display the buffers on the remote computer, combine M_EXCLUSIVE or M_WINDOWED with M_REMOTE_DISPLAY when allocating the display. This type of display is referred to as a remote display.

If you are developing a MIL application that also acts as a MILweb server, you can allocate a display that can be presented in one or more instances of a MILweb client application (for example, running in a compatible web browser). To do so, use M_WEB when allocating the display. This type of display is referred to as a MILweb display.

When a display is no longer required, you should free it, using MdispFree().

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
SystemId INQ

Specifies the system on which to allocate the display. This parameter should be set to one of the following values:

function map For specifying the system
Click to summarizeValue Description
Click to summarize M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

Click to summarize MIL system identifier

Specifies a valid system identifier, previously allocated using MsysAlloc().

DispNum INQ

Specifies the device to use for image display.

For a non-exclusive display, or for an exclusive display that you want MIL to choose the display device, set this parameter to the following value:

function map For specifying the display device
Click to summarizeValue Description
Click to summarize M_DEFAULT

Specifies that MIL will use the most appropriate device for display purposes. If your imaging board has a display section, and it is available, MIL will typically use it for display purposes.

(summarize)

For an exclusive display for which you want to specify the position of the display device in screen arrangements of up to 3x3 screens, this parameter can be set to a combination of the following values.

function map For specifying the position of the device to use for an exclusive display
Click to summarizeValue Description
Click to summarize M_BOTTOM

Specifies to use the bottom-most device for an exclusive display. Note that this option cannot be combined with M_TOP.

(summarize)
Click to summarize M_CENTER

Specifies to use the center device for an exclusive display.

Click to summarize M_LEFT

Specifies to use the left-most device for an exclusive display. Note that this option cannot be combined with M_RIGHT.

(summarize)
Click to summarize M_RIGHT

Specifies to use the right-most device for an exclusive display. Note that this option cannot be combined with M_LEFT.

(summarize)
Click to summarize M_TOP

Specifies to use the top-most device for an exclusive display. Note that this option cannot be combined with M_BOTTOM.

(summarize)
DispFormat INQ

Specifies the format of the display. For windowed displays, this parameter has no effect and should be set to "M_DEFAULT". For exclusive displays, this parameter specifies the screen resolution.

For any type of display, this parameter can be set to the following value:

function map For specifying the default display format
Click to summarizeValue Description
Click to summarize MIL_TEXT("M_DEFAULT") 1

Specifies the default display format. For windowed displays, this is the only supported setting. For exclusive displays, this specifies the default video configuration format (VCF), which can be set during installation and later modified using the MILConfig utility (Defaults tab).

(summarize)

1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().

For exclusive displays, the DispFormat parameter can be set to the following:

function map For exclusive displays
Click to summarizeValue Description MIL system-specific
tooltip (‡)
Click to summarize M_CURRENT_RESOLUTION

Specifies to use the current resolution of the screen. This option is only available for a M_EXCLUSIVE display.

(summarize)
c
M10
g h l m o v
Click to summarize MIL_TEXT("vcf-file-name.vcf") 1

Specifies the name of the video configuration format (VCF) that defines the resolution and refresh rate to use. The file typically has a VCF extension. The drive, directory, and name of the file must be specified, for example: "C:\mydirectory\myfile".

For a file on the remote computer (under Distributed MIL), the path and file name must be preceded by "remote:///" (for example, "remote:///C:\mydirectory\myfile").

The file name string can be specified in, for example, the "1024x768x32@60hz.vcf" format. For the current list of video configuration format (VCF) files, see the MATROX IMAGING\DRIVERS\HOST\VCF folder.

(summarize)
c
M10
g h l m o v

1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().

InitFlag INQ

Specifies your display's type. This parameter can be set to one of the following:

function map For specifying the display type
Click to summarizeValue Description
Click to summarize M_DEFAULT

Specifies the default display type, which can be set using the MILConfig utility. Typically, the default display type is M_WINDOWED.

(summarize)
Click to summarize M_EXCLUSIVE +

Specifies to present the image buffer selected for display full-screen, without a windowed border, in one of Windows desktop screens. The image buffer is presented at the center of the screen.

Exclusive displays work with any graphic controller and are compatible with all video hardware acceleration modes.

To use an exclusive display, your Windows desktop should be using more than one screen. Allocating an exclusive display on the main screen might not be convenient; if you do so, the MIL exclusive display will hide third-party applications designed to start on the main screen and hide the Windows taskbar if it is displayed the main screen.

(summarize)
Click to summarize M_WEB

Specifies to present the image buffer selected for display in one or more instances of a MILweb client application (for example, running in a compatible web browser).

To use a MILweb display, you must enable MILweb server functionality in your application using MappControl() with M_WEB_CONNECTION. You must also publish the display using MobjControl() with M_WEB_PUBLISH.

A MILweb display cannot be presented by your MIL application. It can only be presented by a connected MILweb client application (running on the local computer or a remote computer).

(summarize)
Click to summarize M_WINDOWED +

Specifies to present the image buffer selected for display in its own window on the Windows desktop screen(s). The display window is tracked and updated with the image buffer selected for display; that is, if the window moves or is occluded, the window is updated with the image buffer accordingly.

(summarize)
Combination value for M_EXCLUSIVE; M_WINDOWED.

You can add the following value to the above-mentioned values to set where and how the display is allocated.

function map For controlling where and how the display is allocated
Click to summarizeCombination value Description MIL system-specific
tooltip (‡)
Click to summarize M_REMOTE_DISPLAY

Specifies that the display is displayed on the remote computer in a DMIL application. This setting is only available when the display is allocated on a DMIL remote system. If the display is allocated on a DMIL remote system but this setting is not specified, the display is presented on the local computer.

To present the display on the remote computer, the Distributed MIL server cannot be running as a service; you must start it manually. To do so, assuming that Distributed MIL has already been installed during the setup, you must logon to the remote computer and, from the MILConfig utility, push the Start Server button, found in the Server Settings pane under the Distributed MIL item. For more information, see the Setting up the Distributed MIL server on remote computers subsection of the Preparing computers for Distributed MIL section of Chapter 48: Distributed MIL.

(summarize)
a c
M10
g h j k
M10
l m o p r
U27
v y
U75
aa
DisplayIdPtr

Specifies the address of the variable in which to write the display identifier. Since the MdispAlloc() function also returns the display identifier, you can set this parameter to M_NULL. If allocation fails, M_NULL is written as the identifier.

Return value
The returned value is the display identifier if the allocation is successful. If allocation fails, M_NULL is returned.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll; mildisplay.dll.
DEFAULT HOST DEFAULT BOTTOM CENTER LEFT RIGHT TOP DEFAULT" CURRENT RESOLUTION DEFAULT EXCLUSIVE WEB WINDOWED REMOTE DISPLAY EXCLUSIVE