[NTOBJSHEX]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 23 Feb 2015 16:28:13 +0000 (16:28 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 23 Feb 2015 16:28:13 +0000 (16:28 +0000)
- Fix headers.
- Fix MSVC warning C4200: nonstandard extension used : zero-sized array in struct/union.

[PSDK]
Fix MSVC warning C4200: nonstandard extension used : zero-sized array in struct/union. Note to Wine synchronizers and PSDK maintainers: those MIB* structures should go into a tcpmib.h header instead.

svn path=/trunk/; revision=66425

reactos/dll/shellext/ntobjshex/ntobjns.cpp
reactos/dll/shellext/ntobjshex/ntobjns.h
reactos/dll/shellext/ntobjshex/ntobjshex.cpp
reactos/dll/shellext/ntobjshex/ntobjutil.h
reactos/include/psdk/iprtrmib.h

index 94eb481..4be438a 100644 (file)
@@ -1,10 +1,10 @@
 /*
-* PROJECT:     ReactOS shell extensions
-* LICENSE:     GPL - See COPYING in the top level directory
-* FILE:        dll\shellext\ntobjshex\ntobjns.cpp
-* PURPOSE:     NT Object Namespace shell extension
-* PROGRAMMERS: David Quintana <gigaherz@gmail.com>
-*/
+ * PROJECT:     ReactOS shell extensions
+ * LICENSE:     GPL - See COPYING in the top level directory
+ * FILE:        dll\shellext\ntobjshex\ntobjns.cpp
+ * PURPOSE:     NT Object Namespace shell extension
+ * PROGRAMMERS: David Quintana <gigaherz@gmail.com>
+ */
 
 #include "precomp.h"
 #include "ntobjutil.h"
index ba84911..3203847 100644 (file)
@@ -1,10 +1,9 @@
 /*
- * PROJECT:     ReactOS system libraries
+ * PROJECT:     ReactOS shell extensions
  * LICENSE:     GPL - See COPYING in the top level directory
- * FILE:        dll\win32\stobject\stobject.cpp
- * PURPOSE:     Systray shell service object
- * PROGRAMMERS: Robert Naumann
- David Quintana <gigaherz@gmail.com>
+ * FILE:        dll\shellext\ntobjshex\ntobjns.h
+ * PURPOSE:     NT Object Namespace shell extension
+ * PROGRAMMERS: David Quintana <gigaherz@gmail.com>
  */
 #pragma once
 
index bc996cd..27f96f3 100644 (file)
@@ -1,10 +1,9 @@
 /*
- * PROJECT:     ReactOS system libraries
+ * PROJECT:     ReactOS shell extensions
  * LICENSE:     GPL - See COPYING in the top level directory
- * FILE:        dll\win32\stobject\stobject.cpp
- * PURPOSE:     COM registration services for STobject.dll
- * PROGRAMMERS: Robert Naumann
- David Quintana <gigaherz@gmail.com>
+ * FILE:        dll\shellext\ntobjshex\ntobjshex.cpp
+ * PURPOSE:     NT Object Namespace shell extension
+ * PROGRAMMERS: David Quintana <gigaherz@gmail.com>
  */
 
 #include "precomp.h"
index ff28535..299c3b0 100644 (file)
@@ -22,7 +22,7 @@ extern "C" {
 #include <ndk/rtlfuncs.h>
 }
 
-// All the possible values are defined here because I want the type field to be 
+// All the possible values are defined here because I want the type field to be
 // "persistable" and not change if more types are added in the future.
 enum OBJECT_TYPE {
     DIRECTORY_OBJECT, SYMBOLICLINK_OBJECT,
@@ -34,7 +34,7 @@ enum OBJECT_TYPE {
 
     UNKNOWN_OBJECT_TYPE = -1
 };
-extern const LPCWSTR ObjectTypeNames [];
+extern const LPCWSTR ObjectTypeNames[];
 
 #define NT_OBJECT_PIDL_MAGIC (USHORT)0x9A03
 
@@ -45,25 +45,25 @@ struct NtPidlEntry
     USHORT magic; // 0x9A03 ~~~ "NTOB"
 
     // If this is -1, there will be a NtPidlTypeData following this, and before any other extensions
-    OBJECT_TYPE        objectType;
+    OBJECT_TYPE objectType;
 
     OBJECT_BASIC_INFORMATION objectInformation;
 
     USHORT entryNameLength;
-    WCHAR entryName[0];
+    WCHAR entryName[ANYSIZE_ARRAY];
 
 };
 
 struct NtPidlTypeData
 {
     USHORT typeNameLength;
-    WCHAR typeName[0];
+    WCHAR typeName[ANYSIZE_ARRAY];
 };
 
 struct NtPidlSymlinkData
 {
     USHORT targetNameLength;
-    WCHAR targetName[0];
+    WCHAR targetName[ANYSIZE_ARRAY];
 };
 #include <poppack.h>
 
index a2298df..7337004 100644 (file)
@@ -327,7 +327,7 @@ typedef struct _MIB_TCPROW_OWNER_PID {
 
 typedef struct {
   DWORD                dwNumEntries;
-  MIB_TCPROW_OWNER_PID table[0];
+  MIB_TCPROW_OWNER_PID table[1];
 } MIB_TCPTABLE_OWNER_PID, *PMIB_TCPTABLE_OWNER_PID;