Skip navigation links
JNA API 5.3.1
com.sun.jna.platform.win32

Interface DdemlUtil.IDdeConnection

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    DdemlUtil.DdeConnection
    Enclosing class:
    DdemlUtil


    public static interface DdemlUtil.IDdeConnection
    extends java.io.Closeable
    The IDdeConnection defines the functions, that work an a concrete connection/conversation.
    • Method Detail

      • execute

        void execute(java.lang.String executeString,
                     int timeout,
                     WinDef.DWORDByReference result,
                     BaseTSD.DWORD_PTR userHandle)
        Run an XTYP_EXECUTE client transaction.
        Parameters:
        executeString - The string passed to the server for execution
        timeout - The maximum amount of time, in milliseconds, that the client will wait for a response from the server application in a synchronous transaction. This parameter should be TIMEOUT_ASYNC for asynchronous transactions.
        result - A pointer to a variable that receives the result of the transaction. An application that does not check the result can use NULL for this value. For synchronous transactions, the low-order word of this variable contains any applicable DDE_ flags resulting from the transaction. This provides support for applications dependent on DDE_APPSTATUS bits. It is, however, recommended that applications no longer use these bits because they may not be supported in future versions of the Dynamic Data Exchange Management Library (DDEML). For asynchronous transactions, this variable is filled with a unique transaction identifier for use with the DdeAbandonTransaction function and the XTYP_XACT_COMPLETE transaction.
        userHandle - data to associate with the transaction

        If an error occurs, a DdemlException is raised with the appropriate error code:

        • DMLERR_BUSY
        • DMLERR_NOTPROCESSED
      • poke

        void poke(Pointer data,
                  int dataLength,
                  Ddeml.HSZ item,
                  int wFmt,
                  int timeout,
                  WinDef.DWORDByReference result,
                  BaseTSD.DWORD_PTR userHandle)
        Run an XTYP_POKE client transaction
        Parameters:
        data - The beginning of the data the client must pass to the server.

        Optionally, an application can specify the data handle (HDDEDATA) to pass to the server and in that case the cbData parameter should be set to -1. This parameter is required only if the wType parameter is XTYP_EXECUTE or XTYP_POKE. Otherwise, this parameter should be NULL.

        For the optional usage of this parameter, XTYP_POKE transactions where pData is a data handle, the handle must have been created by a previous call to the DdeCreateDataHandle function, employing the same data format specified in the wFmt parameter.

        dataLength - The length, in bytes, of the data pointed to by the pData parameter, including the terminating NULL, if the data is a string. A value of -1 indicates that pData is a data handle that identifies the data being sent.
        item - A handle to the data item for which data is being exchanged during the transaction. This handle must have been created by a previous call to the DdeCreateStringHandle function. This parameter is ignored (and should be set to 0L) if the wType parameter is XTYP_EXECUTE.
        wFmt - The standard clipboard format in which the data item is being submitted or requested.

        If the transaction specified by the wType parameter does not pass data or is XTYP_EXECUTE, this parameter should be zero.

        If the transaction specified by the wType parameter references non-execute DDE data ( XTYP_POKE, XTYP_ADVSTART, XTYP_ADVSTOP, XTYP_REQUEST), the wFmt value must be either a valid predefined (CF_) DDE format or a valid registered clipboard format.

        timeout - The maximum amount of time, in milliseconds, that the client will wait for a response from the server application in a synchronous transaction. This parameter should be TIMEOUT_ASYNC for asynchronous transactions.
        userHandle - data to associate with the transaction
        result - A pointer to a variable that receives the result of the transaction. An application that does not check the result can use NULL for this value. For synchronous transactions, the low-order word of this variable contains any applicable DDE_ flags resulting from the transaction. This provides support for applications dependent on DDE_APPSTATUS bits. It is, however, recommended that applications no longer use these bits because they may not be supported in future versions of the Dynamic Data Exchange Management Library (DDEML). For asynchronous transactions, this variable is filled with a unique transaction identifier for use with the DdeAbandonTransaction function and the XTYP_XACT_COMPLETE transaction.

        If an error occurs, a DdemlException is raised with the appropriate error code:

        • DMLERR_BUSY
        • DMLERR_NOTPROCESSED
      • poke

        void poke(Pointer data,
                  int dataLength,
                  java.lang.String item,
                  int wFmt,
                  int timeout,
                  WinDef.DWORDByReference result,
                  BaseTSD.DWORD_PTR userHandle)
        Run an XTYP_POKE client transaction
        Parameters:
        data - The beginning of the data the client must pass to the server.

        Optionally, an application can specify the data handle (HDDEDATA) to pass to the server and in that case the cbData parameter should be set to -1. This parameter is required only if the wType parameter is XTYP_EXECUTE or XTYP_POKE. Otherwise, this parameter should be NULL.

        For the optional usage of this parameter, XTYP_POKE transactions where pData is a data handle, the handle must have been created by a previous call to the DdeCreateDataHandle function, employing the same data format specified in the wFmt parameter.

        dataLength - The length, in bytes, of the data pointed to by the pData parameter, including the terminating NULL, if the data is a string. A value of -1 indicates that pData is a data handle that identifies the data being sent.
        item - The data item for which data is being exchanged during the transaction. This parameter is ignored (and should be set to NULL) if the wType parameter is XTYP_EXECUTE.
        wFmt - The standard clipboard format in which the data item is being submitted or requested.

        If the transaction specified by the wType parameter does not pass data or is XTYP_EXECUTE, this parameter should be zero.

        If the transaction specified by the wType parameter references non-execute DDE data ( XTYP_POKE, XTYP_ADVSTART, XTYP_ADVSTOP, XTYP_REQUEST), the wFmt value must be either a valid predefined (CF_) DDE format or a valid registered clipboard format.

        timeout - The maximum amount of time, in milliseconds, that the client will wait for a response from the server application in a synchronous transaction. This parameter should be TIMEOUT_ASYNC for asynchronous transactions.
        userHandle - data to associate with the transaction
        result - A pointer to a variable that receives the result of the transaction. An application that does not check the result can use NULL for this value. For synchronous transactions, the low-order word of this variable contains any applicable DDE_ flags resulting from the transaction. This provides support for applications dependent on DDE_APPSTATUS bits. It is, however, recommended that applications no longer use these bits because they may not be supported in future versions of the Dynamic Data Exchange Management Library (DDEML). For asynchronous transactions, this variable is filled with a unique transaction identifier for use with the DdeAbandonTransaction function and the XTYP_XACT_COMPLETE transaction.

        If an error occurs, a DdemlException is raised with the appropriate error code:

        • DMLERR_BUSY
        • DMLERR_NOTPROCESSED
      • request

        Ddeml.HDDEDATA request(Ddeml.HSZ item,
                               int wFmt,
                               int timeout,
                               WinDef.DWORDByReference result,
                               BaseTSD.DWORD_PTR userHandle)
        Begins a data transaction between a client and a server. Only a Dynamic Data Exchange (DDE) client application can call this function, and the application can use it only after establishing a conversation with the server.
        Parameters:
        item - A handle to the data item for which data is being exchanged during the transaction. This handle must have been created by a previous call to the DdeCreateStringHandle function. This parameter is ignored (and should be set to 0L) if the wType parameter is XTYP_EXECUTE.
        wFmt - The standard clipboard format in which the data item is being submitted or requested.

        If the transaction specified by the wType parameter references non-execute DDE data ( XTYP_POKE, XTYP_ADVSTART, XTYP_ADVSTOP, XTYP_REQUEST), the wFmt value must be either a valid predefined (CF_) DDE format or a valid registered clipboard format.

        timeout - The maximum amount of time, in milliseconds, that the client will wait for a response from the server application in a synchronous transaction. This parameter should be TIMEOUT_ASYNC for asynchronous transactions.
        result - A pointer to a variable that receives the result of the transaction. An application that does not check the result can use NULL for this value. For synchronous transactions, the low-order word of this variable contains any applicable DDE_ flags resulting from the transaction. This provides support for applications dependent on DDE_APPSTATUS bits. It is, however, recommended that applications no longer use these bits because they may not be supported in future versions of the Dynamic Data Exchange Management Library (DDEML). For asynchronous transactions, this variable is filled with a unique transaction identifier for use with the DdeAbandonTransaction function and the XTYP_XACT_COMPLETE transaction.
        userHandle - data to associate with the transaction
        Returns:
        If the function succeeds, the return value is a data handle that identifies the data for successful synchronous transactions in which the client expects data from the server. The return value is nonzero for successful asynchronous transactions and for synchronous transactions in which the client does not expect data. The return value is zero for all unsuccessful transactions.

        If an error occurs, a DdemlException is raised with the appropriate error code:

        • DMLERR_NOTPROCESSED
      • request

        Ddeml.HDDEDATA request(java.lang.String item,
                               int wFmt,
                               int timeout,
                               WinDef.DWORDByReference result,
                               BaseTSD.DWORD_PTR userHandle)
        Begins a data transaction between a client and a server. Only a Dynamic Data Exchange (DDE) client application can call this function, and the application can use it only after establishing a conversation with the server.
        Parameters:
        item - The data item for which data is being exchanged during the transaction. This parameter is ignored (and should be set to NULL) if the wType parameter is XTYP_EXECUTE.
        wFmt - The standard clipboard format in which the data item is being submitted or requested.

        If the transaction specified by the wType parameter references non-execute DDE data ( XTYP_POKE, XTYP_ADVSTART, XTYP_ADVSTOP, XTYP_REQUEST), the wFmt value must be either a valid predefined (CF_) DDE format or a valid registered clipboard format.

        timeout - The maximum amount of time, in milliseconds, that the client will wait for a response from the server application in a synchronous transaction. This parameter should be TIMEOUT_ASYNC for asynchronous transactions.
        result - A pointer to a variable that receives the result of the transaction. An application that does not check the result can use NULL for this value. For synchronous transactions, the low-order word of this variable contains any applicable DDE_ flags resulting from the transaction. This provides support for applications dependent on DDE_APPSTATUS bits. It is, however, recommended that applications no longer use these bits because they may not be supported in future versions of the Dynamic Data Exchange Management Library (DDEML). For asynchronous transactions, this variable is filled with a unique transaction identifier for use with the DdeAbandonTransaction function and the XTYP_XACT_COMPLETE transaction.
        userHandle - data to associate with the transaction
        Returns:
        If the function succeeds, the return value is a data handle that identifies the data for successful synchronous transactions in which the client expects data from the server. The return value is nonzero for successful asynchronous transactions and for synchronous transactions in which the client does not expect data. The return value is zero for all unsuccessful transactions.

        If an error occurs, a DdemlException is raised with the appropriate error code:

        • DMLERR_NOTPROCESSED
      • clientTransaction

        Ddeml.HDDEDATA clientTransaction(Pointer data,
                                         int dataLength,
                                         Ddeml.HSZ item,
                                         int wFmt,
                                         int transaction,
                                         int timeout,
                                         WinDef.DWORDByReference result,
                                         BaseTSD.DWORD_PTR userHandle)
        Begins a data transaction between a client and a server. Only a Dynamic Data Exchange (DDE) client application can call this function, and the application can use it only after establishing a conversation with the server.
        Parameters:
        data - The beginning of the data the client must pass to the server.

        Optionally, an application can specify the data handle (HDDEDATA) to pass to the server and in that case the cbData parameter should be set to -1. This parameter is required only if the wType parameter is XTYP_EXECUTE or XTYP_POKE. Otherwise, this parameter should be NULL.

        For the optional usage of this parameter, XTYP_POKE transactions where pData is a data handle, the handle must have been created by a previous call to the DdeCreateDataHandle function, employing the same data format specified in the wFmt parameter.

        dataLength - The length, in bytes, of the data pointed to by the pData parameter, including the terminating NULL, if the data is a string. A value of -1 indicates that pData is a data handle that identifies the data being sent.
        item - A handle to the data item for which data is being exchanged during the transaction. This handle must have been created by a previous call to the DdeCreateStringHandle function. This parameter is ignored (and should be set to 0L) if the wType parameter is XTYP_EXECUTE.
        wFmt - The standard clipboard format in which the data item is being submitted or requested.

        If the transaction specified by the wType parameter does not pass data or is XTYP_EXECUTE, this parameter should be zero.

        If the transaction specified by the wType parameter references non-execute DDE data ( XTYP_POKE, XTYP_ADVSTART, XTYP_ADVSTOP, XTYP_REQUEST), the wFmt value must be either a valid predefined (CF_) DDE format or a valid registered clipboard format.

        transaction - The transaction type. This parameter can be one of the following values.
        ValueMeaning
        XTYP_ADVSTARTBegins an advise loop. Any number of distinct advise loops can exist within a conversation. An application can alter the advise loop type by combining the XTYP_ADVSTART transaction type with one or more of the following flags:
        XTYPF_NODATA.
        Instructs the server to notify the client of any data changes without actually sending the data. This flag gives the client the option of ignoring the notification or requesting the changed data from the server.
        XTYPF_ACKREQ.
        Instructs the server to wait until the client acknowledges that it received the previous data item before sending the next data item. This flag prevents a fast server from sending data faster than the client can process it.
        XTYP_ADVSTOPEnds an advise loop.
        XTYP_EXECUTEBegins an execute transaction.
        XTYP_POKEBegins a poke transaction.
        XTYP_REQUESTBegins a request transaction.
        timeout - The maximum amount of time, in milliseconds, that the client will wait for a response from the server application in a synchronous transaction. This parameter should be TIMEOUT_ASYNC for asynchronous transactions.
        result - A pointer to a variable that receives the result of the transaction. An application that does not check the result can use NULL for this value. For synchronous transactions, the low-order word of this variable contains any applicable DDE_ flags resulting from the transaction. This provides support for applications dependent on DDE_APPSTATUS bits. It is, however, recommended that applications no longer use these bits because they may not be supported in future versions of the Dynamic Data Exchange Management Library (DDEML). For asynchronous transactions, this variable is filled with a unique transaction identifier for use with the DdeAbandonTransaction function and the XTYP_XACT_COMPLETE transaction.
        userHandle - data to associate with the transaction
        Returns:
        If the function succeeds, the return value is a data handle that identifies the data for successful synchronous transactions in which the client expects data from the server. The return value is nonzero for successful asynchronous transactions and for synchronous transactions in which the client does not expect data. The return value is zero for all unsuccessful transactions.

        If an error occurs, a DdemlException is raised with the appropriate error code:

        • DMLERR_ADVACKTIMEOUT
        • DMLERR_BUSY
        • DMLERR_DATAACKTIMEOUT
        • DMLERR_DLL_NOT_INITIALIZED
        • DMLERR_EXECACKTIMEOUT
        • DMLERR_INVALIDPARAMETER
        • DMLERR_MEMORY_ERROR
        • DMLERR_NO_CONV_ESTABLISHED
        • DMLERR_NO_ERROR
        • DMLERR_NOTPROCESSED
        • DMLERR_POKEACKTIMEOUT
        • DMLERR_POSTMSG_FAILED
        • DMLERR_REENTRANCY
        • DMLERR_SERVER_DIED
        • DMLERR_UNADVACKTIMEOUT
      • clientTransaction

        Ddeml.HDDEDATA clientTransaction(Pointer data,
                                         int dataLength,
                                         java.lang.String item,
                                         int wFmt,
                                         int transaction,
                                         int timeout,
                                         WinDef.DWORDByReference result,
                                         BaseTSD.DWORD_PTR userHandle)
        Begins a data transaction between a client and a server. Only a Dynamic Data Exchange (DDE) client application can call this function, and the application can use it only after establishing a conversation with the server.
        Parameters:
        data - The beginning of the data the client must pass to the server.

        Optionally, an application can specify the data handle (HDDEDATA) to pass to the server and in that case the cbData parameter should be set to -1. This parameter is required only if the wType parameter is XTYP_EXECUTE or XTYP_POKE. Otherwise, this parameter should be NULL.

        For the optional usage of this parameter, XTYP_POKE transactions where pData is a data handle, the handle must have been created by a previous call to the DdeCreateDataHandle function, employing the same data format specified in the wFmt parameter.

        dataLength - The length, in bytes, of the data pointed to by the pData parameter, including the terminating NULL, if the data is a string. A value of -1 indicates that pData is a data handle that identifies the data being sent.
        item - The data item for which data is being exchanged during the transaction. This parameter is ignored (and should be set to NULL) if the wType parameter is XTYP_EXECUTE.
        wFmt - The standard clipboard format in which the data item is being submitted or requested.

        If the transaction specified by the wType parameter does not pass data or is XTYP_EXECUTE, this parameter should be zero.

        If the transaction specified by the wType parameter references non-execute DDE data ( XTYP_POKE, XTYP_ADVSTART, XTYP_ADVSTOP, XTYP_REQUEST), the wFmt value must be either a valid predefined (CF_) DDE format or a valid registered clipboard format.

        transaction - The transaction type. This parameter can be one of the following values.
        ValueMeaning
        XTYP_ADVSTARTBegins an advise loop. Any number of distinct advise loops can exist within a conversation. An application can alter the advise loop type by combining the XTYP_ADVSTART transaction type with one or more of the following flags:
        XTYPF_NODATA.
        Instructs the server to notify the client of any data changes without actually sending the data. This flag gives the client the option of ignoring the notification or requesting the changed data from the server.
        XTYPF_ACKREQ.
        Instructs the server to wait until the client acknowledges that it received the previous data item before sending the next data item. This flag prevents a fast server from sending data faster than the client can process it.
        XTYP_ADVSTOPEnds an advise loop.
        XTYP_EXECUTEBegins an execute transaction.
        XTYP_POKEBegins a poke transaction.
        XTYP_REQUESTBegins a request transaction.
        timeout - The maximum amount of time, in milliseconds, that the client will wait for a response from the server application in a synchronous transaction. This parameter should be TIMEOUT_ASYNC for asynchronous transactions.
        result - A pointer to a variable that receives the result of the transaction. An application that does not check the result can use NULL for this value. For synchronous transactions, the low-order word of this variable contains any applicable DDE_ flags resulting from the transaction. This provides support for applications dependent on DDE_APPSTATUS bits. It is, however, recommended that applications no longer use these bits because they may not be supported in future versions of the Dynamic Data Exchange Management Library (DDEML). For asynchronous transactions, this variable is filled with a unique transaction identifier for use with the DdeAbandonTransaction function and the XTYP_XACT_COMPLETE transaction.
        userHandle - data to associate with the transaction
        Returns:
        If the function succeeds, the return value is a data handle that identifies the data for successful synchronous transactions in which the client expects data from the server. The return value is nonzero for successful asynchronous transactions and for synchronous transactions in which the client does not expect data. The return value is zero for all unsuccessful transactions.

        If an error occurs, a DdemlException is raised with the appropriate error code:

        • DMLERR_ADVACKTIMEOUT
        • DMLERR_BUSY
        • DMLERR_DATAACKTIMEOUT
        • DMLERR_DLL_NOT_INITIALIZED
        • DMLERR_EXECACKTIMEOUT
        • DMLERR_INVALIDPARAMETER
        • DMLERR_MEMORY_ERROR
        • DMLERR_NO_CONV_ESTABLISHED
        • DMLERR_NO_ERROR
        • DMLERR_NOTPROCESSED
        • DMLERR_POKEACKTIMEOUT
        • DMLERR_POSTMSG_FAILED
        • DMLERR_REENTRANCY
        • DMLERR_SERVER_DIED
        • DMLERR_UNADVACKTIMEOUT
      • advstart

        void advstart(Ddeml.HSZ item,
                      int wFmt,
                      int timeout,
                      WinDef.DWORDByReference result,
                      BaseTSD.DWORD_PTR userHandle)
        Begins a data transaction between a client and a server. Only a Dynamic Data Exchange (DDE) client application can call this function, and the application can use it only after establishing a conversation with the server.
        Parameters:
        item - A handle to the data item for which data is being exchanged during the transaction. This handle must have been created by a previous call to the DdeCreateStringHandle function. This parameter is ignored (and should be set to 0L) if the wType parameter is XTYP_EXECUTE.
        wFmt - The standard clipboard format in which the data item is being submitted or requested.
        timeout - The maximum amount of time, in milliseconds, that the client will wait for a response from the server application in a synchronous transaction. This parameter should be TIMEOUT_ASYNC for asynchronous transactions.
        result - A pointer to a variable that receives the result of the transaction. An application that does not check the result can use NULL for this value. For synchronous transactions, the low-order word of this variable contains any applicable DDE_ flags resulting from the transaction. This provides support for applications dependent on DDE_APPSTATUS bits. It is, however, recommended that applications no longer use these bits because they may not be supported in future versions of the Dynamic Data Exchange Management Library (DDEML). For asynchronous transactions, this variable is filled with a unique transaction identifier for use with the DdeAbandonTransaction function and the XTYP_XACT_COMPLETE transaction.
        userHandle - data to associate with the transaction

        If an error occurs, a DdemlException is raised with the appropriate error code:

        • DMLERR_NOTPROCESSED
      • advstart

        void advstart(java.lang.String item,
                      int wFmt,
                      int timeout,
                      WinDef.DWORDByReference result,
                      BaseTSD.DWORD_PTR userHandle)
        Begins a data transaction between a client and a server. Only a Dynamic Data Exchange (DDE) client application can call this function, and the application can use it only after establishing a conversation with the server.
        Parameters:
        item - The data item for which data is being exchanged during the transaction. This parameter is ignored (and should be set to NULL) if the wType parameter is XTYP_EXECUTE.
        wFmt - The standard clipboard format in which the data item is being submitted or requested.
        timeout - The maximum amount of time, in milliseconds, that the client will wait for a response from the server application in a synchronous transaction. This parameter should be TIMEOUT_ASYNC for asynchronous transactions.
        result - A pointer to a variable that receives the result of the transaction. An application that does not check the result can use NULL for this value. For synchronous transactions, the low-order word of this variable contains any applicable DDE_ flags resulting from the transaction. This provides support for applications dependent on DDE_APPSTATUS bits. It is, however, recommended that applications no longer use these bits because they may not be supported in future versions of the Dynamic Data Exchange Management Library (DDEML). For asynchronous transactions, this variable is filled with a unique transaction identifier for use with the DdeAbandonTransaction function and the XTYP_XACT_COMPLETE transaction.
        userHandle - data to associate with the transaction

        If an error occurs, a DdemlException is raised with the appropriate error code:

        • DMLERR_NOTPROCESSED
      • advstop

        void advstop(Ddeml.HSZ item,
                     int wFmt,
                     int timeout,
                     WinDef.DWORDByReference result,
                     BaseTSD.DWORD_PTR userHandle)
        A client uses the XTYP_ADVSTOP transaction to end an advise loop with a server. A Dynamic Data Exchange (DDE) server callback function, DdeCallback, receives this transaction when a client specifies XTYP_ADVSTOP in the DdeClientTransaction function.
        Parameters:
        item - A handle to the data item for which data is being exchanged during the transaction. This handle must have been created by a previous call to the DdeCreateStringHandle function. This parameter is ignored (and should be set to 0L) if the wType parameter is XTYP_EXECUTE.
        wFmt - The standard clipboard format in which the data item is being submitted or requested.
        timeout - The maximum amount of time, in milliseconds, that the client will wait for a response from the server application in a synchronous transaction. This parameter should be TIMEOUT_ASYNC for asynchronous transactions.
        result - A pointer to a variable that receives the result of the transaction. An application that does not check the result can use NULL for this value. For synchronous transactions, the low-order word of this variable contains any applicable DDE_ flags resulting from the transaction. This provides support for applications dependent on DDE_APPSTATUS bits. It is, however, recommended that applications no longer use these bits because they may not be supported in future versions of the Dynamic Data Exchange Management Library (DDEML). For asynchronous transactions, this variable is filled with a unique transaction identifier for use with the DdeAbandonTransaction function and the XTYP_XACT_COMPLETE transaction.
        userHandle - data to associate with the transaction

        If an error occurs, a DdemlException is raised with the appropriate error code:

        • DMLERR_NOTPROCESSED
      • advstop

        void advstop(java.lang.String item,
                     int wFmt,
                     int timeout,
                     WinDef.DWORDByReference result,
                     BaseTSD.DWORD_PTR userHandle)
        A client uses the XTYP_ADVSTOP transaction to end an advise loop with a server. A Dynamic Data Exchange (DDE) server callback function, DdeCallback, receives this transaction when a client specifies XTYP_ADVSTOP in the DdeClientTransaction function.
        Parameters:
        item - The data item for which data is being exchanged during the transaction. This parameter is ignored (and should be set to NULL) if the wType parameter is XTYP_EXECUTE.
        wFmt - The standard clipboard format in which the data item is being submitted or requested.
        timeout - The maximum amount of time, in milliseconds, that the client will wait for a response from the server application in a synchronous transaction. This parameter should be TIMEOUT_ASYNC for asynchronous transactions.
        result - A pointer to a variable that receives the result of the transaction. An application that does not check the result can use NULL for this value. For synchronous transactions, the low-order word of this variable contains any applicable DDE_ flags resulting from the transaction. This provides support for applications dependent on DDE_APPSTATUS bits. It is, however, recommended that applications no longer use these bits because they may not be supported in future versions of the Dynamic Data Exchange Management Library (DDEML). For asynchronous transactions, this variable is filled with a unique transaction identifier for use with the DdeAbandonTransaction function and the XTYP_XACT_COMPLETE transaction.
        userHandle - data to associate with the transaction

        If an error occurs, a DdemlException is raised with the appropriate error code:

        • DMLERR_NOTPROCESSED
      • abandonTransaction

        void abandonTransaction(int transactionId)
        Abandons the specified asynchronous transaction and releases all resources associated with the transaction.
        Parameters:
        transactionId - The identifier of the transaction to be abandoned. If this parameter is 0L, all active transactions in the specified conversation are abandoned.

        If the method fails a DdeException will be raised with the corresponding errorCode:

        • DMLERR_DLL_NOT_INITIALIZED
        • DMLERR_INVALIDPARAMETER
        • DMLERR_NO_ERROR
        • DMLERR_UNFOUND_QUEUE_ID
      • abandonTransactions

        void abandonTransactions()
        Abandons all transactions of this conversation and releases all resources associated with the transaction.

        If the method fails a DdeException will be raised with the corresponding errorCode:

        • DMLERR_DLL_NOT_INITIALIZED
        • DMLERR_INVALIDPARAMETER
        • DMLERR_NO_ERROR
        • DMLERR_UNFOUND_QUEUE_ID
      • impersonateClient

        void impersonateClient()
        Impersonates a Dynamic Data Exchange (DDE) client application in a DDE client conversation.
      • close

        void close()
        Terminates a conversation started by either the DdeConnect or DdeConnectList function and invalidates the specified conversation handle.

        Note: This wraps the DdeDisconnect function and aligns the name with the Closable-wording.

        If the method fails a DdeException will be raised with the corresponding errorCode:

        • DMLERR_DLL_NOT_INITIALIZED
        • DMLERR_NO_CONV_ESTABLISHED
        • DMLERR_NO_ERROR
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • reconnect

        void reconnect()
        Enables a client Dynamic Data Exchange Management Library (DDEML) application to attempt to reestablish a conversation with a service that has terminated a conversation with the client. When the conversation is reestablished, the Dynamic Data Exchange Management Library (DDEML) attempts to reestablish any preexisting advise loops.

        If the method fails a DdeException will be raised with the corresponding errorCode:

        • DMLERR_DLL_NOT_INITIALIZED
        • DMLERR_INVALIDPARAMETER
        • DMLERR_NO_CONV_ESTABLISHED
        • DMLERR_NO_ERROR
      • enableCallback

        boolean enableCallback(int wCmd)
        Enables or disables transactions for a specific conversation or for all conversations currently established by the calling application.
        Parameters:
        wCmd - The function code. This parameter can be one of the following values.
        ValueMeaning
        EC_ENABLEALLEnables all transactions for the specified conversation.
        EC_ENABLEONEEnables one transaction for the specified conversation.
        EC_DISABLEDisables all blockable transactions for the specified conversation.

        A server application can disable the following transactions:

        • XTYP_ADVSTART
        • XTYP_ADVSTOP
        • XTYP_EXECUTE
        • XTYP_POKE
        • XTYP_REQUEST

        A client application can disable the following transactions:

        • XTYP_ADVDATA
        • XTYP_XACT_COMPLETE
        EC_QUERYWAITINGDetermines whether any transactions are in the queue for the specified conversation.
        Returns:
        If the function succeeds, the return value is nonzero.

        If the function fails, the return value is zero.

        If the wCmd parameter is EC_QUERYWAITING, and the application transaction queue contains one or more unprocessed transactions that are not being processed, the return value is TRUE; otherwise, it is FALSE.

        If the method fails a DdeException will be raised with the corresponding errorCode:

        • DMLERR_DLL_NOT_INITIALIZED
        • DMLERR_INVALIDPARAMETER
        • DMLERR_NO_ERROR
      • setUserHandle

        void setUserHandle(int id,
                           BaseTSD.DWORD_PTR hUser)
                    throws DdemlUtil.DdemlException
        Associates an application-defined value with a conversation handle or a transaction identifier. This is useful for simplifying the processing of asynchronous transactions. An application can use the DdeQueryConvInfo function to retrieve this value.
        Parameters:
        id - The transaction identifier to associate with the value specified by the hUser parameter. An application should set this parameter to QID_SYNC to associate hUser with the conversation identified by the hConv parameter.
        hUser - The value to be associated with the conversation handle.

        If the method fails a DdeException will be raised with the corresponding errorCode:

        • DMLERR_DLL_NOT_INITIALIZED
        • DMLERR_INVALIDPARAMETER
        • DMLERR_NO_ERROR
        • DMLERR_UNFOUND_QUEUE_ID
        Throws:
        DdemlUtil.DdemlException
      • queryConvInfo

        Ddeml.CONVINFO queryConvInfo(int idTransaction)
                              throws DdemlUtil.DdemlException
        Retrieves information about a Dynamic Data Exchange (DDE) transaction and about the conversation in which the transaction takes place.
        Parameters:
        idTransaction - The transaction. For asynchronous transactions, this parameter should be a transaction identifier returned by the DdeClientTransaction function. For synchronous transactions, this parameter should be QID_SYNC.
        Returns:
        The CONVINFO structure

        If the method fails a DdeException will be raised with the corresponding errorCode:

        • DMLERR_DLL_NOT_INITIALIZED
        • DMLERR_NO_CONV_ESTABLISHED
        • DMLERR_NO_ERROR
        • DMLERR_UNFOUND_QUEUE_ID
        Throws:
        DdemlUtil.DdemlException
JNA API 5.3.1

Copyright © 2007-2018 Timothy Wall. All Rights Reserved.