DdemlUtil.StandaloneDdeClient (JNA API)

com.sun.jna.platform.win32

## Class DdemlUtil.StandaloneDdeClient

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

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

      public static class DdemlUtil.StandaloneDdeClient
      extends java.lang.Object
      implements DdemlUtil.IDdeClient, java.io.Closeable

  StandaloneDdeClient is a convenience class, that wraps a DdeClient and a `User32Util.MessageLoopThread`. The DdeClient needs a running windows message loop, which is supplied by the MessageLoopThread.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StandaloneDdeClient()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `abandonTransactions()` Abandons all asynchronous transaction and releases all resources associated with the transaction.
    `Pointer` | `accessData(Ddeml.HDDEDATA hData, WinDef.DWORDByReference pcbDataSize)` An application must call the DdeUnaccessData function when it has finished accessing the data in the object.
    `Ddeml.HDDEDATA` | `addData(Ddeml.HDDEDATA hData, Pointer pSrc, int cb, int cbOff)` Adds data to the specified Dynamic Data Exchange (DDE) object.
    `void` | `close()`
    `DdemlUtil.IDdeConnection` | `connect(Ddeml.HSZ service, Ddeml.HSZ topic, Ddeml.CONVCONTEXT convcontext)` Establishes a conversation with a server application that supports the specified service name and topic name pair.
    `DdemlUtil.IDdeConnection` | `connect(java.lang.String service, java.lang.String topic, Ddeml.CONVCONTEXT convcontext)` Establishes a conversation with a server application that supports the specified service name and topic name pair.
    `DdemlUtil.IDdeConnectionList` | `connectList(Ddeml.HSZ service, Ddeml.HSZ topic, DdemlUtil.IDdeConnectionList existingList, Ddeml.CONVCONTEXT ctx)` Establishes a conversation with all server applications that support the specified service name and topic name pair.
    `DdemlUtil.IDdeConnectionList` | `connectList(java.lang.String service, java.lang.String topic, DdemlUtil.IDdeConnectionList existingList, Ddeml.CONVCONTEXT ctx)` Establishes a conversation with all server applications that support the specified service name and topic name pair.
    `Ddeml.HDDEDATA` | `createDataHandle(Pointer pSrc, int cb, int cbOff, Ddeml.HSZ hszItem, int wFmt, int afCmd)` Creates a Dynamic Data Exchange (DDE) object and fills the object with data from the specified buffer.
    `Ddeml.HSZ` | `createStringHandle(java.lang.String value)` Creates a handle that identifies the specified string.
    `boolean` | `enableCallback(int wCmd)` Enables or disables transactions for a specific conversation or for all conversations currently established by the calling application.
    `void` | `freeDataHandle(Ddeml.HDDEDATA hData)` Frees a Dynamic Data Exchange (DDE) object and deletes the data handle associated with the object.
    `boolean` | `freeStringHandle(Ddeml.HSZ value)` Frees a string handle in the calling application.
    `int` | `getData(Ddeml.HDDEDATA hData, Pointer pDst, int cbMax, int cbOff)` Copies data from the specified Dynamic Data Exchange (DDE) object to the specified local buffer.
    `java.lang.Integer` | `getInstanceIdentitifier()`
    `int` | `getLastError()`
    `void` | `initialize(int afCmd)` Registers an application with the Dynamic Data Exchange Management Library (DDEML).
    `boolean` | `keepStringHandle(Ddeml.HSZ value)` Increments the usage count associated with the specified handle.
    `void` | `nameService(Ddeml.HSZ name, int afCmd)` Registers or unregisters the service names a Dynamic Data Exchange (DDE) server supports.
    `void` | `nameService(java.lang.String name, int afCmd)` Registers or unregisters the service names a Dynamic Data Exchange (DDE) server supports.
    `void` | `postAdvise(Ddeml.HSZ hszTopic, Ddeml.HSZ hszItem)` Causes the system to send an XTYP_ADVREQ transaction to the calling (server) application's Dynamic Data Exchange (DDE) callback function for each client with an active advise loop on the specified topic and item.
    `void` | `postAdvise(java.lang.String hszTopic, java.lang.String hszItem)` Causes the system to send an XTYP_ADVREQ transaction to the calling (server) application's Dynamic Data Exchange (DDE) callback function for each client with an active advise loop on the specified topic and item.
    `java.lang.String` | `queryString(Ddeml.HSZ value)` Copies text associated with a string handle into a buffer.
    `void` | `registerAdvdataHandler(DdemlUtil.AdvdataHandler handler)`
    `void` | `registerAdvReqHandler(DdemlUtil.AdvreqHandler handler)`
    `void` | `registerAdvstartHandler(DdemlUtil.AdvstartHandler handler)`
    `void` | `registerAdvstopHandler(DdemlUtil.AdvstopHandler handler)`
    `void` | `registerConnectConfirmHandler(DdemlUtil.ConnectConfirmHandler handler)`
    `void` | `registerConnectHandler(DdemlUtil.ConnectHandler handler)`
    `void` | `registerDisconnectHandler(DdemlUtil.DisconnectHandler handler)`
    `void` | `registerErrorHandler(DdemlUtil.ErrorHandler handler)`
    `void` | `registerExecuteHandler(DdemlUtil.ExecuteHandler handler)`
    `void` | `registerMonitorHandler(DdemlUtil.MonitorHandler handler)`
    `void` | `registerPokeHandler(DdemlUtil.PokeHandler handler)`
    `void` | `registerRegisterHandler(DdemlUtil.RegisterHandler handler)`
    `void` | `registerRequestHandler(DdemlUtil.RequestHandler handler)`
    `void` | `registerUnregisterHandler(DdemlUtil.UnregisterHandler handler)`
    `void` | `registerWildconnectHandler(DdemlUtil.WildconnectHandler handler)`
    `void` | `registerXactCompleteHandler(DdemlUtil.XactCompleteHandler handler)`
    `void` | `unaccessData(Ddeml.HDDEDATA hData)` Unaccesses a Dynamic Data Exchange (DDE) object.
    `boolean` | `uninitialize()` Frees all Dynamic Data Exchange Management Library (DDEML) resources associated with the calling application.
    `void` | `unregisterAdvdataHandler(DdemlUtil.AdvdataHandler handler)`
    `void` | `unregisterAdvReqHandler(DdemlUtil.AdvreqHandler handler)`
    `void` | `unregisterAdvstartHandler(DdemlUtil.AdvstartHandler handler)`
    `void` | `unregisterAdvstopHandler(DdemlUtil.AdvstopHandler handler)`
    `void` | `unregisterConnectConfirmHandler(DdemlUtil.ConnectConfirmHandler handler)`
    `void` | `unregisterConnectHandler(DdemlUtil.ConnectHandler handler)`
    `void` | `unregisterDisconnectHandler(DdemlUtil.DisconnectHandler handler)`
    `void` | `unregisterErrorHandler(DdemlUtil.ErrorHandler handler)`
    `void` | `unregisterExecuteHandler(DdemlUtil.ExecuteHandler handler)`
    `void` | `unregisterMonitorHandler(DdemlUtil.MonitorHandler handler)`
    `void` | `unregisterPokeHandler(DdemlUtil.PokeHandler handler)`
    `void` | `unregisterRegisterHandler(DdemlUtil.RegisterHandler handler)`
    `void` | `unregisterRequestHandler(DdemlUtil.RequestHandler handler)`
    `void` | `unregisterUnregisterHandler(DdemlUtil.UnregisterHandler handler)`
    `void` | `unregisterWildconnectHandler(DdemlUtil.WildconnectHandler handler)`
    `void` | `unregisterXactCompleteHandler(DdemlUtil.XactCompleteHandler handler)`
    `DdemlUtil.IDdeConnection` | `wrap(Ddeml.HCONV conv)` Wrap a connection handle into a IDdeConnection helper class.

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

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

