Maciej Katafiasz wrote:
+    if(GetLastError())
+    {
+      TRACE("Can't convert to WCHAR: %d\n", GetLastError());
+      goto clean_wfn;
+    }
This is not an appropriate way of testing for an API failure.
What is inappropriate and how should I fix it?

Most APIs don't change GLE on success. Some do but most often the behaviour is undocumented or changed between 9x/NT. You should check the return value which usually is either 0 or -1 (depends on the API) on failure.

Felix


Reply via email to