4 Replies Latest reply on Jul 3, 2007 12:03 PM by France19

    Where does Coldfusion store the reference to server libraries (C++).dll's ?

    France19
      I am using a custom tag CFX_IMAGE. It is a .dll file which needs to be registered in the Coldfusion Administrator in order for Coldfusion to find this file. I would like to register this tag automatically with code versus having to manually register the .dll in the Coldfusion Administrator. Does anyone know where this reference is stored and how I would create this reference with code?
        • 1. Re: Where does Coldfusion store the reference to server   libraries   (C++).dll's ?
          Level 7
          France19 wrote:
          > I am using a custom tag CFX_IMAGE. It is a .dll file which needs to be
          > registered in the Coldfusion Administrator in order for Coldfusion to find this
          > file. I would like to register this tag automatically with code versus having
          > to manually register the .dll in the Coldfusion Administrator. Does anyone know
          > where this reference is stored and how I would create this reference with code?
          >


          I presume it is one of the neo-xxxx files in the lib folder, but I do
          not know which one. If you are brave enough, one should be able to edit
          this file with code, but the service needs to be restarted after a
          change for new data to take effect.
          • 2. Re: Where does Coldfusion store the reference to server   libraries   (C++).dll's ?
            France19 Level 1
            Thanks.....after looking around I see that it gets written to the neo-runtime.xml file
            • 3. Re: Where does Coldfusion store the reference to server libraries (C++).dll's ?
              c_wigginton Level 1
              Assuming JAVA object creation hasn't been locked out, here is a scripted method for a cfx install.
              The example below is an install of the nslookup.dll located in the same directory as the installation template


              <cfobject action="CREATE"
              type="JAVA"
              class="coldfusion.server.ServiceFactory"
              name="factory">

              <cfset request.runtime = factory.getRuntimeService()>
              <cfscript>
              tagname = "CFX_NSLookup";
              if ( structKeyExists(request.runtime.cfxtags, tagname) )
              {
              //delete the tag name, so when we add a new one it will trigger store()
              //(adding and removing are the only things that triger the store() method.)
              StructDelete( request.runtime.cfxtags, tagname);
              }
              // CPP for dll
              // or JAVA
              stCFXs = structNew();
              stCFXs[tagname] = StructNew();
              stCFXs[tagname].name = tagname;
              stCFXs[tagname].type = "CPP";
              stCFXs[tagname].description = "Provides NSLookup by TCP/IP, used by application for logging.";
              stCFXs[tagname].cache = false;
              stCFXs[tagname].procedure = "ProcessTagRequest";
              stCFXs[tagname].library = "#expandPath('.')#\nslookup.dll";
              // store this tag
              request.runtime.cfxtags[tagname] = stCFXs[tagname];
              </cfscript>
              • 4. Re: Where does Coldfusion store the reference to server libraries (C++).dll's ?
                France19 Level 1
                Thank you! This was the information I needed. I tested this with my tag and it was registered successfully in the Coldfusion Administrator by using the script.