# MeetingShare\_StartAppShare example

**URL:** <https://devforum.zoom.us/t/meetingshare-startappshare-example/36638>\
**Category:** Electron\
**Created:** [November 21, 2020, 6:22pm UTC](https://devforum.zoom.us/t/meetingshare-startappshare-example/36638 "2020-11-21T18:22:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![karens](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/karens/32/42121_2.png) [@karens](https://devforum.zoom.us/u/karens)\
**Post date:** [November 21, 2020, 6:22pm UTC](https://devforum.zoom.us/t/meetingshare-startappshare-example/36638/1 "2020-11-21T18:22:25Z")

</div>

**Description**  
Can somebody please provide an example in electron how to share an app with electron-sdk?

The function `MeetingShare_StartAppShare` says:

```auto
@param {String} zn_hShare_app Specifies which the window is to be shared (require hexadecimal)

```

However there is no function to get the list of available apps. Could somebody please explain how this function is supposed to be used in Electron?

I tried pid, hex(pid), `px${hex(pid)}` but none of them seems to work.

**Which version?**  
v5.2.41762.1027

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

```auto
zoommeeting = zoomsdk.GetMeeting();
zoommeetingshare = zoommeeting.GetMeetingShare();
zoommeetingshare.MeetingShare_StartAppShare({
      zn_hShare_app: `???`
    },
  );

```

**Smartphone (please complete the following information):**

- Device: Dell
- OS: Windows 10

---

<div class="post-metadata">

**Author:** ![karens](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/karens/32/42121_2.png) [@karens](https://devforum.zoom.us/u/karens)\
**Post date:** [December 1, 2020, 4:48pm UTC](https://devforum.zoom.us/t/meetingshare-startappshare-example/36638/2 "2020-12-01T16:48:41Z")

</div>

The ideal solution would be if Zoom SDK could provide a method to get all the running applications which are available for sharing, just like in the Zoom app itself.

It already works like that for the lists of microphones, speakers and camera devices. Would be good for consistency. Otherwise the developers will need to install 3rd-party native windows/mac libraries.

I would be very happy to support you testing this functionality.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [December 10, 2020, 11:36pm UTC](https://devforum.zoom.us/t/meetingshare-startappshare-example/36638/3 "2020-12-10T23:36:40Z")

</div>

Hey @karens,

Thanks for using the dev forum!

That is a good suggestion. I will let the team know. For now, can you try using the enumWindows API [https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumwindows](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumwindows)?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![karens](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/karens/32/42121_2.png) [@karens](https://devforum.zoom.us/u/karens)\
**Post date:** [December 17, 2020, 3:32pm UTC](https://devforum.zoom.us/t/meetingshare-startappshare-example/36638/4 "2020-12-17T15:32:34Z")

</div>

Hi Michael,

Thanks for your reply. Your suggestion works, although the procedure does not return Applications which are opened by Electron.  
The combinations of these functions works:

```auto
const user32 = Library('user32.dll', {
    EnumChildWindows: [W.BOOL, [W.HWND, W.WNDENUMPROC, W.LPARAM]],
    EnumWindows: [W.BOOL, [W.WNDENUMPROC, W.LPARAM]],
    GetWindowThreadProcessId: [W.DWORD, [W.HWND, W.LPDWORD]],
    IsWindowVisible: [W.BOOL, [W.HWND]]
  });

```

This is far from ideal because of no Mac support, performance and limited support of ffi-napi library.  
If you could add a AppListing method to your roadmap, that would be fantastic.
