Module: Win::Dde
- Extended by:
- Library
- Defined in:
- lib/win/dde.rb
Overview
Includes functions related to DDE exchange protocol in Windows
Defined Under Namespace
Classes: DdemlMsgHookData, MonCbStruct, MonConvStruct, MonErrStruct, MonHszStruct, MonLinkStruct, MonMsgStruct
Constant Summary collapse
- CP_WINANSI =
Windows ANSI codepage:
1004
- DNS_REGISTER =
Registers the service name.
1
- DNS_UNREGISTER =
Unregisters the service name. When hsz1 == 0L, ALL service names registered by the server will be unregistered.
2
- 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 App does not register any service names, the App cannot receive XTYP_WILDCONNECT transactions.
4
- DNS_FILTEROFF =
Turns off service name initiation filtering. If this flag is specified, the server receives an XTYP_CONNECT transaction whenever another DDE App calls the DdeConnect function, regardless of the service name.
8
- DDE_FACK =
Transaction confirmation
0x8000
- DDE_FBUSY =
Server is too busy to process transaction
0x4000
- DDE_FDEFERUPD =
0x4000
- DDE_FACKREQ =
0x8000
- DDE_FRELEASE =
0x2000
- DDE_FREQUESTED =
0x1000
- DDE_FAPPSTATUS =
0x00ff
- DDE_FNOTPROCESSED =
Transaction rejected
0
- XTYPF_NOBLOCK =
Transaction types:
0x0002
- XTYPF_NODATA =
0x0004
- XTYPF_ACKREQ =
0x0008
- XCLASS_MASK =
0xFC00
- XCLASS_BOOL =
0x1000
- XCLASS_DATA =
0x2000
- XCLASS_FLAGS =
0x4000
- XCLASS_NOTIFICATION =
0x8000
- XTYP_ERROR =
XCLASS_NOTIFICATION | XTYPF_NOBLOCK
- XTYP_ADVDATA =
0x0010 | XCLASS_FLAGS
- XTYP_ADVREQ =
0x0020 | XCLASS_DATA | XTYPF_NOBLOCK
- XTYP_ADVSTART =
0x0030 | XCLASS_BOOL
- XTYP_ADVSTOP =
0x0040 | XCLASS_NOTIFICATION
- XTYP_EXECUTE =
0x0050 | XCLASS_FLAGS
- XTYP_CONNECT =
A client uses the XTYP_CONNECT transaction to establish a conversation. A DDE server callback function, DdeCallback, receives this transaction when a client specifies a service name that the server supports (and a topic name that is not NULL) in a call to the DdeConnect function.
0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK
- XTYP_CONNECT_CONFIRM =
0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK
- XTYP_XACT_COMPLETE =
0x0080 | XCLASS_NOTIFICATION
- XTYP_POKE =
A client uses the XTYP_POKE transaction to send unsolicited data to the server. DDE server callback function, DdeCallback, receives this transaction when a client specifies XTYP_POKE in the DdeClientTransaction function.
0x0090 | XCLASS_FLAGS
- XTYP_REGISTER =
0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK
- XTYP_REQUEST =
0x00B0 | XCLASS_DATA
- XTYP_DISCONNECT =
0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK
- XTYP_UNREGISTER =
0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK
- XTYP_WILDCONNECT =
0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK
- XTYP_MONITOR =
0X00F0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK
- XTYP_MASK =
0x00F0
- XTYP_SHIFT =
0x0004
- TYPES =
Types Hash description’)
{ XTYPF_NOBLOCK => 'XTYPF_NOBLOCK', XTYPF_NODATA => 'XTYPF_NODATA', XTYPF_ACKREQ => 'XTYPF_ACKREQ', XCLASS_MASK => 'XCLASS_MASK', XCLASS_BOOL => 'XCLASS_BOOL', XCLASS_DATA => 'XCLASS_DATA', XCLASS_FLAGS => 'XCLASS_FLAGS', XCLASS_NOTIFICATION => 'XCLASS_NOTIFICATION', XTYP_ERROR => 'XTYP_ERROR', XTYP_ADVDATA => 'XTYP_ADVDATA', XTYP_ADVREQ => 'XTYP_ADVREQ', XTYP_ADVSTART => 'XTYP_ADVSTART', XTYP_ADVSTOP => 'XTYP_ADVSTOP', XTYP_EXECUTE => 'XTYP_EXECUTE', XTYP_CONNECT => 'XTYP_CONNECT', XTYP_CONNECT_CONFIRM=> 'XTYP_CONNECT_CONFIRM', XTYP_XACT_COMPLETE => 'XTYP_XACT_COMPLETE', XTYP_POKE => 'XTYP_POKE', XTYP_REGISTER => 'XTYP_REGISTER', XTYP_REQUEST => 'XTYP_REQUEST', XTYP_DISCONNECT => 'XTYP_DISCONNECT', XTYP_UNREGISTER => 'XTYP_UNREGISTER', XTYP_WILDCONNECT => 'XTYP_WILDCONNECT', XTYP_MONITOR => 'XTYP_MONITOR', XTYP_MASK => 'XTYP_MASK', XTYP_SHIFT => 'XTYP_SHIFT' }
- APPCLASS_STANDARD =
Registers the App as a standard (nonmonitoring) DDEML App.
0
- APPCLASS_MONITOR =
Makes it possible for the App to monitor DDE activity in the system. This flag is for use by DDE monitoring Apps. The App specifies the types of DDE activity to monitor by combining one or more monitor flags with the APPCLASS_MONITOR flag.
0x00000001
- APPCLASS_MASK =
?
0x0000000F
- APPCMD_CLIENTONLY =
Prevents the App from becoming a server in a DDE conversation. The App can only be a client. This flag reduces consumption of resources by the DDEML. It includes the CBF_FAIL_ALLSVRXACTIONS flag.
0x00000010
- APPCMD_FILTERINITS =
Prevents the DDEML from sending XTYP_CONNECT and XTYP_WILDCONNECT transactions to the App until the App 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 App calls DdeInitialize for the first time, regardless of whether the App specifies the flag. On subsequent calls to DdeInitialize, not specifying this flag turns off the App’s service-name filters, but specifying it turns on the App’s service name filters.
0x00000020
- APPCMD_MASK =
?
0x00000FF0
- CBF_FAIL_SELFCONNECTIONS =
Prevents the callback function from receiving XTYP_CONNECT transactions from the App’s own instance. This flag prevents an App from establishing a DDE conversation with its own instance. An App should use this flag if it needs to communicate with other instances of itself but not with itself.
0x00001000
- CBF_FAIL_CONNECTIONS =
Prevents the callback function from receiving XTYP_CONNECT and XTYP_WILDCONNECT.
0x00002000
- CBF_FAIL_ADVISES =
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.
0x00004000
- CBF_FAIL_EXECUTES =
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.
0x00008000
- CBF_FAIL_POKES =
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.
0x00010000
- CBF_FAIL_REQUESTS =
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.
0x00020000
- CBF_FAIL_ALLSVRXACTIONS =
Prevents the callback function from receiving server transactions. The system returns DDE_FNOTPROCESSED to each client that sends a transaction to this App. This flag is equivalent to combining all CBF_FAIL_ flags.
0x0003f000
- CBF_SKIP_CONNECT_CONFIRMS =
Prevents the callback function from receiving XTYP_CONNECT_CONFIRM.
0x00040000
- CBF_SKIP_REGISTRATIONS =
Prevents the callback function from receiving XTYP_REGISTER notifications.
0x00080000
- CBF_SKIP_UNREGISTRATIONS =
Prevents the callback function from receiving XTYP_UNREGISTER notifications.
0x00100000
- CBF_SKIP_DISCONNECTS =
Prevents the callback function from receiving XTYP_DISCONNECT notifications.
0x00200000
- CBF_SKIP_ALLNOTIFICATIONS =
Prevents the callback function from receiving any notifications. Equivalent to combining all CBF_SKIP_ flags.
0x003c0000
- MF_HSZ_INFO =
Notifies the callback function whenever a DDE App 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.
0x01000000
- MF_SENDMSGS =
Notifies the callback function whenever the system or an App sends a DDE message.
0x02000000
- MF_POSTMSGS =
Notifies the callback function whenever the system or an App posts a DDE message.
0x04000000
- MF_CALLBACKS =
Notifies the callback function whenever a transaction is sent to any DDE callback function in the system.
0x08000000
- MF_ERRORS =
Notifies the callback function whenever a DDE error occurs.
0x10000000
- MF_LINKS =
Notifies the callback function whenever an advise loop is started or ended.
0x20000000
- MF_CONV =
Notifies the callback function whenever a conversation is established or terminated.
0x40000000
- MF_MASK =
?
0xFF000000
- FLAGS =
Flags Hash description’)
{ APPCLASS_STANDARD => 'APPCLASS_STANDARD', APPCLASS_MONITOR => 'APPCLASS_MONITOR', APPCLASS_MASK => 'APPCLASS_MASK', APPCMD_CLIENTONLY => 'APPCMD_CLIENTONLY', APPCMD_FILTERINITS => 'APPCMD_FILTERINITS', APPCMD_MASK => 'APPCMD_MASK', CBF_FAIL_SELFCONNECTIONS => 'CBF_FAIL_SELFCONNECTIONS', CBF_FAIL_CONNECTIONS => 'CBF_FAIL_CONNECTIONS', CBF_FAIL_ADVISES => 'CBF_FAIL_ADVISES', CBF_FAIL_EXECUTES => 'CBF_FAIL_EXECUTES', CBF_FAIL_POKES => 'CBF_FAIL_POKES', CBF_FAIL_REQUESTS => 'CBF_FAIL_REQUESTS', CBF_FAIL_ALLSVRXACTIONS => 'CBF_FAIL_ALLSVRXACTIONS', CBF_SKIP_CONNECT_CONFIRMS => 'CBF_SKIP_CONNECT_CONFIRMS', CBF_SKIP_REGISTRATIONS => 'CBF_SKIP_REGISTRATIONS', CBF_SKIP_UNREGISTRATIONS => 'CBF_SKIP_UNREGISTRATIONS', CBF_SKIP_DISCONNECTS => 'CBF_SKIP_DISCONNECTS', CBF_SKIP_ALLNOTIFICATIONS => 'CBF_SKIP_ALLNOTIFICATIONS', MF_HSZ_INFO => 'MF_HSZ_INFO', MF_SENDMSGS => 'MF_SENDMSGS', MF_POSTMSGS => 'MF_POSTMSGS', MF_CALLBACKS => 'MF_CALLBACKS', MF_ERRORS => 'MF_ERRORS', MF_LINKS => 'MF_LINKS', MF_CONV => 'MF_CONV', MF_MASK => 'MF_MASK' }
- DMLERR_NO_ERROR =
Returned if DDE Init successful
0x00
- DMLERR_FIRST =
First (lowest) error code
0x4000
- DMLERR_ADVACKTIMEOUT =
A request for a synchronous advise transaction has timed out.
DMLERR_FIRST
- DMLERR_BUSY =
The response to the transaction caused the DDE_FBUSY flag to be set
0x4001
- DMLERR_DATAACKTIMEOUT =
A request for a synchronous data transaction has timed out.
0x4002
- DMLERR_DLL_NOT_INITIALIZED =
A DDEML function was called without first calling the DdeInitialize function, or an invalid instance identifier was passed to a DDEML function.
0x4003
- DMLERR_DLL_USAGE =
An App initialized as APPCLASS_MONITOR has attempted to perform a Dynamic Data Exchange (DDE) transaction, or an App initialized as APPCMD_CLIENTONLY has attempted to perform server transactions.
0x4004
- DMLERR_EXECACKTIMEOUT =
A request for a synchronous execute transaction has timed out.
0x4005
- DMLERR_INVALIDPARAMETER =
A parameter failed to be validated by the DDEML. Some of the possible causes follow:
-
The App used a data handle initialized with a different item name handle than was required by the transaction.
-
The App used a data handle that was initialized with a different clipboard data format than was required by the transaction.
-
The App used a client-side conversation handle with a server-side function or vice versa.
-
The App used a freed data handle or string handle.
-
More than one instance of the App used the same object.
-
0x4006
- DMLERR_LOW_MEMORY =
A DDEML App has created a prolonged race condition (in which the server App outruns the client), causing large amounts of memory to be consumed.
0x4007
- DMLERR_MEMORY_ERROR =
A memory allocation has failed.
0x4008
- DMLERR_NOTPROCESSED =
A transaction has failed.
0x4009
- DMLERR_NO_CONV_ESTABLISHED =
A client’s attempt to establish a conversation has failed.
0x400a
- DMLERR_POKEACKTIMEOUT =
A request for a synchronous poke transaction has timed out.
0x400b
- DMLERR_POSTMSG_FAILED =
An internal call to the PostMessage function has failed.
0x400c
- DMLERR_REENTRANCY =
An App instance with a synchronous transaction already in progress attempted to initiate another synchronous transaction, or the DdeEnableCallback function was called from within a DDEML callback function.
0x400d
- DMLERR_SERVER_DIED =
A server-side transaction was attempted on a conversation terminated by the client, or the server terminated before completing a transaction.
0x400e
- DMLERR_SYS_ERROR =
An internal error has occurred in the DDEML.
0x400f
- DMLERR_UNADVACKTIMEOUT =
A request to end an advise transaction has timed out.
0x4010
- DMLERR_UNFOUND_QUEUE_ID =
An invalid transaction identifier was passed to a DDEML function. Once the App has returned from an XTYP_XACT_COMPLETE callback, the transaction identifier for that callback function is no longer valid.
0x4011
- DMLERR_LAST =
Last (highest) error code
DMLERR_UNFOUND_QUEUE_ID
- ERRORS =
Errors Hash description’)
{ nil => 'No DDEML error', DMLERR_NO_ERROR => 'No DDEML error', DMLERR_ADVACKTIMEOUT => 'A request for a synchronous advise transaction has timed out.', DMLERR_BUSY => 'The response to the transaction caused the DDE_FBUSY flag to be set.', DMLERR_DATAACKTIMEOUT => 'A request for a synchronous data transaction has timed out.', DMLERR_DLL_NOT_INITIALIZED => 'A DDEML function was called without first calling the DdeInitialize ' + 'function, or an invalid instance identifier was passed to a DDEML function.', DMLERR_DLL_USAGE => 'An App initialized as APPCLASS_MONITOR has attempted to perform a DDE ' + 'transaction, or an App initialized as APPCMD_CLIENTONLY has attempted to perform ' + 'server transactions.', DMLERR_EXECACKTIMEOUT => 'A request for a synchronous execute transaction has timed out.', DMLERR_INVALIDPARAMETER => 'A parameter failed to be validated by the DDEML. Possible causes: ' + 'App used a data handle initialized with a different item name handle than was required ' + 'by the transaction. ' + 'The App used a data handle that was initialized with a different clipboard data format ' + 'than was required by the transaction. ' + 'The App used a client-side conversation handle with server-side function or vice versa. ' + 'The App used a freed data handle or string handle. ' + 'More than one instance of the App used the same object.', DMLERR_LOW_MEMORY => 'A DDEML App has created a prolonged race condition (in which the server ' + 'App outruns the client), causing large amounts of memory to be consumed.', DMLERR_MEMORY_ERROR => 'A memory allocation has failed.', DMLERR_NO_CONV_ESTABLISHED => 'A client`s attempt to establish a conversation has failed.', DMLERR_NOTPROCESSED => 'A transaction has failed.', DMLERR_POKEACKTIMEOUT => 'A request for a synchronous poke transaction has timed out.', DMLERR_POSTMSG_FAILED => 'An internal call to the PostMessage function has failed.', DMLERR_REENTRANCY => 'An App instance with a synchronous transaction already in progress ' + 'attempted to initiate another synchronous transaction, or the DdeEnableCallback function ' + 'was called from within a DDEML callback function.', DMLERR_SERVER_DIED => 'A server-side transaction was attempted on a conversation terminated by the ' + 'client, or the server terminated before completing a transaction.', DMLERR_SYS_ERROR => 'An internal error has occurred in the DDEML.', DMLERR_UNADVACKTIMEOUT => 'A request to end an advise transaction has timed out.', DMLERR_UNFOUND_QUEUE_ID => 'An invalid transaction identifier was passed to a DDEML function. Once the ' + 'App has returned from an XTYP_XACT_COMPLETE callback, the transaction identifier for ' + 'that callback function is no longer valid.' }
- CF_TEXT =
The simplest form of Clipboard data. It is a null-terminated string containing a carriage return and linefeed at the end of each line.
1
- CF_BITMAP =
A Windows version 2.x-compatible bitmap
2
- CF_METAFILEPICT =
A metafile picture structure. See docs for Microsoft Windows Software Development Kit.
3
- CF_SYLK =
Microsoft symbolic link (SYLK) format. Microsoft Excel for the Apple Macintosh was originally designed to use SYLK format, and this format is now supported by Microsoft Excel on both the Windows and Macintosh platforms
4
- CF_DIF =
An ASCII format used by the VisiCalc spreadsheet program
5
- CF_TIFF =
6
- CF_OEMTEXT =
7
- CF_DIB =
8
- CF_PALETTE =
9
- CF_PENDATA =
10
- CF_RIFF =
11
- CF_WAVE =
12
- CF_UNICODETEXT =
13
- CF_ENHMETAFILE =
14
- CF_HDROP =
Filename copied to clipboard
15
- CF_LOCALE =
16
- CF_MAX =
17
- TIMEOUT_ASYNC =
DdeClientTransaction timeout value indicating async transaction
0xFFFFFFFF
- MH_CREATE =
1
- MH_KEEP =
2
- MH_DELETE =
3
- MH_CLEANUP =
4
Method Summary
Methods included from Library
callback, define_api, define_snake_method, enforce_count, extended, function, generate_names, generate_signature, generate_snake_method_body, try_function