Object Plugin Container

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • reteset
    Indigo Rose Customer
    • May 2006
    • 1692

    Object Plugin Container

    Hi
    i have opened this thread for the discuss a solution to build object plugins from other languages
    RizlaUK had asked for many times about possible ways for this ,i promised him for a solution but i could not gave anything back for a long time

    i also tried to modify my plugin compiler application to create object plugins from Lua code , at least i was going to port IRPluginObject class members to Lua callback functions ,other properties would be updated by compiler application (version ,outhor info etc.)
    i abandoned that idea after 100s of unsuccessful attempts to get it to work

    now i have to remove Lua from posibilities list

    another idea was building a static library for other language authors
    but i can simply say that this will not work too , there are some C style callback solutions but , it will look like driving a car from its trunk

    the final and possible idea is :
    building a container object plugin (i'll call it like Proxy object) , but this will not like an object plugin this will only be a bridge between your dll and AMS-8
    for example i will give it as a DLL, you will rename it as your plugin name ,for example ProgressEx.apo
    and you will rename your actual dll with the same name but extension will be dll for example ProgressEx.dll
    and finally you will put these two files into a folder called ProgressEx
    after include a ProgressEx.lic document , you are ready to go

    so , when AMS-8 (IDE or Runtime) loads ProgressEx.apo it will search for a dll file with the same name and load that dll with late bind method

    when AMS-8 calls a standard plugin action from ProgressEx.apo it will
    call related function from your dll (simply redirection)
    your dll must export specified functions ( i'll tell you later)

    for IRPluginObject class members :
    Proxy object will return a derived instance of it to AMS-8 (when asked) and when AMS-8 calls a member function of class
    Proxy object will call specified function from your Dll (i'll tell you later)

    that's all for now , if you are interested in with this idea please write your comments ,ideas, requests here
    amsplugins.com Is Closed.

    Facebook Page
  • RizlaUK
    Indigo Rose Customer
    • May 2006
    • 5552

    #2
    seems i came back to the forum at just the right time, this sounds just what i need, and is also exactly what iv been asking for "some kind of bridge between the IRObject class and other languages"

    i know this is pushing my luck a little, how would the property window be handled, would we be able to make use of the window and set object parameters at design time

    anyhow, great idea, how far is this system, just a idea or any actual working solution ?

    Christmas is looking up guys :yes


    And on a personal note, i Thank you reteset for persevering with this idea, i know you have already put much work into a object system we can use in PB and other languages, you are a true gentleman
    Embrace change in your life, you never know, it could all work out for the best

    Comment

    • Imagine Programming
      Indigo Rose Customer
      • Apr 2007
      • 4252

      #3
      I was so pleased to see my inbox today, this is truly a splendid idea Reteset. And, the
      idea you came up with is very clean as well, a dll, apo and lic, that's all, very nice.

      So, every available member of the IRPluginObject class will basicly be redirected to
      the DLL we produce? This would mean everything is possible, as in a normal APO correct?

      Reteset, you are one amazing creative lad! :yes
      Thank you very much, this would enlarge the range of languages that can be used for AMS Object Plugin development!
      Bas Groothedde
      Imagine Programming :: Blog

      AMS8 Plugins
      IMXLH Compiler

      Comment

      • reteset
        Indigo Rose Customer
        • May 2006
        • 1692

        #4
        Originally posted by RizlaUK View Post
        i know this is pushing my luck a little, how would the property window be handled, would we be able to make use of the window and set object parameters at design time
        i will redirect CIRPluginObject::ShowProperties(char* szPluginFolder);
        you will show your properties dialog and save your properties in your dll
        and when CIRPluginObject::GetCustomProperties(char* szBuffer, int* pnBufferSize); called you will return your properties to AMS in a delimited string form
        finally when AMS calls
        CIRPluginObject::SetCustomProperties(char* szPropsList);
        you will update your properties by parsing this delimited string

        Originally posted by RizlaUK View Post
        anyhow, great idea, how far is this system, just a idea or any actual working solution ?
        currently there is no working plugin ,i have created this thread for the go with your ideas
        because if i build this like i want you can not use this

        Originally posted by Imagine Programming View Post
        So, every available member of the IRPluginObject class will basicly be redirected to
        the DLL we produce? This would mean everything is possible, as in a normal APO correct?
        yes basicly i will create a dll that acts like an object plugin but when AMS-8 asks for something ,it will redirect requests to your dll with flat functions


        currently i have no working demo yet , but it seems that this is only way to go and worth to try

        currently i have a project called Proxy Object
        i added standard plugin function redirections
        Code:
        void  Object_CreateObject(); //informational no need to do anything
        void  Object_DeleteObject(); //informational no need to do anything
        int   GetPluginName(char* szBuffer, int* pnBufferSize);
        int   GetPluginVersion(char* szBuffer, int* pnBufferSize);
        int   GetIRPluginObjectVersion(); // optional - if not exported by your dll , a proper value will be returned by plugin
        int   GetAuthorInfo(char* szBuffer, int* pnBufferSize);
        int   GetPluginActionXML(char* szBuffer, int* pnBufferSize);
        bool  ShowHelpForAction(char* lpszActionName, char* lpszPluginPath, HWND hParentWnd);
        bool  ShowHelpForPlugin(char* lpszPluginPath, HWND hParentWnd);
        bool  ValidateLicense(char* lpszLicenseInfo);
        int   GetLuaVersion(char* szBuffer, int* pnBufferSize);// optional - if not exported by your dll , a proper value will be returned by plugin
        also some questions can you return structs By Ref

        PHP Code:
        #define IR_PLUGIN_EVENT_NAME_MAX 200
        #define IR_PLUGIN_EVENT_ARGS_MAX 1000

        struct IRPluginEventInfo
        {
            
        char m_szName[IR_PLUGIN_EVENT_NAME_MAX];
            
        char m_szArgs[IR_PLUGIN_EVENT_ARGS_MAX];
        }; 
        another one is SIZE (like you know from WINAPI)

        if not i can flatten them too
        amsplugins.com Is Closed.

        Facebook Page

        Comment

        • Imagine Programming
          Indigo Rose Customer
          • Apr 2007
          • 4252

          #5
          Yes we can, we can return everything ByRef basicly. The only issue with PB and Object plugins is the
          part where you need the class, which is not possible to code in PureBasic.

          Code:
          #IR_PLUGIN_EVENT_NAME_MAX = 200
          #IR_PLUGIN_EVENT_ARGS_MAX = 1000
          
          Structure IRPluginEventInfo
            m_szName.s{#IR_PLUGIN_EVENT_NAME_MAX}
            m_szArgs.s{#IR_PLUGIN_EVENT_ARGS_MAX}
          EndStructure
          
          
          Define PrgEx_OnKey.IRPluginEventInfo
          
          With PrgEx_OnKey
            \m_szName = "OnKey"
            \m_szArgs = "e_Key"
          EndWith
          
          
          *ptr = @PrgEx_OnKey
          Reteset, do you have an example of an Object plugin (some example code) that is in one file? I've always found
          it hard to understand the IR SDK sources, because of all the classes and seperate files.

          And again, very nice thinking :yes
          Bas Groothedde
          Imagine Programming :: Blog

          AMS8 Plugins
          IMXLH Compiler

          Comment

          • reteset
            Indigo Rose Customer
            • May 2006
            • 1692

            #6
            Originally posted by Imagine Programming View Post
            Reteset, do you have an example of an Object plugin (some example code) that is in one file? I've always found
            it hard to understand the IR SDK sources, because of all the classes and seperate files.
            no , even if it is possible , i have not got a plugin or program with single file
            also it is really good the have multible files for each class or function set or includes
            like you know C++ is a bit complex than other programing languages

            for example ListBoxEx plugin's projetc folder contains 403 files
            amsplugins.com Is Closed.

            Facebook Page

            Comment

            • Imagine Programming
              Indigo Rose Customer
              • Apr 2007
              • 4252

              #7
              I can fully understand that, it's easier to divide each part of a project in a seperate file.
              That's what I do in PureBasic as well, however I find it hard to understand the object
              plugin SDK by looking at the C++ sources.

              ProgressEx is only 21 files The power of PureBasic haha
              Bas Groothedde
              Imagine Programming :: Blog

              AMS8 Plugins
              IMXLH Compiler

              Comment

              • RizlaUK
                Indigo Rose Customer
                • May 2006
                • 5552

                #8
                Hey reteset

                i dont want to hasstle you, but any timeframe on this
                Embrace change in your life, you never know, it could all work out for the best

                Comment

                • reteset
                  Indigo Rose Customer
                  • May 2006
                  • 1692

                  #9
                  Originally posted by RizlaUK View Post
                  Hey reteset

                  i dont want to hasstle you, but any timeframe on this
                  Proxy object is %100 completed and works
                  i am working on the child dll sample
                  you know a dll can only be loaded once , so there is a multiple instances problem
                  i found a ClassID solution to this ,so each class instance will call functions with an ID from your dll
                  and you will control object instances through their IDs

                  maybe i can show a working sample today or tomorrow
                  amsplugins.com Is Closed.

                  Facebook Page

                  Comment

                  • Imagine Programming
                    Indigo Rose Customer
                    • Apr 2007
                    • 4252

                    #10
                    Originally posted by reteset View Post
                    Proxy object is %100 completed and works
                    i am working on the child dll sample
                    you know a dll can only be loaded once , so there is a multiple instances problem
                    i found a ClassID solution to this ,so each class instance will call functions with an ID from your dll
                    and you will control object instances through their IDs

                    maybe i can show a working sample today or tomorrow
                    You rock! Amazing!
                    Bas Groothedde
                    Imagine Programming :: Blog

                    AMS8 Plugins
                    IMXLH Compiler

                    Comment

                    • reteset
                      Indigo Rose Customer
                      • May 2006
                      • 1692

                      #11
                      now i have a fully working hybrid object plugin , wooo!
                      it works perfect

                      however you will wait until tomorrow ,because i need to prepare a clean package , and it is about going to morning here , so i will post files tomorrow


                      need to sleep few hours
                      amsplugins.com Is Closed.

                      Facebook Page

                      Comment

                      • Imagine Programming
                        Indigo Rose Customer
                        • Apr 2007
                        • 4252

                        #12
                        Originally posted by reteset View Post
                        now i have a fully working hybrid object plugin , wooo!
                        it works perfect

                        however you will wait until tomorrow ,because i need to prepare a clean package , and it is about going to morning here , so i will post files tomorrow


                        need to sleep few hours
                        Oh my god you rock! Take a good rest mate, don't rush it
                        This is actually perfect, a beautiful solution :yes
                        Bas Groothedde
                        Imagine Programming :: Blog

                        AMS8 Plugins
                        IMXLH Compiler

                        Comment

                        • RizlaUK
                          Indigo Rose Customer
                          • May 2006
                          • 5552

                          #13
                          Tomorrow is perfect, last day of work and a new toy to play with

                          Thanks for all your hard work, you know this is something i have wanted for a long time, to echo my friends words "you rock" :yes
                          Embrace change in your life, you never know, it could all work out for the best

                          Comment

                          • reteset
                            Indigo Rose Customer
                            • May 2006
                            • 1692

                            #14
                            Ok , here it is

                            Contents Of Package :
                            ProxyLL :
                            this folder contains a dll called Proxy.dll , this is the dll that you will use as a bridge for your plugin

                            Release :
                            this folder contains an installable AMS-8 plugin built with Proxy.dll , a demonstration of WinButton

                            DllSources :
                            this folder contains sample C++ projects ,currently there is only a windowed object sample made with Visual Studio .Net 2003
                            note: if you do not have visual studio you can open MyButton.cpp and MyButton.h
                            with your favourite text editor, all the plugin codes in that two files

                            How To Use Proxy Object Dll;
                            you will rename it as your plugin name ,for example ProgressEx.apo
                            and you will rename your actual dll with the same name but extension will be dll for example ProgressEx.dll
                            and finally you will put these two files into a folder called ProgressEx
                            after include a ProgressEx.lic document , you are ready to go


                            for more info please read ReadMe.html in the package


                            Notes :
                            • The proxy.dll object is a BETA product and it is not recomended to share a plugin built with it until a stable version is released
                            • The Proxy object source is not available and it will not be available
                            • The author of this product assumes that you are a qualified person to write windows dlls
                            • If you do not know what this product does and if you do not have knowledge about programming languages please do not try to run any of the Dlls in this package EXCEPT the files in Release folder


                            i am going to remove this attachment when i release a newer version , please always check my last post
                            Attached Files
                            amsplugins.com Is Closed.

                            Facebook Page

                            Comment

                            • RizlaUK
                              Indigo Rose Customer
                              • May 2006
                              • 5552

                              #15
                              Thank You So Much :yes

                              looking into it right away, will read the files and maybe start a framework, will post back tomorrow

                              Great Work
                              Embrace change in your life, you never know, it could all work out for the best

                              Comment

                              Working...
                              X