CSXSInterface: Call to jsx-function with a string xml as parameter?

Hello

for me CSXSInterface worked very well so far with all the settings and the SyncResults.

Now, I do a few operations xml with actionscript 3 and photoshop scripts. I am able to return an XML from a function javascript to actionscript3 and do all kinds of operations with it. Somehow, I can't call a function with the string xml as parameter jsx? Does anyone have a solution for this?

Here is what I tried:

var xmlStr:String = _myXml.toXMLString(); // I tried _myXml.toString() too but it didnt work either ;-(
CSXSInterface.instance.evalScript("xmlFunction", xmlStr);

Thanks in advance!

Not for me it isn't...

I use Flash Builder (with Extension Builder added on) too, and I don't remember having seen a mistake HostObject of any kind. Import you the classes necessary?

Substances

Tags: Creative Suites

Similar Questions

  • How to call the java function with javascript setting in mobile adf?

    How to call the java function with javascript setting in mobile adf?

    The ADF Mobile utility container API can be used from JavaScript or Java.

    Application container API - 11 g Release 2 (11.1.2.4.0)

  • How to call a stored procedure with a REF CURSOR output parameter

    I'm looking forward to example calling a function/stored procedure with a REF CURSOR output parameter and get the result.
    In other words, I have a stored function/procedure that runs a SELECT statement using the OCI library and then he could get the values of each row and each column.

    I put a code snippet, it have only the main thing to call a simple stored procedure and to print the name of each column of the cursor, but I couldn t to print out values in the table that calls the stored procedure.
    I understand that the next step is to call an OCIStmtFetch.
    How to associate the slider with the OCIStmtFetch?

    If you need more information, just tell me.

    I use ANSI C with HP - UX (HP - UX C) operating system and Oracle 10 g.


    Kind regards.

    Antonio Garcia


    / * callOracleSP * /.

    #include < stdio.h >
    #include < string.h >
    #include < oci.h >
    #include < stdlib.h > to

    char * pConnectChar = "Server";
    char * pUsernameChar = "user";
    char * pPasswordChar = "passwd";
    char * sqlCharArray1 = "BEGIN SP_GETCITIES (:,: c); END; « ;
    int retval;
    UB4 parmcnt = 0;
    UB4 pos2 = 0;
    text * pcoln [20];
    UB4 namelen [20];
    char state_key [5];

    OCIStmt * pOciStatement;
    OCIStmt * pOciStatCursor;
    OCIError * pOciError;
    OCIEnv * pOciEnviron;
    OCIServer * pOciServer;
    OCISession * pOciSession;
    OCISvcCtx * pOciServiceContext;
    OCIBind * pOciBind [500];
    OCIParam * pOciParam;


    int main()
    {
    retval = OCIEnvCreate (& pOciEnviron, OCI_DEFAULT, NULL, NULL, NULL, NULL, 0, NULL);
    retval = OCIEnvInit (& pOciEnviron, OCI_DEFAULT, 0, NULL);
    retval = OCIHandleAlloc (pOciEnviron, (void *) & pOciError, OCI_HTYPE_ERROR, 0, NULL);
    retval = OCIHandleAlloc (pOciEnviron, (void *) & pOciServiceContext, OCI_HTYPE_SVCCTX, 0, NULL);
    retval = OCIHandleAlloc (pOciEnviron, (void *) & pOciStatement, OCI_HTYPE_STMT, 0, NULL);

    retval = OCILogon (pOciEnviron, pOciError, & pOciServiceContext,(unsigned char *) pUsernameChar,
    strlen (pUsernameChar), (unsigned char *) pPasswordChar, strlen (pPasswordChar).
    (unsigned char *) pConnectChar, strlen (pConnectChar));
    printf ("retval=%d\n",retval OCILogon);

    retval = OCIStmtPrepare (pOciStatement, pOciError, (unsigned char *) sqlCharArray1, strlen (sqlCharArray1),)
    OCI_NTV_SYNTAX, OCI_DEFAULT);
    printf ("StmtPrepare retval=%d\n",retval);

    retval = OCIHandleAlloc (pOciEnviron, (void *) & pOciStatCursor, OCI_HTYPE_STMT, 0, NULL);
    retval = 1 OCIBindByPos(pOciStatement,&pOciBind[0], pOciError, (ub4), (void *) & state_key,)
    ((sb4) sizeof (state_key), SQLT_STR, (void *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT (ub4));
    printf ("BindByPos OCI_HTYPE_STMT retval=%d\n",retval);

    retval = OCIBindByPos(pOciStatement,&pOciBind[1], pOciError, (ub4) 2, (void *) & pOciStatCursor,)
    ((sb4) 0, SQLT_RSET, (void *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT (ub4));
    printf ("BindByPos OCI_HTYPE_STMT retval=%d\n",retval);

    strcpy (state_key, 'ca');

    retval = OCIStmtExecute (pOciServiceContext, pOciStatement, pOciError, (ub4) 1, (ub4) 0,)
    (OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT (ub4));
    printf ("StmtExecute retval=%d\n",retval);

    / * How to get the values of the cursor? */

    / * Number of parameters of the cursor * /.
    OCIAttrGet ((void *) pOciStatCursor, OCI_HTYPE_STMT (ub4), (void *) & parmcnt,(ub4 *) 0,)
    (ub4) (OCI_ATTR_PARAM_COUNT, pOciError);
    printf ("\nNumber of the slider settings = %d\n",parmcnt);

    for (int pos = 1; pos < = (int) parmcnt; pos ++)
    {
    OCIAttrGet ((void *) pOciStatCursor, OCI_HTYPE_STMT (ub4), (void *) & pos2,(ub4 *) 0,)
    (ub4) (OCI_ATTR_CURRENT_POSITION, pOciError);
    retval = OCIParamGet ((void *) pOciStatCursor, OCI_HTYPE_STMT (ub4), pOciError, (void *) & pOciParam,)
    POS (ub4));
    OCIAttrGet pOciParam, (ub4) ((void*) OCI_DTYPE_PARAM,(void*) & pcoln [pos - 1],(ub4 *) & namelen [pos-1],)
    (ub4) OCI_ATTR_NAME,(OCIError *) pOciError);
    }
    for (int i = 1; i < = (int) parmcnt; i ++)
    printf ("%i\tNAME = % column. ("* s\n", i, namelen [i-1], pcoln [i-1]);

    return 0;
    }


    This is the script that create the table, insert records and create the stored procedure

    CREATE TABLE CITIES)
    STATE_CODE VARCHAR2 (2) NULL,
    CITY_CODE NUMBER (15.5) NULL,
    CITY_NAME VARCHAR2 (30) NULL
    )
    /


    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('CA', 30, 'SAN DIEGO')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('CA', 40 'SACRAMENTO')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('FL', 10, 'MIAMI')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('FL', 20, 'ORLANDO')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('NEW YORK', 10, 'NEW YORK')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('NEW YORK', 20, 'ALBANY')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('CA', 10, 'LOS ANGELES')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('CA', 20, 'SAN FRANCISCO')
    /


    CREATE or REPLACE PACKAGE globalPkg AUTHID CURRENT_USER AS
    / * The following is specific global variables T/SQL. */
    TYPE RCT1 IS REF CURSOR; / * new cursor low definition * /.
    END globalPkg;
    /



    CREATE OR REPLACE PROCEDURE SP_ADDCITY)
    P_STATE_CODE IN VARCHAR,
    P_CITY_CODE NUMBER,
    P_CITY_NAME IN VARCHAR2,
    P_RETURN IN NUMBERS)
    AS
    StoO_error INTEGER;
    StoO_selcnt INTEGER;
    StoO_rowcnt INTEGER;
    StoO_errmsg VARCHAR2 (255);

    BEGIN
    StoO_rowcnt: = 0;
    StoO_error: = 0;
    StoO_selcnt: = 0;
    P_RETURN: = 0;
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES (P_STATE_CODE, P_CITY_CODE, P_CITY_NAME);
    StoO_rowcnt: = number of LINES SQL %;
    EXCEPTION
    WHEN TOO_MANY_ROWS THEN
    StoO_rowcnt: = 2;
    WHILE OTHERS THEN
    StoO_rowcnt: = 0;
    StoO_selcnt: = 0;
    StoO_error: = SQLCODE;
    StoO_errmsg: = SQLERRM;
    IF StoO_error! = 0 THEN
    BEGIN
    P_RETURN: = 1;
    RETURN;
    END;
    END IF;
    END;
    /

    CREATE OR REPLACE PROCEDURE SP_GETCITIES)
    STATE_KEY IN VARCHAR,
    RC1 IN OUT globalPkg.RCT1)
    AS
    StoO_error INTEGER;
    StoO_selcnt INTEGER;
    StoO_rowcnt INTEGER;
    StoO_errmsg VARCHAR2 (255);
    BEGIN
    StoO_rowcnt: = 0;
    StoO_error: = 0;
    StoO_selcnt: = 0;
    OPEN FOR RC1
    SELECT STATE_CODE, CITY_CODE, FRANCISCO
    CITIES
    WHERE STATE_CODE = STATE_KEY
    ORDER BY CITY_CODE;
    StoO_rowcnt: = number of LINES SQL %;
    EXCEPTION
    WHILE OTHERS THEN
    StoO_rowcnt: = 0;
    StoO_error: = SQLCODE;
    StoO_errmsg: = SQLERRM;
    END;
    /

    Hi Antonio,.

    I see this:

    c_buf=(ub1 **)calloc(sizeof(ub1 *),3);
    
    ...
    
    rc=OCIDefineByPos(pOciStatCursor,&pdef,(OCIError *)pOciError,pos,c_buf[pos-1],size+1,(ub2)type,(dvoid *)c_indp[pos-1],(ub2 *)0,(ub2 *)0,OCI_DEFAULT);
    

    That I don't understand. You allocate space for 3 pointers ub1 but I don't see where these pointers are then initialized to point to where the data is to be stored.

    I do not read correctly?

    Sorry for posting code long, but here is an example of code that I have. It is much more 'code' for your code, but maybe that will be enough...

    NOTE: This is just the code example and not rigorous. For example, I don't check the memory, allocations etc in this code!

    Kind regards

    Mark

    #ifdef WIN32
    #define _CRT_SECURE_NO_DEPRECATE 1
    #endif
    
    #include 
    #include 
    #include 
    #include 
    
    void checkerr(sword status, OCIError *errhp);
    
    int main(int argc, char *argv[]) {
      OCIEnv      *envhp = NULL;  /* OCI Environment handle     */
      OCIError    *errhp = NULL;  /* OCI Error handle           */
      OCISvcCtx   *svchp = NULL;  /* OCI Service Context handle */
      OCIServer   *srvhp = NULL;  /* OCI Server handle          */
      OCISession  *usrhp = NULL;  /* OCI User Session handle    */
    
      OCIStmt     *stmtp = NULL;  /* OCI Statement handle       */
      OCIStmt     *cursr = NULL;  /* OCI Statement handle       */
    
      OCIParam    *prmp1 = NULL;  /* OCI Parameter handle       */
      OCIParam    *prmp2 = NULL;  /* OCI Parameter handle       */
      OCIParam    *prmp3 = NULL;  /* OCI Parameter handle       */
    
      OCIDefine   *defp1 = NULL;  /* OCI Define handle          */
      OCIDefine   *defp2 = NULL;  /* OCI Define handle          */
      OCIDefine   *defp3 = NULL;  /* OCI Define handle          */
    
      OCIBind     *bndp1 = NULL;  /* OCI Bind handle            */
      OCIBind     *bndp2 = NULL;  /* OCI Bind handle            */
      OCIBind     *bndp3 = NULL;  /* OCI Bind handle            */
    
      /* used to hold column width */
      ub2 col_width;
    
      /* used to set the prefetch count */
      ub4 prefetch_count = 32;
    
      /* will hold output from database */
      oratext *pEmpId = NULL;
      oratext *pFirstName = NULL;
      oratext *pLastName = NULL;
    
      /* the anonymous block to execute */
      /* this opens a ref cursor        */
      oratext *sqlstmt = "begin " \
                         "  open :1 for " \
                         "  select   to_char(employee_id), " \
                         "           first_name, " \
                         "           last_name " \
                         "  from     hr.employees " \
                         "  order by last_name, " \
                         "           first_name; " \
                         "end;";
    
      /* used to hold the results of each OCI call */
      sword result = 0;
    
      /* Initialize and create a default environment  */
      result = OCIEnvCreate(&envhp,
                            OCI_DEFAULT,
                            (dvoid *) 0,
                            0,
                            0,
                            0,
                            (size_t) 0,
                            (dvoid **) 0);
    
      /* allocate an error handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &errhp,
                              OCI_HTYPE_ERROR,
                              0,
                              (dvoid **) 0);
    
      /* allocate a service context handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &svchp,
                              OCI_HTYPE_SVCCTX,
                              0,
                              (dvoid **) 0);
    
      /* allocate a server handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &srvhp,
                              OCI_HTYPE_SERVER,
                              0,
                              (dvoid **) 0);
    
      /* allocate a user session handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &usrhp,
                              OCI_HTYPE_SESSION,
                              0,
                              (dvoid **) 0);
    
      /* create a server context using the "ORADEMO" database */
      result = OCIServerAttach(srvhp,
                               errhp,
                               "ORADEMO",
                               (ub4) strlen("ORADEMO"),
                               OCI_DEFAULT);
    
      /* set the server attribute in the service context handle */
      result = OCIAttrSet((dvoid *) svchp,
                          OCI_HTYPE_SVCCTX,
                          (dvoid *) srvhp,
                          (ub4) 0,
                          OCI_ATTR_SERVER,
                          errhp);
    
      /* open the session with the database */
      /* using external authentication      */
      result = OCISessionBegin(svchp,
                               errhp,
                               usrhp,
                               OCI_CRED_EXT,
                               OCI_DEFAULT);
    
      /* set the user session attribute in the service context handle */
      result = OCIAttrSet((dvoid *) svchp,
                          OCI_HTYPE_SVCCTX,
                          (dvoid *) usrhp,
                          (ub4) 0,
                          OCI_ATTR_SESSION,
                          errhp);
    
      /* allocate the statement handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &stmtp,
                              OCI_HTYPE_STMT,
                              0,
                              (dvoid **) 0);
    
      /* prepare the statement for execution */
      result = OCIStmtPrepare(stmtp,
                              errhp,
                              sqlstmt,
                              (ub4) strlen((char *) sqlstmt),
                              OCI_NTV_SYNTAX,
                              OCI_DEFAULT);
    
      /* allocate the handle for the ref cursor */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (void **) &cursr,
                              OCI_HTYPE_STMT,
                              0,
                              NULL);
    
      /* bind the ref cursor parameter */
      result = OCIBindByPos(stmtp,
                            &bndp1,
                            errhp,
                            1,
                            &cursr,
                            0,
                            SQLT_RSET,
                            NULL,
                            0,
                            NULL,
                            0,
                            0,
                            OCI_DEFAULT);
    
      /* execute the statement */
      result = OCIStmtExecute(svchp,
                              stmtp,
                              errhp,
                              1,
                              0,
                              NULL,
                              NULL,
                              OCI_DEFAULT);  
    
      /* get parameter descriptor for first column */
      result = OCIParamGet((dvoid *) cursr,
                           OCI_HTYPE_STMT,
                           errhp,
                           (dvoid **) &prmp1,
                           (ub4) 1);
    
      /* get parameter descriptor for second column */
      result = OCIParamGet((dvoid *) cursr,
                           OCI_HTYPE_STMT,
                           errhp,
                           (dvoid **) &prmp2,
                           (ub4) 2);
    
      /* get parameter descriptor for third column */
      result = OCIParamGet((dvoid *) cursr,
                           OCI_HTYPE_STMT,
                           errhp,
                           (dvoid **) &prmp3,
                           (ub4) 3);
    
      /* get the first column width in characters */
      result = OCIAttrGet((dvoid*) prmp1,
                          (ub4) OCI_DTYPE_PARAM,
                          (dvoid*) &col_width,
                          (ub4 *) 0,
                          (ub4) OCI_ATTR_DATA_SIZE,
                          errhp);
    
      /* allocate memory to hold the result */
      pEmpId = (oratext *) malloc(sizeof(oratext) * (col_width + 1));
    
      /* define the first column in the results */
      result = OCIDefineByPos(cursr,
                              &defp1,
                              errhp,
                              1,
                              (dvoid *) pEmpId,
                              (sword) col_width + 1,
                              SQLT_STR,
                              (dvoid *) NULL,
                              (ub2 *) 0,
                              (ub2 *) 0,
                              OCI_DEFAULT);
    
      /* get the second column width in characters */
      result = OCIAttrGet((dvoid*) prmp2,
                          (ub4) OCI_DTYPE_PARAM,
                          (dvoid*) &col_width,
                          (ub4 *) 0,
                          (ub4) OCI_ATTR_DATA_SIZE,
                          errhp);
    
      /* allocate memory to hold the result */
      pFirstName = (oratext *) malloc(sizeof(oratext) * (col_width + 1));
    
      /* define the second column in the results */
      result = OCIDefineByPos(cursr,
                              &defp2,
                              errhp,
                              2,
                              (dvoid *) pFirstName,
                              (sword) col_width + 1,
                              SQLT_STR,
                              (dvoid *) NULL,
                              (ub2 *) 0,
                              (ub2 *) 0,
                              OCI_DEFAULT);
    
      /* get the third column width in characters */
      result = OCIAttrGet((dvoid*) prmp3,
                          (ub4) OCI_DTYPE_PARAM,
                          (dvoid*) &col_width,
                          (ub4 *) 0,
                          (ub4) OCI_ATTR_DATA_SIZE,
                          errhp);
    
      /* allocate memory to hold the result */
      pLastName = (oratext *) malloc(sizeof(oratext) * (col_width + 1));
    
      /* define the third column in the results */
      result = OCIDefineByPos(cursr,
                              &defp3,
                              errhp,
                              3,
                              (dvoid *) pLastName,
                              (sword) col_width + 1,
                              SQLT_STR,
                              (dvoid *) NULL,
                              (ub2 *) 0,
                              (ub2 *) 0,
                              OCI_DEFAULT);
    
      /* loop through and print the results */
      while ((result = OCIStmtFetch(cursr,
                                    errhp,
                                    (ub4) 1,
                                    (ub2) OCI_FETCH_NEXT,
                                    (ub4) OCI_DEFAULT)) == OCI_SUCCESS)
      {
        printf("Employee ID: %s\n", pEmpId);
        printf(" First Name: %s\n", pFirstName);
        printf("  Last Name: %s\n\n", pLastName);
      }
    
      /* free allocated memory */
      free(pEmpId);
      free(pFirstName);
      free(pLastName);
    
      pEmpId = NULL;
      pFirstName = NULL;
      pLastName = NULL;
    
      /* terminate the session with the database */
      result = OCISessionEnd(svchp, errhp, usrhp, OCI_DEFAULT);
    
      /* detach from the server */
      result = OCIServerDetach(srvhp, errhp, OCI_DEFAULT);
    
      /* deallocate the environment handle     */
      /* OCI will deallocate the child handles */
      result = OCIHandleFree((dvoid *) envhp, OCI_HTYPE_ENV);
    
      return OCI_SUCCESS;
    }
    
    void checkerr(sword status, OCIError *errhp)
    {
      oratext errbuf[512];
      sb4 errcode = 0;
    
      switch (status) {
        case OCI_SUCCESS:
          break;
    
        case OCI_ERROR:
        case OCI_SUCCESS_WITH_INFO:
          (void) OCIErrorGet((dvoid *) errhp, (ub4) 1, (oratext *) NULL, &errcode, errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
          (void) printf("Error: %.*s\n", sizeof(errbuf), errbuf);
          break;
    
        case OCI_NEED_DATA:
          (void) printf("Error - OCI_NEED_DATA\n");
          break;
    
        case OCI_NO_DATA:
          (void) printf("Error - OCI_NO_DATA\n");
          break;
    
        case OCI_INVALID_HANDLE:
          (void) printf("Error - OCI_INVALID_HANDLE\n");
          break;
    
        case OCI_STILL_EXECUTING:
          (void) printf("Error - OCI_STILL_EXECUTING\n");
          break;
    
        case OCI_CONTINUE:
          (void) printf("Error - OCI_CONTINUE\n");
          break;
    
        default:
          break;
      }
    }
    
  • Call the DLL function with a pointer to a complex structure

    Hello

    I try to call a function by using COLD LAKE. My problem is the function parameters that I'm trying to access.

    Here is the function and its parameters:

    typedef struct _BAR_INFO
    {
    ULONG dwSize;
    ULONG dwFlag.
    } BAR_INFO, PBAR_INFO;

    typedef struct _DEVICE_INFO
    {
    ULONG dwBarNum;
    BAR_INFO BarInfo [6];
    } DEVICE_INFO, * PDEVICE_INFO;

    Int GetDeviceInfo DLLIMPORT)
    unsigned int CIH.
    PDEVICE_INFO pdevinfo
    )
    {
    ULONG i;

    If (DFR > = DevNum)
    Return PCICORE_DEVICE_NO_FOUND;

    If (DevTable [JC]. DevHandle is NOTHING)
    Return PCICORE_DEVICE_NO_INITIALIZE;

    if(pdevinfo == null)
    Return PCICORE_INVALID_PARAMETER;

    pdevinfo-> dwBarNum = DevTable [JC]. DevInfo.dwBarNum;
    < pdevinfo-="">dwBarNum; i ++)
    {
    pdevinfo-> .dwFlag BarInfo [i] =
    DevTable [JC]. DevInfo.BarInfo [i] .dwFlag;
    pdevinfo-> .dwSize BarInfo [i] =
    DevTable [JC]. DevInfo.BarInfo [i] .dwSize;
    }

    Return PCICORE_SUCCESS;
    }

    As an attachment, there is the Info.vi device Get trying to access this feature. The code crashes when the function is called.

    I have probably not pass parameters of data properly to COLD LAKE.

    Thank you for your lights.

    An array of fixed size in C is equivalent to a cluster of LabVIEW that contains the same number of identical items, replace the table with a cluster. In addition, structs are always passed by reference and the C function expects a pointer to a structure, you don't need to unbundle. Skip the cluster to function as a single parameter. Try the attached revised version of your VI.

  • Call the DLL function with pointer to a simple structure

    Hello

    I try to call a function by using COLD LAKE. My problem is the function parameters that I'm trying to access.

    Here is the function and its parameter:

    typedef struct {}
    int major;
    minor int;
    review of int;
    build int;
    } VersionNumberType;

    int Comm_BTE_softVersion (VersionNumberType * pVersion)
    {
    BYTE ByBuffer [2048];

    If (!.) Comm_BTE_readYMem (byBuffer, COMM_BTE_TX14_SOFTVERSIONADDR,
    COMM_BTE_TX14_SOFTVERSIONSIZE))
    {
    return FALSE;.
    }

    //. process the response
    pVersion-> major = (int) (byBuffer [0] & 0xFF);
    pVersion-> minor = (int) (byBuffer [1] & 0xFF);
    pVersion-> revision = (int) (byBuffer [2] & 0xFF);
    < 8)="" )="" |="" ((int)="" (="" bybuffer[5]="">

    Return TRUE;
    } //. end Comm_BTE

    As an attachment, there is the Version.vi soft Comm BTE who try to access this feature. The code crashes when the function is called and labVIEW is closed.

    I have probably not pass parameters of data properly to COLD LAKE.

    Thanks for help.

    Kind regards. NewCLAD.

    Everything is configured properly EXCEPT the digital representation of the values in the cluster. They must match int, which is likely 32 bit on your platform. They are your VI, U8.

  • Please check my code to call 8 sequential functions with a single button

    This code looks good to call the Func1 thru Func8 functions whenever you click on next_btn?

    I get the following error: mismatch number of arguments on FWA_fla::MainTimeline / nextReg (). From 0, 1.

    My research tells me its probably incorrect syntax. Do I need a function 'private '? Thank you very much, I'm lost!

    var counter:number = 0;

    this. next1_btn.addEventListener (MouseEvent.CLICK, nextFunc);

    function nextFunc (event: MouseEvent): void

    {

    If (counter == 9) {}

    (counter == 0);

    }

    counter ++;

    trace (Counter)

    ce ["Func" + counter] ();

    }

    Reg1 thru reg8 are defined below

    function Func1 (event: MouseEvent): void

    {

    do something

    }

    function Func1 (event: MouseEvent): void

    {

    do something

    }

    etc.

    Because the way you seem unable to post messages of error/code real, the best that I can offer, it is... the error indicates that you do not specify the argument that you show in the code that you have validated the nextFunc function

    Your other functions that you show having an argument, but you do not send one of them.

    function nextFunc(event:MouseEvent): void / / this line requires the 'event. MouseEvent.

    function Func1 (event: MouseEvent): void / / these lines should not "event. MouseEvent.

  • Call the library function does not find the DLL in the directory where are my LLBs

    I'm using LabVIEW 8.6.  I have a set of screws in several LLBs.  All LLBs located in a directory.  Most of my screws is wrappers for the functions in a DLL.  I was told to put my DLL in the directory where are the LLBs, and apparently this is how the previous programmer has worked (using an earlier version of LabView).

    In the configuration of the library call, I've specified .dll without path.  (This is how we want our screws are an API that will integrate other programmers, so I don't know where they put things and I can't use absolute paths).

    When I insert the VIs in LabVIEW, LabVIEW can not find the DLL and wonder of spotted.  It's just that here in the directory with the LLBs and when I double click on it, everything works fine.  However my absolute path to the DLL now appears in the library to call configuration, and we don't want that.

    Does anyone know how to make this work?  I guess the location of the screw (or LLBs, in this case) should be the current directory and thus Windows search there for the DLL.  However, it seems that this is not the case (in the least, in the latest version of LabVIEW).

    Thank you.

    Batya

    Well someone using your library should not have to dig into your screws and do it all on his own. Instead your library must wrap that and hide disorders it altogether.

    The cluster of error has been added when the dynamic path option has been added. It is not useful hide this error output, so it's always there. As well as the dynamic path, there was the improved error handling added the CLN. One of them is that the level of verification when calling function errors (exception handling) can be specified. I guess that some of these options may generate an error code instead of bring up a dialog box, as they did before and that the output of error code can be useful even in the case of static calls.

    As to what you want to do, I would have long managed that with a DLL that has essentially the same functions as your other wrapper DLLs and an initiliasation function that returns a pointer to a structure of functional distribution based on the actual DLL you want to call. Quite like what an object-oriented function dispatch table is. Then, when your interface initilising you call initialize function and specify the device interface/type that you want to use and after that all other functions take a pointer extra function parameter expedition as the first parameter, in addition to the parameters of the real function. This dispatch function pointer would be just a pointer to a structure that contains the table of function for this interface pointers and the sake of LabVIEW would simply be an integer of size pointer.

    The wrapper function then checks the pointer structure validity send feature and call the actual function with the remaining parameters. It is a C programming and may require a planning and desigining the different interfaces to facilitate this kind of technique of the expedition, but it will certainly pay to long-term and make your library even can be used in previous versions of LabVIEW, so that VB etc. without delicate dynamic loading in the level high, programming environment.

    Rolf Kalbermatter

  • Calling a generic function

    Hello

    I need to create two functions: get_calls() and get_freeCalls()

    I have already created get_calls(). and for another, I don't want to rewrite the code, but just to call the first function with selecting some returned fields and application of some filters.

    Do you know guys in a way to do it?

    (Oracle DB 11g 2)

    Thank you very much

    Hello

    Question was not clear.

        get_freeCalls()
        return  *****
    
       IS
    
        variable  datatype;
    
       BEGIN
    
           variable :=  get_calls();
    
      END;
    
  • Problem when calling a return function of SQL BOOLEAN in package type

    Hi all

    I'm having a problem when you try to call a SQL function in a package with the return BOOLEAN type
    The SQL function signature is
    ####

    CREATE OR REPLACE PACKAGE RMSOWNER. ORDER_ATTRIB_SQL *.

    FUNCTION GET_PO_TYPE_DESC (O_error_message IN OUT VARCHAR2,
    I_PO_TYPE IN VARCHAR2,
    O_PO_TYPE_DESC IN OUT VARCHAR2)
    RETURN A BOOLEAN VALUE;

    ####


    Here is my java code

    ####
    + Cs3 CallableStatement = conn.prepareCall ("{?}") = call ORDER_ATTRIB_SQL. GET_PO_TYPE_DESC(?,?,?)} ");" +
    + CS3.registerOutParameter (1, java.sql.Types.BOOLEAN) +;
    + CS3.registerOutParameter (2, java.sql.Types.VARCHAR) +;
    + CS3.registerOutParameter (4, java.sql.Types.VARCHAR) +;
    + CS3. SetString (2, ""); +
    + CS3. SetString (3, "ST"); +
    + CS3. SetString (4, ""); +
    + ResultSet rs3 = cs3.executeQuery (); +
    ####

    I get the following exception, I tried to change the (registerOutParameter) boolean sql type bit, but I've always found this exception.
    But when I call all other functions with a return type other than boolean, they work perfectly well.

    Please can someone help me solve this problem, I don't know if its something to do with classes of JDBC providers?

    #####
    + java.sql.SQLException: ORA-06550: line 1, column 13: +.
    + PLS-00382: expression is of the wrong type.
    + ORA-06550: line 1, column 7: +.
    + PL/SQL: statement ignored +.

    + oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) +.
    + oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) +.
    + oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) +.
    + oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743) +.
    + oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:215) +.
    + oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:954) +.
    + oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168) +.
    + oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316) +.
    + oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3422) +.
    + oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4394) +.

    #####

    Looks like it's a Limitation of the jdbc drivers. Please visit the following link:
    http://www-Camden.Rutgers.edu/help/documentation/Oracle/Java.815/a64684/typesup1.htm

    Here is an excerpt from above:
    ==========================================================
    PL/SQL BOOLEAN, RECORD and the Types of TABLES of packing

    Oracle JDBC drivers support the argument of appeal or return values of PL/SQL TABLE types (now known as indexed arrays by), REGISTRATION or BOOLEAN.

    To work around the problem, you can create wrapper procedures that manage data like types supported by JDBC. For example, to wrap a stored procedure that uses PL/SQL Boolean values, you can create a stored procedure that takes a character or a number of JDBC and passes to the original procedure as BOOLEAN or, for an output parameter, accepts a BOOLEAN of the original procedure argument and pass it as a TANK or a NUMBER to JDBC. Similarly, to wrap a stored procedure that uses PL/SQL records, you can create a stored procedure that maintains a record in its individual components (such as CHAR and NUMBER). To wrap a stored procedure that uses PL/SQL tables, you can divide the data into components or perhaps use Oracle collection types.

  • Storage of functions with arguments as String

    I need to store a function with arguments in a string.

    Without arguments, you simply have to do sth. Like this:

    functionName:String = "Hello";

    This [FunctionName])

    Function Hello (): void {}

    "Hello, World";

    }

    But as soon as you enter arguments it becomes difficult.

    I came up with this:

    function getArgsFromFunction(_function: String): Array {}

    var argstart: int = _function.indexOf ("("); ")

    var argend: int = _function.indexOf ("") ");"

    var argstring: String = _function.substr (argstart + 1, argend - argstart - 1);

    var args: Array = argstring.split(",");

    Return args;

    }

    function getNameFromFunction(_function: String): String {}

    var nameEnd: int = _function.indexOf ("("); ")

    "stringname" var: String = _function.substr (0, nameEnd);

    return "stringname";

    }

    var f: String = "showMessage (A, B)";

    function showMessage(_args: Array): void {}

    trace (_args);

    }

    var _funct: function = this [getNameFromFunction (f)];

    _funct. Call (this, getArgsFromFunction (f));


    but it is not very flexible, very sturdy and seems unnecessarily complicated.

    Anyone know a faster way to achieve this?

    function parseF(s:String):void {}

    var a: Array = s.split ("("); ")

    var arg:Array = a [1].split(",");

    This [a [0]] (arg [0], arg [1] .substr (0, -1));

    }

  • How can I call a function with parameter out of sql

    Hello world
    I'm calling a Sql statement function and I get this error ORA-06572: XX function has arguments.

    can you offer any solution on this workaround.

    Thank you

    Hello

    Sorry, you cannot call functions with OUT arguments (or arguments, but I'll just say in the future) SQL statements.
    This is one of the reasons why many people avoid having arguments in functions.
    THE arguments are never optional. If the function expected of them, you must pass to them.

    Depending on your needs, you can write a Wrapper function that has no arguments.
    For example, if you want to call this function:

    fun1 ( in_out_str      IN OUT  VARCHAR2
         , in_num          IN      NUMBER
         )
    RETURN  NUMBER ...
    

    you don't need really the value changed to in_out_str, then you can write a function like this:

    fun1_wrapper ( in_str          IN      VARCHAR2
                   , in_num          IN      NUMBER
                   )
    RETURN  NUMBER
    IS
        in_str2     VARCHAR2 (32767)  := in_str;
    BEGIN
        RETURN  fun1 ( in_str2
                       , in_num
               );
    END  fun1_wrapper;
    

    You can use fun1_wrapper in a SQL statement, even if you cannot use fun1 in the same statement.

    Published by: Frank Kulash on February 27, 2013 09:42

  • How to avoid the ASSERT message "PMString::SetKey - call SetKey with a string that is not a translation?

    Getting below to ASSERT the message when you try to store a value in the PMString object.

    PMString::SetKey - call SetKey with a string that is not a translation

    No idea how can I avoid this message? Y at - it any changes required in the .fr file?

    Try using a Widestring instead, because you don't need translation. If you do not, try SetTranslated()

  • Call to undefined function getsqlvaluestring() with PHP mysql Dreamweaver

    Hey guys, I'm new to the forum and it seems very useful. I think I have a unique problem well.

    Although this script worked for a year or two, all of a sudden, during the holidays, he went to hay

    Front end is always get all the information, it must be the Database.But when I try to connect through the side admin I created with php and database of dreamweaver extensions normal I get this error.

    I do not know many php - then I'll hide the chain at the moment - if I need to paste the code that I'll - thank you in advance


    Fatal error
    : Call to undefined function getsqlvaluestring() in /xxxxx/xxxx/xxxxxxx/xxxxxxx/newsletters/xxxxxxx/xxxxxxx/admin/login.php on line 22

    Vicinity of line 22 looks like this

    @mysql_select_db ($database_promocenter, $promocenter);

    $LoginRS__query = sprintf ("SELECT username, password, destination_page FROM users WHERE username = %s AND password is %s",

    GetSQLValueString ($loginUsername, "text"), GetSQLValueString ($password, "int"));

    $LoginRS = mysql_query ($LoginRS__query, $promocenter) or die (mysql_error ());

    $loginFoundUser = mysql_num_rows ($LoginRS);

    If {($loginFoundUser)

    First part looks like this

    < form id = "form1" name = "form1" method = "POST" action = "<?" PHP echo $loginFormAction;? > ">"
    < b >
    < td bgcolor = "#dedede" >
    < table width = "400" border = "0" align = "center" cellpadding = '3' cellspacing = "0" bgcolor = "#ffffff" >
    < b >
    < td height = "35" align = "right" valign = "middle" id = "description" > user name: < table >
    < height td = "35" > < label >
    < input style = "height: 20px;" border: 1px solid #999999 "name ="username"type ="text"id ="username"size ="35"/ >"
    < / label > < table >
    < /tr >
    < b >
    < td height = "35" align = "right" valign = "middle" id = "description" > password: < table >
    < height td = "35" > < label >
    < input style = "height: 20px;" border: 1px solid #999999 "name ="password"type ="password"id ="password"size ="35"/ >"
    < / label > < table >
    < /tr >

    Anton

    Could also show you it could never work.  Why?  Because the call to the function is made before the function is defined.  He would always stop execution with an undefined function error.

    Now - it seems that you have added the users authentication that was placed before the code block in which the function is defined.  So I would say that you move it-

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION< 6)="" {="" 6)="">

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

    }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    Switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    from its current location to a new block just under the connection with the directive, i.e.,.

    MOVE HERE ? >

    <>

    Validate request to connect to this site.

    so that the final code looks like this-

    <>

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION< 6)="">

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

    }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    Switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    ?>

    <>

    Validate request to connect to this site.

  • Call the function with the arguments in AS3

    Hello!
    I am a new in Flex development and cannot understand same code convention, im Java programmer.
    How I can write correct function in ActionScript, my call call: var goodsWnd:CreateGoodsWindow = PopUpManager.createPopUp (this, CreateGoodsWindow, true) as CreateGoodsWindow;
    I want call above function with argument, how do?
    Where my class: public class CreateGoodsWindow extends extends TitleWindow
    {
    public CreateGoodsWindow(data:Object)
    {....}
    }

    Using PopUpManager.addPopUp () instead of of createPopUp(). addPopUp takes an object that has already been instantiated:

    var createGoodsWindow:CreateGoodsWindow = new CreateGoodsWindow (data);
    PopUpManager.addPopUp (createGoodsWindow);

  • How to read / write to a HID device with call a library function?

    I had tons of problems to read from a device USB HID in VISA. I had no problem make a driver for him and write it in LabVIEW. However, whenever I try to read using Read Visa, Visa USB Control In or interrupt USB event get different types of error messages.

    I decided to give up this route and talk to the device through hid.dll, setupapi.dll and any other .dll that I need to use. The problem is that I'm not sure I correctly use the nodes to call a library function... I've seen several KB articles that explain how to set up the nodes call library feature, but I need more information. I can configure stuff and sometimes get things to work, but I don't always know what each specific selections in Settings tab is doing. Can someone give me more detailed information on what do the settings tab and all of its components?

    Thank you

    Matt

    Have you looked HERE?

    Shane.

