Commits

nat_linden committed 9b7c5bf

More FormatMessage compile errors, try again to fix

Comments (0)

Files changed (1)

indra/llcommon/tests/llsdserialize_test.cpp

         if (0 == GetTempFileNameA(mPath.c_str(), ext.c_str() + pfx_offset, 0, tempname))
         {
             // I always have to look up this call...  :-P
-            LPVOID msgptr;
+            LPSTR msgptr;
             FormatMessageA(
                 FORMAT_MESSAGE_ALLOCATE_BUFFER | 
                 FORMAT_MESSAGE_FROM_SYSTEM |
                 NULL,
                 GetLastError(),
                 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-                LPTSTR(&msgptr),
+                LPSTR(&msgptr),     // have to cast (char**) to (char*)
                 0, NULL );
             LL_ERRS("NamedTempFile") << "GetTempFileName(\"" << mPath << "\", \""
                                      << (ext.c_str() + pfx_offset) << "\") failed: "