AccessViolationException when trying to call JS_HasProperty

Topics: Developer Forum
Apr 3, 2009 at 9:13 AM
I am trying to check for a property on the global object, like so:

IntPtr isWindowDefined = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(bool)));
JS.JS_HasProperty(cxPtr, globalClassPtr, "window", isWindowDefined);
I get an AccessViolationException on the second line above. What am I doing wrong?