- - ### Constructor Detail

    - #### StandaloneDdeClient

          public StandaloneDdeClient()

  - ### Method Detail

    - #### getInstanceIdentitifier

          public java.lang.Integer getInstanceIdentitifier()

      Specified by:
        `getInstanceIdentitifier` in interface `DdemlUtil.IDdeClient`

    - #### initialize

          public void initialize(int afCmd)
                          throws DdemlUtil.DdemlException

      Description copied from interface: `DdemlUtil.IDdeClient`
      Registers an application with the Dynamic Data Exchange Management Library (DDEML). An application must call this function before calling any other Dynamic Data Exchange Management Library (DDEML) function.
      Specified by:
        `initialize` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `afCmd` - A set of APPCMD_, CBF_, and MF_ flags. The APPCMD_ flags provide special instructions to DdeInitialize. The CBF_ flags specify filters that prevent specific types of transactions from reaching the callback function. The MF_ flags specify the types of DDE activity that a DDE monitoring application monitors. Using these flags enhances the performance of a DDE application by eliminating unnecessary calls to the callback function.

        This parameter can be one or more of the following values.

        Value | Meaning
        --- | ---
        APPCLASS_MONITOR 0x00000001L | Makes it possible for the application to monitor DDE activity in the system. This flag is for use by DDE monitoring applications. The application specifies the types of DDE activity to monitor by combining one or more monitor flags with the APPCLASS_MONITOR flag. For details, see the following Remarks section.
        APPCLASS_STANDARD 0x00000000L | Registers the application as a standard (nonmonitoring) DDEML application.
        APPCMD_CLIENTONLY 0x00000010L | Prevents the application from becoming a server in a DDE conversation. The application can only be a client. This flag reduces consumption of resources by the DDEML. It includes the functionality of the CBF_FAIL_ALLSVRXACTIONS flag.
        APPCMD_FILTERINITS 0x00000020L | Prevents the DDEML from sending XTYP_CONNECT and XTYP_WILDCONNECT transactions to the application until the application has created its string handles and registered its service names or has turned off filtering by a subsequent call to the DdeNameService or DdeInitialize function. This flag is always in effect when an application calls DdeInitialize for the first time, regardless of whether the application specifies the flag. On subsequent calls to DdeInitialize, not specifying this flag turns off the application's service-name filters, but specifying it turns on the application's service name filters.
        CBF_FAIL_ALLSVRXACTIONS 0x0003f000 | Prevents the callback function from receiving server transactions. The system returns DDE_FNOTPROCESSED to each client that sends a transaction to this application. This flag is equivalent to combining all CBF_FAIL_ flags.
        CBF_FAIL_ADVISES 0x00004000 | Prevents the callback function from receiving XTYP_ADVSTART and XTYP_ADVSTOP transactions. The system returns DDE_FNOTPROCESSED to each client that sends an XTYP_ADVSTART or XTYP_ADVSTOP transaction to the server.
        CBF_FAIL_CONNECTIONS 0x00002000 | Prevents the callback function from receiving XTYP_CONNECT and XTYP_WILDCONNECT transactions.
        CBF_FAIL_EXECUTES 0x00008000 | Prevents the callback function from receiving XTYP_EXECUTE transactions. The system returns DDE_FNOTPROCESSED to a client that sends an XTYP_EXECUTE transaction to the server.
        CBF_FAIL_POKES 0x00010000 | Prevents the callback function from receiving XTYP_POKE transactions. The system returns DDE_FNOTPROCESSED to a client that sends an XTYP_POKE transaction to the server.
        CBF_FAIL_REQUESTS 0x00020000 | Prevents the callback function from receiving XTYP_REQUEST transactions. The system returns DDE_FNOTPROCESSED to a client that sends an XTYP_REQUEST transaction to the server.
        CBF_FAIL_SELFCONNECTIONS 0x00001000 | Prevents the callback function from receiving XTYP_CONNECT transactions from the application's own instance. This flag prevents an application from establishing a DDE conversation with its own instance. An application should use this flag if it needs to communicate with other instances of itself but not with itself.
        CBF_SKIP_ALLNOTIFICATIONS 0x003c0000 | Prevents the callback function from receiving any notifications. This flag is equivalent to combining all CBF_SKIP_ flags.
        CBF_SKIP_CONNECT_CONFIRMS 0x00040000 | Prevents the callback function from receiving XTYP_CONNECT_CONFIRM notifications.
        CBF_SKIP_DISCONNECTS 0x00200000 | Prevents the callback function from receiving XTYP_DISCONNECT notifications.
        CBF_SKIP_REGISTRATIONS 0x00080000 | Prevents the callback function from receiving XTYP_REGISTER notifications.
        CBF_SKIP_UNREGISTRATIONS 0x00100000 | Prevents the callback function from receiving XTYP_UNREGISTER notifications.
        MF_CALLBACKS 0x08000000 | Notifies the callback function whenever a transaction is sent to any DDE callback function in the system.
        MF_CONV 0x40000000 | Notifies the callback function whenever a conversation is established or terminated.
        MF_ERRORS 0x10000000 | Notifies the callback function whenever a DDE error occurs.
        MF_HSZ_INFO 0x01000000 | Notifies the callback function whenever a DDE application creates, frees, or increments the usage count of a string handle or whenever a string handle is freed as a result of a call to the DdeUninitialize function.
        MF_LINKS 0x20000000 | Notifies the callback function whenever an advise loop is started or ended.
        MF_POSTMSGS 0x04000000 | Notifies the callback function whenever the system or an application posts a DDE message.
        MF_SENDMSGS 0x02000000 | Notifies the callback function whenever the system or an application sends a DDE message.

        If the function failsa DdemlException is raised with one of the following errroCodes:

        - DMLERR_DLL_USAGE
        - DMLERR_INVALIDPARAMETER
        - DMLERR_SYS_ERROR
      Throws:
        `DdemlUtil.DdemlException`

    - #### createStringHandle

          public Ddeml.HSZ createStringHandle(java.lang.String value)
                                       throws DdemlUtil.DdemlException

      Description copied from interface: `DdemlUtil.IDdeClient`
      Creates a handle that identifies the specified string. A Dynamic Data Exchange (DDE) client or server application can pass the string handle as a parameter to other Dynamic Data Exchange Management Library (DDEML) functions.
      Specified by:
        `createStringHandle` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `value` - The string for which a handle is to be created. This string can be up to 255 characters. The reason for this limit is that DDEML string management functions are implemented using atoms.
      Returns:
        If the function succeeds, the return value is a string handle. A parameter NULL will cause NULL to be returned.

        If the function fails, a DdemlException is raised with the corresponding errorCode:

        - DMLERR_INVALIDPARAMETER
        - DMLERR_NO_ERROR
        - DMLERR_SYS_ERROR
      Throws:
        `DdemlUtil.DdemlException`

    - #### nameService

          public void nameService(Ddeml.HSZ name,
                                  int afCmd)
                           throws DdemlUtil.DdemlException

      Description copied from interface: `DdemlUtil.IDdeClient`
      Registers or unregisters the service names a Dynamic Data Exchange (DDE) server supports. This function causes the system to send XTYP_REGISTER or XTYP_UNREGISTER transactions to other running Dynamic Data Exchange Management Library (DDEML) client applications.
      Specified by:
        `nameService` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `name` - A handle to the string that specifies the service name the server is registering or unregistering. An application that is unregistering all of its service names should set this parameter to 0L.
        `afCmd` - The service name options. This parameter can be one of the following values.

        Value | Meaning
        --- | ---
        DNS_REGISTER | Registers the error code service name.
        DNS_UNREGISTER | Unregisters the error code service name. If the hsz1 parameter is 0L, all service names registered by the server will be unregistered.
        DNS_FILTERON | Turns on service name initiation filtering. The filter prevents a server from receiving XTYP_CONNECT transactions for service names it has not registered. This is the default setting for this filter. If a server application does not register any service names, the application cannot receive XTYP_WILDCONNECT transactions.
        DNS_FILTEROFF | Turns off service name initiation filtering. If this flag is specified, the server receives an XTYP_CONNECT transaction whenever another DDE application calls the DdeConnect function, regardless of the service name.

        If the function fails, a DdemlException is raised with the corresponding errorCode:

        - DMLERR_DLL_NOT_INITIALIZED
        - DMLERR_DLL_USAGE
        - DMLERR_INVALIDPARAMETER
        - DMLERR_NO_ERROR
      Throws:
        `DdemlUtil.DdemlException`

    - #### getLastError

          public int getLastError()

      Specified by:
        `getLastError` in interface `DdemlUtil.IDdeClient`
      Returns:
        See `Ddeml`.DMLERR_*

    - #### connect

          public DdemlUtil.IDdeConnection connect(Ddeml.HSZ service,
                                                  Ddeml.HSZ topic,
                                                  Ddeml.CONVCONTEXT convcontext)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Establishes a conversation with a server application that supports the specified service name and topic name pair. If more than one such server exists, the system selects only one.
      Specified by:
        `connect` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `service` - A handle to the string that specifies the service name of the server application with which a conversation is to be established. This handle must have been created by a previous call to the DdeCreateStringHandle function. If this parameter is 0L, a conversation is established with any available server.
        `topic` - A handle to the string that specifies the name of the topic on which a conversation is to be established. This handle must have been created by a previous call to DdeCreateStringHandle. If this parameter is 0L, a conversation on any topic supported by the selected server is established.
        `convcontext` - A pointer to the CONVCONTEXT structure that contains conversation context information. If this parameter is NULL, the server receives the default CONVCONTEXT structure during the XTYP_CONNECT or XTYP_WILDCONNECT transaction.
      Returns:
        an established connection

        If the function fails, a DdemlException is raised with the corresponding errorCode:

        - DMLERR_DLL_NOT_INITIALIZED
        - DMLERR_INVALIDPARAMETER
        - DMLERR_NO_CONV_ESTABLISHED
        - DMLERR_NO_ERROR

    - #### queryString

          public java.lang.String queryString(Ddeml.HSZ value)
                                       throws DdemlUtil.DdemlException

      Description copied from interface: `DdemlUtil.IDdeClient`
      Copies text associated with a string handle into a buffer.
      Specified by:
        `queryString` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `value` - A handle to the string to copy. This handle must have been created by a previous call to the DdeCreateStringHandle function.
      Returns:
        String corresponding to the supplied handle
      Throws:
        `DdemlUtil.DdemlException`

    - #### createDataHandle

          public Ddeml.HDDEDATA createDataHandle(Pointer pSrc,
                                                 int cb,
                                                 int cbOff,
                                                 Ddeml.HSZ hszItem,
                                                 int wFmt,
                                                 int afCmd)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Creates a Dynamic Data Exchange (DDE) object and fills the object with data from the specified buffer. A DDE application uses this function during transactions that involve passing data to the partner application.
      Specified by:
        `createDataHandle` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `pSrc` - The data to be copied to the DDE object. If this parameter is NULL, no data is copied to the object.
        `cb` - The amount of memory, in bytes, to copy from the buffer pointed to by pSrc. (include the terminating NULL, if the data is a string). If this parameter is zero, the pSrc parameter is ignored.
        `cbOff` - An offset, in bytes, from the beginning of the buffer pointed to by the pSrc parameter. The data beginning at this offset is copied from the buffer to the DDE object.
        `hszItem` - A handle to the string that specifies the data item corresponding to the DDE object. This handle must have been created by a previous call to the DdeCreateStringHandle function. If the data handle is to be used in an XTYP_EXECUTE transaction, this parameter must be 0L.
        `wFmt` - The standard clipboard format of the data.
        `afCmd` - The creation flags. This parameter can be HDATA_APPOWNED, which specifies that the server application calling the DdeCreateDataHandle function owns the data handle this function creates. This flag enables the application to share the data handle with other DDEML applications rather than creating a separate handle to pass to each application. If this flag is specified, the application must eventually free the shared memory object associated with the handle by using the DdeFreeDataHandle function. If this flag is not specified, the handle becomes invalid in the application that created the handle after the data handle is returned by the application's DDE callback function or is used as a parameter in another DDEML function.
      Returns:
        If the function succeeds, the return value is a data handle.

        If the function fails a DdeException is raised with the following errorCodes:

        - DMLERR_DLL_NOT_INITIALIZED
        - DMLERR_INVALIDPARAMETER
        - DMLERR_MEMORY_ERROR
        - DMLERR_NO_ERROR

    - #### freeDataHandle

          public void freeDataHandle(Ddeml.HDDEDATA hData)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Frees a Dynamic Data Exchange (DDE) object and deletes the data handle associated with the object.
      Specified by:
        `freeDataHandle` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `hData` - A handle to the DDE object to be freed. This handle must have been created by a previous call to the DdeCreateDataHandle function or returned by the DdeClientTransaction function.

        If the function fails a DdeException is raised with the following errorCodes:

        - DMLERR_INVALIDPARAMETER
        - DMLERR_NO_ERROR

    - #### addData

          public Ddeml.HDDEDATA addData(Ddeml.HDDEDATA hData,
                                        Pointer pSrc,
                                        int cb,
                                        int cbOff)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Adds data to the specified Dynamic Data Exchange (DDE) object. An application can add data starting at any offset from the beginning of the object. If new data overlaps data already in the object, the new data overwrites the old data in the bytes where the overlap occurs. The contents of locations in the object that have not been written to are undefined.
      Specified by:
        `addData` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `hData` - A handle to the DDE object that receives additional data.
        `pSrc` - The data to be added to the DDE object.
        `cb` - The length, in bytes, of the data to be added to the DDE object, including the terminating NULL, if the data is a string.
        `cbOff` - An offset, in bytes, from the beginning of the DDE object. The additional data is copied to the object beginning at this offset.
      Returns:
        If the function succeeds, the return value is a new handle to the DDE object. The new handle is used in all references to the object.

        If the function fails a DdeException is raised with the following errorCodes:

        - DMLERR_DLL_NOT_INITIALIZED
        - DMLERR_INVALIDPARAMETER
        - DMLERR_MEMORY_ERROR
        - DMLERR_NO_ERROR

    - #### getData

          public int getData(Ddeml.HDDEDATA hData,
                             Pointer pDst,
                             int cbMax,
                             int cbOff)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Copies data from the specified Dynamic Data Exchange (DDE) object to the specified local buffer.
      Specified by:
        `getData` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `hData` - A handle to the DDE object that contains the data to copy.
        `pDst` - A pointer to the buffer that receives the data. If this parameter is NULL, the DdeGetData function returns the amount of data, in bytes, that would be copied to the buffer.
        `cbMax` - The maximum amount of data, in bytes, to copy to the buffer pointed to by the pDst parameter. Typically, this parameter specifies the length of the buffer pointed to by pDst.
        `cbOff` - An offset within the DDE object. Data is copied from the object beginning at this offset.
      Returns:
        If the pDst parameter points to a buffer, the return value is the size, in bytes, of the memory object associated with the data handle or the size specified in the cbMax parameter, whichever is lower.

        If the function fails a DdeException is raised with the following errorCodes:

        - DMLERR_DLL_NOT_INITIALIZED
        - DMLERR_INVALIDPARAMETER
        - DMLERR_NO_ERROR

    - #### accessData

          public Pointer accessData(Ddeml.HDDEDATA hData,
                                    WinDef.DWORDByReference pcbDataSize)

      Description copied from interface: `DdemlUtil.IDdeClient`
      An application must call the DdeUnaccessData function when it has finished accessing the data in the object.
      Specified by:
        `accessData` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `hData` - A handle to the DDE object to be accessed.
        `pcbDataSize` - A pointer to a variable that receives the size, in bytes, of the DDE object identified by the hData parameter. If this parameter is NULL, no size information is returned.
      Returns:
        If the function succeeds, the return value is a pointer to the first byte of data in the DDE object.

        If the function fails a DdeException is raised with the following errorCodes:

        - DMLERR_DLL_NOT_INITIALIZED
        - DMLERR_INVALIDPARAMETER
        - DMLERR_NO_ERROR

    - #### unaccessData

          public void unaccessData(Ddeml.HDDEDATA hData)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Unaccesses a Dynamic Data Exchange (DDE) object. An application must call this function after it has finished accessing the object.
      Specified by:
        `unaccessData` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `hData` - A handle to the DDE object.

        If the function fails a DdeException is raised with the following errorCodes:

        - DMLERR_DLL_NOT_INITIALIZED
        - DMLERR_INVALIDPARAMETER
        - DMLERR_NO_ERROR

    - #### postAdvise

          public void postAdvise(Ddeml.HSZ hszTopic,
                                 Ddeml.HSZ hszItem)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Causes the system to send an XTYP_ADVREQ transaction to the calling (server) application's Dynamic Data Exchange (DDE) callback function for each client with an active advise loop on the specified topic and item. A server application should call this function whenever the data associated with the topic name or item name pair changes.
      Specified by:
        `postAdvise` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `hszTopic` - A handle to a string that specifies the topic name. To send notifications for all topics with active advise loops, an application can set this parameter to 0L.
        `hszItem` - A handle to a string that specifies the item name. To send notifications for all items with active advise loops, an application can set this parameter to 0L.

        If the function fails a DdeException is raised with the following errorCodes:

        - DMLERR_DLL_NOT_INITIALIZED
        - DMLERR_DLL_USAGE
        - DMLERR_NO_ERROR

    - #### close

          public void close()
                     throws java.io.IOException

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Throws:
        `java.io.IOException`

    - #### freeStringHandle

          public boolean freeStringHandle(Ddeml.HSZ value)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Frees a string handle in the calling application.
      Specified by:
        `freeStringHandle` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `value` - A handle to the string handle to be freed. This handle must have been created by a previous call to the createStringHandle function. A NULL value will be silently ignored.
      Returns:
        true if the function succeeds.

    - #### keepStringHandle

          public boolean keepStringHandle(Ddeml.HSZ value)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Increments the usage count associated with the specified handle. This function enables an application to save a string handle passed to the application's Dynamic Data Exchange (DDE) callback function. Otherwise, a string handle passed to the callback function is deleted when the callback function returns. This function should also be used to keep a copy of a string handle referenced by the CONVINFO structure returned by the DdeQueryConvInfo function.
      Specified by:
        `keepStringHandle` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `value` - A handle to the string handle to be saved.
      Returns:
        true if the function succeeded

    - #### abandonTransactions

          public void abandonTransactions()

      Description copied from interface: `DdemlUtil.IDdeClient`
      Abandons all asynchronous transaction 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.IDdeClient`

    - #### connectList

          public DdemlUtil.IDdeConnectionList connectList(Ddeml.HSZ service,
                                                          Ddeml.HSZ topic,
                                                          DdemlUtil.IDdeConnectionList existingList,
                                                          Ddeml.CONVCONTEXT ctx)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Establishes a conversation with all server applications that support the specified service name and topic name pair. An application can also use this function to obtain a list of conversation handles by passing the function an existing conversation handle. The Dynamic Data Exchange Management Library removes the handles of any terminated conversations from the conversation list. The resulting conversation list contains the handles of all currently established conversations that support the specified service name and topic name.
      Specified by:
        `connectList` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `service` - A handle to the string that specifies the service name of the server application with which a conversation is to be established. If this parameter is 0L, the system attempts to establish conversations with all available servers that support the specified topic name.
        `topic` - A handle to the string that specifies the name of the topic on which a conversation is to be established. This handle must have been created by a previous call to the DdeCreateStringHandle function. If this parameter is 0L, the system will attempt to establish conversations on all topics supported by the selected server (or servers).
        `existingList` - An existinct conversation list to be enumerated. This parameter should be NULL if a new conversation list is to be established.
        `ctx` - A pointer to the CONVCONTEXT structure that contains conversation-context information. If this parameter is NULL, the server receives the default CONVCONTEXT structure during the XTYP_CONNECT or XTYP_WILDCONNECT transaction.
      Returns:
        The new ConnectionList

        If the function fails a DdeException is raised with the appropriate errorCode:

        - DMLERR_DLL_NOT_INITIALIZED
        - DMLERR_INVALIDPARAMETER
        - DMLERR_NO_CONV_ESTABLISHED
        - DMLERR_NO_ERROR
        - DMLERR_SYS_ERROR

    - #### enableCallback

          public boolean enableCallback(int wCmd)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Enables or disables transactions for a specific conversation or for all conversations currently established by the calling application.
      Specified by:
        `enableCallback` in interface `DdemlUtil.IDdeClient`
      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 function fails a DdeException is raised with the appropriate errorCode:

        - DMLERR_DLL_NOT_INITIALIZED
        - DMLERR_INVALIDPARAMETER
        - DMLERR_NO_ERROR

    - #### wrap

          public DdemlUtil.IDdeConnection wrap(Ddeml.HCONV conv)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Wrap a connection handle into a IDdeConnection helper class.
      Specified by:
        `wrap` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `conv` - HCONV structure to wrap
      Returns:
        wrapped IDdeConnection

    - #### connect

          public DdemlUtil.IDdeConnection connect(java.lang.String service,
                                                  java.lang.String topic,
                                                  Ddeml.CONVCONTEXT convcontext)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Establishes a conversation with a server application that supports the specified service name and topic name pair. If more than one such server exists, the system selects only one.
      Specified by:
        `connect` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `service` - The service name of the server application with which a conversation is to be established. This handle must have been created by a previous call to the DdeCreateStringHandle function. If this parameter is 0L, a conversation is established with any available server.
        `topic` - The name of the topic on which a conversation is to be established. This handle must have been created by a previous call to DdeCreateStringHandle. If this parameter is 0L, a conversation on any topic supported by the selected server is established.
        `convcontext` - A pointer to the CONVCONTEXT structure that contains conversation context information. If this parameter is NULL, the server receives the default CONVCONTEXT structure during the XTYP_CONNECT or XTYP_WILDCONNECT transaction.
      Returns:
        an established connection

        If the function fails, a DdemlException is raised with the corresponding errorCode:

        - DMLERR_DLL_NOT_INITIALIZED
        - DMLERR_INVALIDPARAMETER
        - DMLERR_NO_CONV_ESTABLISHED
        - DMLERR_NO_ERROR

    - #### uninitialize

          public boolean uninitialize()

      Description copied from interface: `DdemlUtil.IDdeClient`
      Frees all Dynamic Data Exchange Management Library (DDEML) resources associated with the calling application.
      Specified by:
        `uninitialize` in interface `DdemlUtil.IDdeClient`
      Returns:
        true if function succeeded

    - #### postAdvise

          public void postAdvise(java.lang.String hszTopic,
                                 java.lang.String hszItem)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Causes the system to send an XTYP_ADVREQ transaction to the calling (server) application's Dynamic Data Exchange (DDE) callback function for each client with an active advise loop on the specified topic and item. A server application should call this function whenever the data associated with the topic name or item name pair changes.
      Specified by:
        `postAdvise` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `hszTopic` - A string that specifies the topic name. To send notifications for all topics with active advise loops, an application can set this parameter to NULL.
        `hszItem` - A string that specifies the item name. To send notifications for all items with active advise loops, an application can set this parameter to NULL.

        If the function fails a DdeException is raised with the following errorCodes:

        - DMLERR_DLL_NOT_INITIALIZED
        - DMLERR_DLL_USAGE
        - DMLERR_NO_ERROR

    - #### connectList

          public DdemlUtil.IDdeConnectionList connectList(java.lang.String service,
                                                          java.lang.String topic,
                                                          DdemlUtil.IDdeConnectionList existingList,
                                                          Ddeml.CONVCONTEXT ctx)

      Description copied from interface: `DdemlUtil.IDdeClient`
      Establishes a conversation with all server applications that support the specified service name and topic name pair. An application can also use this function to obtain a list of conversation handles by passing the function an existing conversation handle. The Dynamic Data Exchange Management Library removes the handles of any terminated conversations from the conversation list. The resulting conversation list contains the handles of all currently established conversations that support the specified service name and topic name.
      Specified by:
        `connectList` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `service` - A string that specifies the service name of the server application with which a conversation is to be established. If this parameter is 0L, the system attempts to establish conversations with all available servers that support the specified topic name.
        `topic` - A string that specifies the name of the topic on which a conversation is to be established. This handle must have been created by a previous call to the DdeCreateStringHandle function. If this parameter is 0L, the system will attempt to establish conversations on all topics supported by the selected server (or servers).
        `existingList` - An existinct conversation list to be enumerated. This parameter should be NULL if a new conversation list is to be established.
        `ctx` - A pointer to the CONVCONTEXT structure that contains conversation-context information. If this parameter is NULL, the server receives the default CONVCONTEXT structure during the XTYP_CONNECT or XTYP_WILDCONNECT transaction.
      Returns:
        The new ConnectionList

        If the function fails a DdeException is raised with the appropriate errorCode:

        - DMLERR_DLL_NOT_INITIALIZED
        - DMLERR_INVALIDPARAMETER
        - DMLERR_NO_CONV_ESTABLISHED
        - DMLERR_NO_ERROR
        - DMLERR_SYS_ERROR

    - #### nameService

          public void nameService(java.lang.String name,
                                  int afCmd)
                           throws DdemlUtil.DdemlException

      Description copied from interface: `DdemlUtil.IDdeClient`
      Registers or unregisters the service names a Dynamic Data Exchange (DDE) server supports. This function causes the system to send XTYP_REGISTER or XTYP_UNREGISTER transactions to other running Dynamic Data Exchange Management Library (DDEML) client applications.
      Specified by:
        `nameService` in interface `DdemlUtil.IDdeClient`
      Parameters:
        `name` - A string that specifies the service name the server is registering or unregistering. An application that is unregistering all of its service names should set this parameter to NULL.
        `afCmd` - The service name options. This parameter can be one of the following values.

        Value | Meaning
        --- | ---
        DNS_REGISTER | Registers the error code service name.
        DNS_UNREGISTER | Unregisters the error code service name. If the hsz1 parameter is 0L, all service names registered by the server will be unregistered.
        DNS_FILTERON | Turns on service name initiation filtering. The filter prevents a server from receiving XTYP_CONNECT transactions for service names it has not registered. This is the default setting for this filter. If a server application does not register any service names, the application cannot receive XTYP_WILDCONNECT transactions.
        DNS_FILTEROFF | Turns off service name initiation filtering. If this flag is specified, the server receives an XTYP_CONNECT transaction whenever another DDE application calls the DdeConnect function, regardless of the service name.

        If the function fails, a DdemlException is raised with the corresponding errorCode:

        - DMLERR_DLL_NOT_INITIALIZED
        - DMLERR_DLL_USAGE
        - DMLERR_INVALIDPARAMETER
        - DMLERR_NO_ERROR
      Throws:
        `DdemlUtil.DdemlException`

    - #### registerAdvstartHandler

          public void registerAdvstartHandler(DdemlUtil.AdvstartHandler handler)

      Specified by:
        `registerAdvstartHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterAdvstartHandler

          public void unregisterAdvstartHandler(DdemlUtil.AdvstartHandler handler)

      Specified by:
        `unregisterAdvstartHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerAdvstopHandler

          public void registerAdvstopHandler(DdemlUtil.AdvstopHandler handler)

      Specified by:
        `registerAdvstopHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterAdvstopHandler

          public void unregisterAdvstopHandler(DdemlUtil.AdvstopHandler handler)

      Specified by:
        `unregisterAdvstopHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerConnectHandler

          public void registerConnectHandler(DdemlUtil.ConnectHandler handler)

      Specified by:
        `registerConnectHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterConnectHandler

          public void unregisterConnectHandler(DdemlUtil.ConnectHandler handler)

      Specified by:
        `unregisterConnectHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerAdvReqHandler

          public void registerAdvReqHandler(DdemlUtil.AdvreqHandler handler)

      Specified by:
        `registerAdvReqHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterAdvReqHandler

          public void unregisterAdvReqHandler(DdemlUtil.AdvreqHandler handler)

      Specified by:
        `unregisterAdvReqHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerRequestHandler

          public void registerRequestHandler(DdemlUtil.RequestHandler handler)

      Specified by:
        `registerRequestHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterRequestHandler

          public void unregisterRequestHandler(DdemlUtil.RequestHandler handler)

      Specified by:
        `unregisterRequestHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerWildconnectHandler

          public void registerWildconnectHandler(DdemlUtil.WildconnectHandler handler)

      Specified by:
        `registerWildconnectHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterWildconnectHandler

          public void unregisterWildconnectHandler(DdemlUtil.WildconnectHandler handler)

      Specified by:
        `unregisterWildconnectHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerAdvdataHandler

          public void registerAdvdataHandler(DdemlUtil.AdvdataHandler handler)

      Specified by:
        `registerAdvdataHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterAdvdataHandler

          public void unregisterAdvdataHandler(DdemlUtil.AdvdataHandler handler)

      Specified by:
        `unregisterAdvdataHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerExecuteHandler

          public void registerExecuteHandler(DdemlUtil.ExecuteHandler handler)

      Specified by:
        `registerExecuteHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterExecuteHandler

          public void unregisterExecuteHandler(DdemlUtil.ExecuteHandler handler)

      Specified by:
        `unregisterExecuteHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerPokeHandler

          public void registerPokeHandler(DdemlUtil.PokeHandler handler)

      Specified by:
        `registerPokeHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterPokeHandler

          public void unregisterPokeHandler(DdemlUtil.PokeHandler handler)

      Specified by:
        `unregisterPokeHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerConnectConfirmHandler

          public void registerConnectConfirmHandler(DdemlUtil.ConnectConfirmHandler handler)

      Specified by:
        `registerConnectConfirmHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterConnectConfirmHandler

          public void unregisterConnectConfirmHandler(DdemlUtil.ConnectConfirmHandler handler)

      Specified by:
        `unregisterConnectConfirmHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerDisconnectHandler

          public void registerDisconnectHandler(DdemlUtil.DisconnectHandler handler)

      Specified by:
        `registerDisconnectHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterDisconnectHandler

          public void unregisterDisconnectHandler(DdemlUtil.DisconnectHandler handler)

      Specified by:
        `unregisterDisconnectHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerErrorHandler

          public void registerErrorHandler(DdemlUtil.ErrorHandler handler)

      Specified by:
        `registerErrorHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterErrorHandler

          public void unregisterErrorHandler(DdemlUtil.ErrorHandler handler)

      Specified by:
        `unregisterErrorHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerRegisterHandler

          public void registerRegisterHandler(DdemlUtil.RegisterHandler handler)

      Specified by:
        `registerRegisterHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterRegisterHandler

          public void unregisterRegisterHandler(DdemlUtil.RegisterHandler handler)

      Specified by:
        `unregisterRegisterHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerXactCompleteHandler

          public void registerXactCompleteHandler(DdemlUtil.XactCompleteHandler handler)

      Specified by:
        `registerXactCompleteHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterXactCompleteHandler

          public void unregisterXactCompleteHandler(DdemlUtil.XactCompleteHandler handler)

      Specified by:
        `unregisterXactCompleteHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerUnregisterHandler

          public void registerUnregisterHandler(DdemlUtil.UnregisterHandler handler)

      Specified by:
        `registerUnregisterHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterUnregisterHandler

          public void unregisterUnregisterHandler(DdemlUtil.UnregisterHandler handler)

      Specified by:
        `unregisterUnregisterHandler` in interface `DdemlUtil.IDdeClient`

    - #### registerMonitorHandler

          public void registerMonitorHandler(DdemlUtil.MonitorHandler handler)

      Specified by:
        `registerMonitorHandler` in interface `DdemlUtil.IDdeClient`

    - #### unregisterMonitorHandler

          public void unregisterMonitorHandler(DdemlUtil.MonitorHandler handler)

      Specified by:
        `unregisterMonitorHandler` in interface `DdemlUtil.IDdeClient`

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