View Single Post
Old 06-12-2024, 13:41
chants chants is offline
Join Date: Jul 2016
Posts: 787
Rept. Given: 42
Rept. Rcvd 50 Times in 31 Posts
Thanks Given: 698
Thanks Rcvd at 1,099 Times in 505 Posts
chants Reputation: 51
Is it hard to abstract the whole Win API I would think without having a way to define dependencies. Resources sometimes form a hierarchy and have to be closed in that order e.g. CloseServiceHandle on the service then the manager. But it's hard to do as eventually you are doing reference dependency checking similar to a garbage collector. M$FT wrapped the Win API using MFC for that reason as they could construct the hierarchy and encapsulate handles. Not to say this technique isn't usable in some common and simple everyday scenarios.
Reply With Quote