Upload or Replace Local Material

You can upload the local material to the terminal or quickly replace a local material with the same-name material. If a material has been used by multiple programs, it will be replaced synchronously.

Make sure you have called NET_DVR_Init and NET_DVR_Login_V40 to initialize the development environment and log in to the device.

Figure 1 API Calling Flow of Uploading or Replacing Local Material

  1. Call NET_DVR_UploadFile_V40, set dwUploadType to 18 (UPLOAD_PUBLISH_MATERIAL), and set lpInBuffer to XML_Material to start uploading or replacing local material.
    Note:

    If you want to replace the material, the value of node <replaceTerminal> in XML_Material should be set to true.

  2. Call NET_DVR_GetUploadState to get the uploading or replacing progress.
  3. Call NET_DVR_UploadClose to stop uploading or replacing local material.

Call NET_DVR_Logout and NET_DVR_Cleanup to log out and release the resources.