Scenario 12: Exit
Description
When a third-party application exits the SDK, the SDK needs to be deinitialized. Otherwise, the HwmSdk.exe process (main process of the Electron SDK on the Windows 64-bit platform) is still running in the background. This scenario applies only to the 64-bit Windows platform.
Service Process
To exit the SDK, call the Exit synchronization API.
- Call an API.
- Call the Exit API to exit the SDK.
Sample Code
1 2 3 4 5 6 7 8 9 10 |
/** * Exit the SDK. */ async exitSdk(){ const apiService = await new ApiService(); let setResult = await apiService.exit(); if(setResult != 0){ window.electron.ipcRenderer.send("show-error-alert", "exit error = " + setResult); } } |
1 2 3 4 5 6 7 8 9 |
/** * Definition of exit API in ApiService */ exit() { console.log("exit, in param = "); let ret = this.uisdkService.exit(); console.log("exit, out data = ", ret); return ret; } |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot