DdemlUtil.DdeConnection (JNA API)

com.sun.jna.platform.win32

## Class DdemlUtil.DdeConnection

- java.lang.Object
- - com.sun.jna.platform.win32.DdemlUtil.DdeConnection

- All Implemented Interfaces:
    DdemlUtil.IDdeConnection, java.io.Closeable, java.lang.AutoCloseable
  Enclosing class:
    DdemlUtil

      public static class DdemlUtil.DdeConnection
      extends java.lang.Object
      implements DdemlUtil.IDdeConnection

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DdemlUtil.DdeConnection(DdemlUtil.IDdeClient client, Ddeml.HCONV conv)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `abandonTransaction(int transactionId)` Abandons the specified asynchronous transaction and releases all resources associated with the transaction.
    `void` | `abandonTransactions()` Abandons all transactions of this conversation and releases all resources associated with the transaction.
    `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.
    `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.
    `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.
    `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.
    `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.
    `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.
    `void` | `close()` Terminates a conversation started by either the DdeConnect or DdeConnectList function and invalidates the specified conversation handle.
    `boolean` | `enableCallback(int wCmd)` Enables or disables transactions for a specific conversation or for all conversations currently established by the calling application.
    `void` | `execute(java.lang.String executeString, int timeout, WinDef.DWORDByReference result, BaseTSD.DWORD_PTR userHandle)` Run an XTYP_EXECUTE client transaction.
    `Ddeml.HCONV` | `getConv()`
    `void` | `impersonateClient()` Impersonates a Dynamic Data Exchange (DDE) client application in a DDE client conversation.
    `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
    `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
    `Ddeml.CONVINFO` | `queryConvInfo(int idTransaction)` Retrieves information about a Dynamic Data Exchange (DDE) transaction and about the conversation in which the transaction takes place.
    `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.
    `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.
    `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.
    `void` | `setUserHandle(int id, BaseTSD.DWORD_PTR hUser)` Associates an application-defined value with a conversation handle or a transaction identifier.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DdemlUtil.DdeConnection

          public DdemlUtil.DdeConnection(DdemlUtil.IDdeClient client,
                                 Ddeml.HCONV conv)

  - ### Method Detail

    - #### getConv

          public Ddeml.HCONV getConv()

      Specified by:
        `getConv` in interface `DdemlUtil.IDdeConnection`

    - #### abandonTransaction

          public void abandonTransaction(int transactionId)

      Description copied from interface: `DdemlUtil.IDdeConnection`
      Abandons the specified asynchronous transaction and releases all resources associated with the transaction.
      Specified by:
        `abandonTransaction` in interface `DdemlUtil.IDdeConnection`
      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

          public void abandonTransactions()

      Description copied from interface: `DdemlUtil.IDdeConnection`
      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
      Specified by:
        `abandonTransactions` in interface `DdemlUtil.IDdeConnection`

    - #### clientTransaction

          public Ddeml.HDDEDATA clientTransaction(Pointer data,
                                         int dataLength,
                                         Ddeml.HSZ item,
                                         int wFmt,
                                         int transaction,
                                         int timeout,
                                         WinDef.DWORDByReference result,
                                         BaseTSD.DWORD_PTR userHandle)

      Description copied from interface: `DdemlUtil.IDdeConnection`
      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.
      Specified by:
        `clientTransaction` in interface `DdemlUtil.IDdeConnection`
      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.

        Value | Meaning
        --- | ---
        XTYP_ADVSTART | Begins 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_ADVSTOP | Ends an advise loop.
        XTYP_EXECUTE | Begins an execute transaction.
        XTYP_POKE | Begins a poke transaction.
        XTYP_REQUEST | Begins 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

          public Ddeml.HDDEDATA clientTransaction(Pointer data,
                                         int dataLength,
                                         java.lang.String item,
                                         int wFmt,
                                         int transaction,
                                         int timeout,
                                         WinDef.DWORDByReference result,
                                         BaseTSD.DWORD_PTR userHandle)

      Description copied from interface: `DdemlUtil.IDdeConnection`
      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.
      Specified by:
        `clientTransaction` in interface `DdemlUtil.IDdeConnection`
      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 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.

        Value | Meaning
        --- | ---
        XTYP_ADVSTART | Begins 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_ADVSTOP | Ends an advise loop.
        XTYP_EXECUTE | Begins an execute transaction.
        XTYP_POKE | Begins a poke transaction.
        XTYP_REQUEST | Begins 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

    - #### poke

          public void poke(Pointer data,
                  int dataLength,
                  Ddeml.HSZ item,
                  int wFmt,
                  int timeout,
                  WinDef.DWORDByReference result,
                  BaseTSD.DWORD_PTR userHandle)

      Description copied from interface: `DdemlUtil.IDdeConnection`
      Run an XTYP_POKE client transaction
      Specified by:
        `poke` in interface `DdemlUtil.IDdeConnection`
      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.
        `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
        `userHandle` - data to associate with the transaction

    - #### poke

          public void poke(Pointer data,
                  int dataLength,
                  java.lang.String item,
                  int wFmt,
                  int timeout,
                  WinDef.DWORDByReference result,
                  BaseTSD.DWORD_PTR userHandle)

      Description copied from interface: `DdemlUtil.IDdeConnection`
      Run an XTYP_POKE client transaction
      Specified by:
        `poke` in interface `DdemlUtil.IDdeConnection`
      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 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.
        `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
        `userHandle` - data to associate with the transaction

    - #### request

          public Ddeml.HDDEDATA request(Ddeml.HSZ item,
                               int wFmt,
                               int timeout,
                               WinDef.DWORDByReference result,
                               BaseTSD.DWORD_PTR userHandle)

      Description copied from interface: `DdemlUtil.IDdeConnection`
      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.
      Specified by:
        `request` in interface `DdemlUtil.IDdeConnection`
      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

          public Ddeml.HDDEDATA request(java.lang.String item,
                               int wFmt,
                               int timeout,
                               WinDef.DWORDByReference result,
                               BaseTSD.DWORD_PTR userHandle)

      Description copied from interface: `DdemlUtil.IDdeConnection`
      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.
      Specified by:
        `request` in interface `DdemlUtil.IDdeConnection`
      Parameters:
        `item` - 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

    - #### execute

          public void execute(java.lang.String executeString,
                     int timeout,
                     WinDef.DWORDByReference result,
                     BaseTSD.DWORD_PTR userHandle)

      Description copied from interface: `DdemlUtil.IDdeConnection`
      Run an XTYP_EXECUTE client transaction.
      Specified by:
        `execute` in interface `DdemlUtil.IDdeConnection`
      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

    - #### advstart

          public void advstart(Ddeml.HSZ item,
                      int wFmt,
                      int timeout,
                      WinDef.DWORDByReference result,
                      BaseTSD.DWORD_PTR userHandle)

      Description copied from interface: `DdemlUtil.IDdeConnection`
      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.
      Specified by:
        `advstart` in interface `DdemlUtil.IDdeConnection`
      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

          public void advstart(java.lang.String item,
                      int wFmt,
                      int timeout,
                      WinDef.DWORDByReference result,
                      BaseTSD.DWORD_PTR userHandle)

      Description copied from interface: `DdemlUtil.IDdeConnection`
      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.
      Specified by:
        `advstart` in interface `DdemlUtil.IDdeConnection`
      Parameters:
        `item` - 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

          public void advstop(Ddeml.HSZ item,
                     int wFmt,
                     int timeout,
                     WinDef.DWORDByReference result,
                     BaseTSD.DWORD_PTR userHandle)

      Description copied from interface: `DdemlUtil.IDdeConnection`
      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.
      Specified by:
        `advstop` in interface `DdemlUtil.IDdeConnection`
      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

          public void advstop(java.lang.String item,
                     int wFmt,
                     int timeout,
                     WinDef.DWORDByReference result,
                     BaseTSD.DWORD_PTR userHandle)

      Description copied from interface: `DdemlUtil.IDdeConnection`
      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.
      Specified by:
        `advstop` in interface `DdemlUtil.IDdeConnection`
      Parameters:
        `item` - 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

    - #### impersonateClient

          public void impersonateClient()

      Description copied from interface: `DdemlUtil.IDdeConnection`
      Impersonates a Dynamic Data Exchange (DDE) client application in a DDE client conversation.
      Specified by:
        `impersonateClient` in interface `DdemlUtil.IDdeConnection`

    - #### close

          public void close()

      Description copied from interface: `DdemlUtil.IDdeConnection`
      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 `DdemlUtil.IDdeConnection`
      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`

    - #### reconnect

          public void reconnect()

      Description copied from interface: `DdemlUtil.IDdeConnection`
      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
      Specified by:
        `reconnect` in interface `DdemlUtil.IDdeConnection`

    - #### enableCallback

          public boolean enableCallback(int wCmd)

      Description copied from interface: `DdemlUtil.IDdeConnection`
      Enables or disables transactions for a specific conversation or for all conversations currently established by the calling application.
      Specified by:
        `enableCallback` in interface `DdemlUtil.IDdeConnection`
      Parameters:
        `wCmd` - The function code. This parameter can be one of the following values.

        Value | Meaning
        --- | ---
        EC_ENABLEALL | Enables all transactions for the specified conversation.
        EC_ENABLEONE | Enables one transaction for the specified conversation.
        EC_DISABLE | Disables 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_QUERYWAITING | Determines 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

          public void setUserHandle(int id,
                           BaseTSD.DWORD_PTR hUser)
                             throws DdemlUtil.DdemlException

      Description copied from interface: `DdemlUtil.IDdeConnection`
      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.
      Specified by:
        `setUserHandle` in interface `DdemlUtil.IDdeConnection`
      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

          public Ddeml.CONVINFO queryConvInfo(int idTransaction)
                                       throws DdemlUtil.DdemlException

      Description copied from interface: `DdemlUtil.IDdeConnection`
      Retrieves information about a Dynamic Data Exchange (DDE) transaction and about the conversation in which the transaction takes place.
      Specified by:
        `queryConvInfo` in interface `DdemlUtil.IDdeConnection`
      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`

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