How to find size of a semaphore object in windows? I tried using sizeof() but we cannot give name of the sempahore object as an argument to sizeof. It has to be the handle. sizeof(HANDLE) gives us the size of handle and not semaphore.

Recommended Answers

All 3 Replies

My guess is that a semaphore is just a system DWORD since all it does is count from 0 to some maximum value. See this link

My guess is that a semaphore is just a system DWORD since all it does is count from 0 to some maximum value. See this link

I seriously doubt that.

Its hard telling what the actual object is because it's Microsoft internal.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.