Add a note about commiting suicide

This commit is contained in:
Mike Griese 2021-01-06 09:52:40 -06:00
parent 977db464fa
commit bcbef340ba
2 changed files with 4 additions and 7 deletions

View file

@ -194,12 +194,6 @@ void AppHost::_HandleCommandlineArgs()
// use to send the actions to the app.
peasant.ExecuteCommandlineRequested({ this, &AppHost::_DispatchCommandline });
}
// TODO:projects/5 if we end up not creating a new window, we crash. I'm
// thinking this is because the XAML host is not happy about being torn
// down before it has a chance to do really anything. Is there some way
// to get the app logic without instantiating the entire app? or at
// least the parts we'll need for remoting?
}
// Method Description:

View file

@ -126,7 +126,10 @@ int __stdcall wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
AppHost host;
if (!host.HasWindow())
{
// return 0;
// If we were told to not have a window, exit early. Make sure to use
// ExitProcess to commit sepuku here. If you try just `return 0`, then
// the XAML app host will crash during teardown. ExitProcess avoids
// that.
ExitProcess(0);
}