mozilla
Your Search Results

    NPN_CreateObject

    この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。

    « Gecko Plugin API Reference « Scripting plugins

    Summary

    Allocates a new NPObject.

    Syntax

    #include <npruntime.h>
     
    NPObject *NPN_CreateObject(NPP npp, NPClass *aClass);
    

    Parameters

    The function has the following parameters:

    <tt>npp</tt>
    The NPP indicating which plugin wants to instantiate the object.
    <tt>aClass</tt>
    The class to instantiate an object of.

    Returns

    The newly-allocated NPObject.

    Description

    If the given NPClass provides an allocate function it is used to allocate the storage for the object and the NPP argument passed to NPN_CreateObject() is passed along to that function. If no allocate function is provided, malloc() is called to allocate enough memory to hold an NPObject. The newly created NPObject's reference count is initialized to 1 before it is returned.

    ドキュメントのタグと貢献者

    タグ: 
    Contributors to this page: Sheppy
    最終更新者: Sheppy,