npruntime sample plugin crashes (Windows)

Sarah Steinhour <[email protected]>
Newsgroups gmane.comp.mozilla.devel.plugins
Organization http://groups.google.com
Message-ID <[email protected]>
Hello,
I'm trying to learn how to write a NPAPI plugin that can be called
from javascript in the browser.  After a certain amount of head-
scratching, I was able to build the npruntime sample (from
http://mxr.mozilla.org/seamonkey/source/modules/plugin/samples/npruntime/).
The sample does create a window in the browser, but whenever I try
clicking on one of the buttons on the test page to call a method in
the plugin, I get a crash in my plugin.  The call stack indicates that
I have an access violation in mozutils.dll.  (In some cases, the call
stack indicates that this dll is calling into _RtlEnterCriticalSection
in ntdll.dll.)

I've tried some of the obvious things: switching between unicode and
ascii, changing the struct byte alignment, changing the calling
convention, trying to link to different libs in the gecko sdk.
Nothing I have thought of so far helps.

I built against the version 10 SDK, and I am running Firefox version
10.0.2.  The sample project is from 2007, so I am not sure if
something is out of date there.

Does anyone have any ideas on why I am crashing?

Wayne
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.