Maybe you are looking for

  • Satellite A-L50-1CU PSKK6E - impossible to update BIOS

    Recently bought a Satellite L50-A-1CU. tried to update the BIOS with the version downloaded from the Toshiba site BIOS_V190_WIN. What happens is that I get a small windows saying "C:\". » ???Seven polling points are part of the message. By pressing t

  • try to establish a wireless connection for deskjet 7580

    I used HP assistants to uninstall and reinstall the printer software. Then I used a wizard to help the wireless configuration, but at this point, the wizard tells me to use the buttons on the front of my printer. However, the option I gave on my scre

  • TravelMate P645-m where the SSD?

    I have several P645-m-5609 travelmate ultrabooks we just bought. I can't encrypt. Where is the hard drive? I opened the Panel in the back where I see the little indicator of hd, but there's nothing but memory under him. It is empty.  I need to take o

  • problems burning a dvd

    When I burn a dvd movie it is stretched up and down. It makes everybody look tall and skinny. can someone help me with this problem? Vista Windows, windows dvd creation.

  • How to change the Source with EditText text in my Script?

    Here is my code, actually, the thing is I want to change my myEditText text in my control panel:function myScript(thisObj) {           function myScript_buildUI(thisObj) {                     var myPanel = (thisObj instanceof Panel) ? thisObj : new W