Closed NilsHoyer closed 2 months ago
That is curious. There is nothing too special about this implementation. Threading model? COM initialization? Annotating the class with [ComVisible(true)]
maybe?
[ComVisible(true)] and CoInitializeEx() doesn't help.
Now I will try to get the INetwirkLostManager object on the recommended way:
INetworkListManager *pNetworkListManager = NULL;
HRESULT hr = CoCreateInstance(CLSID_NetworkListManager, NULL,
CLSCTX_ALL, IID_INetworkListManager,
(LPVOID *)&pNetworkListManager);
If this doesn't work, I will mention this issue to the MAUI developers.
I didn't find a solution, so I will inform the MAUI project about this issue.
I'm trying to catch the events of the NetworkListManager, and it works fine for me in a simple .Net Core 8.0 project. But not for a .Net MAUI project.
Can you imagine, that this is a problem of your code? If not, I will try to find a Microsoft member to take a look at this.
My code:
Both methods will never executed.