Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8288593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:18:43+00:00 2026-06-08T12:18:43+00:00

I got my header files from: http://code.google.com/p/npapi-sdk/source/browse/?r=7#svn%2Fwiki So in the Initialize method, I stored

  • 0

I got my header files from: http://code.google.com/p/npapi-sdk/source/browse/?r=7#svn%2Fwiki

So in the Initialize method, I stored a pointer to all of the browser NPN methods like so

static NPNetscapeFuncs* browser;

NPError NP_Initialize(NPNetscapeFuncs* browserFuncs)
{  
  /* Save the browser function table. */
  browser = browserFuncs;

  return NPERR_NO_ERROR;
}

When I am creating my NPClass struct, should I just assign it the already existing browser functions like this:

struct NPClass class;
class.hasMethod = browser-> hasmethod;
etc.

Or do I need to implement the functions in the npruntimeheader using the browser funcs and assign them to the class that way. Example:
class.hasMethod = NPN_HasMethod;

And then implement the function below:

bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName)
{
   return browser->hasmethod(npp, npobj, methodName);
}

Or are the NPN functions in the runtime header already implemented somehow?

I need to write this in c, and I don’t think using firebreath would be a great idea for this particular project. Thanks in advance for your help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:18:44+00:00Added an answer on June 8, 2026 at 12:18 pm

    You need to implement the functions for your NPClasses yourself, they define the behaviour of your scriptable objects. Part three of taxilians NPAPI tutorial covers this.

    The functions that you receive via the browser function table are for calling into the browser (and already implemented there), e.g. to get information about NPObjects with hasmethod etc.

    However the function declarations like NPN_HasMethod() need to be implemented by you if you want to use them, at their simplest just calling the corresponding functions in browser as you have shown with HasMethod().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got 12 .php files with this code: if($_GET['u']){ $srcp = imagecreatefrompng(http://www.minecraft.net/skin/.$_GET['u']..png); $destp =
http://scienceoss.com/read-excel-files-from-python/comment-page-1/#comment-1051 From the above link, I used this utility to read an XLS file.
I got this cookie returned from web-server in Set-Cookie header: PHPSESSID=462rutd8g0sbg9sinh3hqa2ol6; path=/,wordpress_test_cookie=WP+Cookie+check; path=/,wordpress_ca07030412dd7fcd4dbeaae0bd9f5df9=testemail@example.com; expires=Sun,
I've got this code on my page: header(Location: $page); $page is passed to the
Can't get Location header from response at all. Wireshark says that i've got one:
I've got a macro that adds the copyright header to my VB files, but
I am using open source C++ library DCMTK from http://dicom.offis.de/dcmtk.php.en . I have successfully
I got the following generated code from sudzC and the generated code showing error.
I have got lots of ideas from google and stackoverflow- but none of those
I was trying to make a sample code run download by the link http://www.magtek.com/support/software/downloads/sw/99510108.zip

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.