asp.net core uses middleware rather than modules.
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-8.0
you can easily write custom middleware that call c++. on windows only, you might be able to write the middleware in managed c++, but I'm not sure.
note: middleware does not implement the httpmodule application events.