I know that IsValidReadPtr and IsValidWritePtr existed. But I have a friend with a problem and I suggested that he looks at the handle values.

Apart from INVALID_HANDLE_VALUE and NULL checking, is there a function which says "Yes, this is valid handle (maybe connected to some object)"?

Where does IsValidReadPtr exist? I can't find it with google. There is an IsBadReadPtr(), but M$ says its obsolete and not trustworthy.

>> is there a function which says "Yes
There is Microsoft's IsWindow(). Other than that -- no.


[edit]Oh I think I know where you found IsValidReadPtr -- in one of Microsoft's header files. But that is a macro which uses the now obsolete IsBadReadPtr().

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.