Skip to content
This SDK only works with devices released within the past 3 years. We regularly optimize and update the SDK to ensure compatibility and performance. We do not guarantee compatibility or provide technical support for devices older than 3 years.

# DISPLAY_PORT

### Structure Definition

C++C#

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    typedef struct _display_port
    {
        unsigned short index;
        unsigned short zOrder;
        unsigned short xPos;
        unsigned short yPos;
        unsigned short cx;
        unsigned short cy;
        unsigned short channel;
        unsigned short streamType;
        unsigned int deviceID;
        unsigned int liveHandle;
        DRAW_FUN_CALLBACK drawCallBackFunc;
        void* cbParam;
    } DISPLAY_PORT;

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    [StructLayout(LayoutKind.Sequential, Pack = 4)]
    public struct DISPLAY_PORT
    {
        public UInt16 index;
        public UInt16 zOrder;
        public UInt16 xPos;
        public UInt16 yPos;
        public UInt16 cx;
        public UInt16 cy;
        public UInt16 channel;
        public UInt16 streamType;
        public UInt32 deviceID;
        public UInt32 liveHandle;
        public DRAW_FUN_CALLBACK drawCallBackFunc;
        public IntPtr cbParam;
    }

### Function Description

Display parameters.

### Member Description

Member | Type | Remark
--- | --- | ---
index | unsigned short | Area number.
zOrder | unsigned short | Z-axis display order `LAYOUT_LAYER`.
xPos | unsigned short | Upper left corner horizontal coordinate.
yPos | unsigned short | The upper left corner vertical coordinate.
cx | unsigned short | Display area width in pixels.
cy | unsigned short | Display area height in pixels.
channel | unsigned short | Channel number, starting from 0.
streamType | unsigned short | See `STREAM_TYPE`.
deviceID | unsigned int | Device ID.
liveHandle | unsigned int | The preview handle, which is the return value of `NET_SDK_LivePlay` or `NET_SDK_LivePlayEx`.
drawCallBackFunc | `DRAW_FUN_CALLBACK` | Preview drawing callback.
cbParam | void* | Callback parameters.

Error Code