DWORD lgLcdOpen(ref lgLcdOpenContext ctx);
DWORD lgLcdOpen(ref lgLcdOpenContext ctx);
/// <summary> /// The lgLcdOpen() function starts the communication with an attached device. You have /// to call this function before retrieving button information or updating LCD bitmaps. /// </summary> /// <remarks> /// A handle retrieved through this function stays valid until either of the following conditions occurs: /// <list type="unordered"> /// <item> /// The device has been unplugged. Any operation with the given handle will result in an /// error code of ERROR_DEVICE_NOT_CONNECTED. /// </item> /// <item> /// The handle has been closed using lgLcdClose(). /// </item> /// </list> /// Part of the opening context is a callback that can be pointed to a function that is to /// be called when soft button changes take place on the LCD. This callback is issued when /// the LCD’s soft buttons change while your application owns the LCD space. See the /// definition of lgLcdOpenContext and lgLcdSoftbuttonsChangedContext for details. /// </remarks> /// <param name="ctx"> /// Specifies a pointer to a structure with all the information that is needed to open /// the device. See lgLcdOpenContext for details. Before calling lgLcdOpen(), all fields /// must be set, except the “device” member. Upon successful return, the “device” member /// contains the device handle that can be used in subsequent calls to lgLcdUpdateBitmap(), /// lgLcdReadSoftButtons(), and lgLcdClose(). /// </param> /// <returns> /// If the function succeeds, the return value is ERROR_SUCCESS. /// If the function fails, the return value can be one of the following: /// /// ERROR_SERVICE_NOT_ACTIVE /// lgLcdInit() has not been called yet. /// ERROR_INVALID_PARAMETER /// Either ctx is NULL, or ctx->connection is not valid, or ctx->index does not hold a valid device. /// ERROR_ALREADY_EXISTS /// The specified device has already been opened in the given connection. /// Xxx /// Other (system) error with appropriate error code. /// </returns> [DllImport("LgLcd.dll")] private static extern int lgLcdOpen(ref lgLcdOpenContext ctx);
/// <summary> /// The lgLcdOpen() function starts the communication with an attached device. You have /// to call this function before retrieving button information or updating LCD bitmaps. /// </summary> /// <remarks> /// A handle retrieved through this function stays valid until either of the following conditions occurs: /// <list type="unordered"> /// <item> /// The device has been unplugged. Any operation with the given handle will result in an /// error code of ERROR_DEVICE_NOT_CONNECTED. /// </item> /// <item> /// The handle has been closed using lgLcdClose(). /// </item> /// </list> /// Part of the opening context is a callback that can be pointed to a function that is to /// be called when soft button changes take place on the LCD. This callback is issued when /// the LCD’s soft buttons change while your application owns the LCD space. See the /// definition of lgLcdOpenContext and lgLcdSoftbuttonsChangedContext for details. /// </remarks> /// <param name="ctx"> /// Specifies a pointer to a structure with all the information that is needed to open /// the device. See lgLcdOpenContext for details. Before calling lgLcdOpen(), all fields /// must be set, except the “device” member. Upon successful return, the “device” member /// contains the device handle that can be used in subsequent calls to lgLcdUpdateBitmap(), /// lgLcdReadSoftButtons(), and lgLcdClose(). /// </param> /// <returns> /// If the function succeeds, the return value is ERROR_SUCCESS. /// If the function fails, the return value can be one of the following: /// /// ERROR_SERVICE_NOT_ACTIVE /// lgLcdInit() has not been called yet. /// ERROR_INVALID_PARAMETER /// Either ctx is NULL, or ctx->connection is not valid, or ctx->index does not hold a valid device. /// ERROR_ALREADY_EXISTS /// The specified device has already been opened in the given connection. /// Xxx /// Other (system) error with appropriate error code. /// </returns> [DllImport("LgLcd.dll")] private static extern int lgLcdOpen(ref lgLcdOpenContext ctx);