static ScriptProperties() { IntPtr ppScriptProperties; int pNumScripts; int num = Win32.ScriptGetProperties(out ppScriptProperties, out pNumScripts); if (Win32.Failed(num)) { Marshal.ThrowExceptionForHR(num); } ScriptsProps = new ScriptProperties[pNumScripts]; for (int i = 0; i < pNumScripts; i++) { long value = Marshal.ReadInt64(Marshal.ReadIntPtr(ppScriptProperties, i * IntPtr.Size)); ScriptsProps[i] = new ScriptProperties(value); } }