More about Flajector
Flajector is based on FlashPlayerControl - is an ultimate flash component for developers
Flajector Help

Plugins

The application generated by Flajector is able to use external DLLs, so-called plugins. The type PPLUGINFUNCTION defines a pointer to function that application is able to call from the plugin (see Plugins\Plugin.h in the installation folder of the Flajector):

typedef void (__stdcall *PPLUGINFUNCTION)(IPluginContext* pPluginContext);

The interface IPluginContext is declared as follows (see Plugins\Plugin.h in the installation folder of the Flajector):

DECLARE_INTERFACE_(IPluginContext, IUnknown)
{
    STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    STDMETHOD_(ULONG,Release)(THIS) PURE;

    STDMETHOD(SetVariable)(THIS_ BSTR bstrName, BSTR bstrValue) PURE;
    STDMETHOD(GetVariable)(THIS_ BSTR bstrName, BSTR* pbstrValue) PURE;
};

The interface IPluginContext is for passing / retrieving the data between Actionscript code and the code of the plugin. In actionscript code you can set values of some variables (input data), then call the plugin, the plugin retrieves the values using IPluginContext, does its job, sets values of some variables (output data):

on(click)
{
    var TestPlugin: Plugin = new Plugin;

    TestPlugin.Load("TestPlugin.dll");

    TestPlugin.CallFunction("BrowseForFolder");

    if (TestPlugin.GetVariable("Result") == "1")
        this._parent.TextArea1.text = TestPlugin.GetVariable("FolderPath");
    else
        this._parent.TextArea1.text = "<none>";

    TestPlugin.Unload();

    delete TestPlugin;
}


More about Flajector
Flajector is based on FlashPlayerControl - is an ultimate flash component for developers
Copyright © 2004 - 2005 Softanics. All rights reserved.
Macromedia and Shockwave Flash are trademarks of Macromedia, Inc.