Hi Peter,
Peter wrote:
- If I am using SetLastError, it is not obvious to
me what error values I should be using there.
They should be a Win32 error message, the ones defined in winerror.h that aren't HRESULTs (so, lowish values, less then 32000 or so, not 0x80070002-ish).
- Can I assume that
Rtl{Enter,Leave}CriticalSection(), HeapFree(), ERR() and WARN() cannot fail (the latter two are presumably macros).
Mostly yes. If your critical section hasn't been initialized or has been deleted, {Enter,Leave} CriticalSection can hang or otherwise do weird things, but that won't happen "normally".
Should I, either in general, or in this case in particular, detect which Windows version is being used and behave appropriately
No--write it assuming the less restrictive case. A common way to get partway there is to handle the more restrictive (easier) case, and issue a FIXME and return an error if the caller passes NULL.
--Juan
__________________________________ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html