An improved data transfer mechanism is provided. In a preferred embodiment of the present invention, a uniform data transfer mechanism is used by each computer program performing data transfer. The uniform data transfer mechanism of the preferred embodiment of the present invention provides a communication mechanism and a flexible and robust interface to support all existing and future data transfer applications.
|
2. A method in a computer system for transferring data from a source computer program to a destination computer program, the source computer program having a programmatic interface containing function members that facilitate the transfer of the data, the method comprising:
the source computer program passing a reference to the programmatic interface from the source computer program to the destination computer program; and the destination computer program invoking the function members of the programmatic interface via the reference to transfer the data from the source computer program to the destination computer program.
5. A computer-readable medium whose contents cause data to be transferred from a source computer program to a destination computer program in a computer system, the source computer program having a programmatic interface containing function members that facilitate the transfer of the data, by:
the source computer program passing a reference to the programmatic interface from the source computer program to the destination computer program; and the destination computer program invoking the function members of the interface via the reference to transfer the data from the source computer program to the destination computer program.
1. In a computer system, the computer system having a connection mechanism, a uniform data transfer mechanism, a memory, and a plurality of data transfer applications, each data transfer application having a plurality of computer programs, one computer program being a source and one computer program being a destination, the connection mechanism being a mechanism for establishing communication between the source and destination of a data transfer application and being application specific wherein the connection mechanism of a first data transfer application is not suitable for use by a second data transfer application, the uniform data transfer mechanism being separate from the communication mechanism, consisting of functions invocable by a computer program for transferring data after a connection has been established and suitable for use by all data transfer applications, a method in the computer system for transferring data comprising the steps of:
establishing a connection between the source and the destination using the connection mechanism; and invoking the uniform data transfer mechanism to transfer data from the source to the destination.
3. The method of
receiving a cut command from the user; storing the reference on the clipboard by the source computer program; receiving a paste command from the user; and retrieving the reference from the clipboard by the destination computer program to facilitate the transfer of the data.
4. The method of
selecting the visual representation of the data in the first window in response to user manipulation of the input device; dragging the selected visual representation of the data from the first window to the second window in response to user manipulation of the input device; and dropping the dragged visual representation of the data into the second window in response to user manipulation of the input device whereupon the window manager passes the reference to the programmatic interface from the source computer program to the destination computer program.
6. The computer-readable medium of
receiving a cut command from the user; storing the reference on the clipboard by the source computer program; receiving a paste command from the user; and retrieving the reference from the clipboard by the destination computer program to facilitate the transfer of the data.
7. The computer-readable medium of
selecting the visual representation of the data in the first window in response to user manipulation of the input device; dragging the selected visual representation of the data from the first window to the second window in response to user manipulation of the input device; and dropping the dragged visual representation of the data into the second window in response to user manipulation of the input device whereupon the window manager passes the reference to the programmatic interface from the source computer program to the destination computer program.
|
This application is a continuation of U.S. application Ser. No. 08/632,307, filed Apr. 15, 1996, now U.S. Pat. No. 5,911,066, which is a continuation of U.S. patent application Ser. No. 08/199,853, filed Feb. 22, 1994, which is now abandoned.
The present invention relates generally to data processing systems and, more particularly, to a uniform mechanism for transferring data within a data processing system.
In conventional computer systems, data transfer is application specific. In other words, a computer program is responsible for handling the data transfer that is required by an application of data transfer functionality ("application"). Two examples of such applications of data transfer functionality are drag-and-drop and cut-and-paste. Drag-and-drop refers to when a computer user selects data contained within a data source and moves the mouse to a data sink while keeping the mouse button depressed. The data source and the data sink are computer programs within the computer system which contain or accept data. An example of a data source or data sink is a file editor or a word processing document. When the indicator on the computer display, which reflects mouse movement ("mouse pointer"), appears to be pointing to the data sink, the user releases the depressed mouse button and the selected data appears to be inserted into the dam sink. Cut-and-paste refers to when a computer user selects data from within a data source and performs a cut operation (typically invoked through a pull-down menu). The computer user then selects a position in the data sink and performs a paste operation (typically invoked through a pull-down menu). The result of a cut-and-paste application is that data is extracted from the data source and is inserted into the data sink. In order to understand how a data sink and a data source handle the drag-and-drop and cut-and-paste applications, drag-and-drop and cut-and-paste are examined in more detail below.
The cut and paste application is similar to the drag and drop application in that a data sink and a data source performing the cut and paste application also form a connection and transfer data.
As indicated above, in both the cut-and-paste and the drag-and-drop applications, the data source and the data sink form a logical connection through either the clipboard 302 or the window manager 112. Then, after the connection is established, the data 110 is transferred. This two-step process requires the developers of computer programs which perform applications of data transfer functionality to create, for each application, both a connection component to establish a connection and a data transfer component to perform the data transfer. Thus, the developers of computer programs which support applications of data transfer functionality must implement a data transfer component for every application supported.
In accordance with a first aspect of the present invention, a method is executed in a computer system. In accordance with this method of the first aspect of the present invention, the computer has a connection mechanism, a uniform data transfer mechanism and a plurality of computer programs. In order to perform data transfer between two computer programs, this method establishes a connection between the computer programs transferring data and invokes the uniform data transfer mechanism to perform the data transfer.
In accordance with a second aspect of the present invention, a communication mechanism is provided that contains a connection component and a data transfer component. The data transfer component further contains a GetData component, a GetDataHere component, a QueryGetData component, a GetCanonicalFormat component, a SetData component, a EnumFormat component, an Advise component, an UnAdvise component and an EnumAdvise component.
The preferred embodiment of the present invention provides for a uniform data transfer mechanism that may be used by any computer program to transfer data. Thus, the code that implements this mechanism may be reused by multiple computer programs and these computer programs need not include their own code to handle data transfer. In addition, within a computer program that performs many applications of data transfer functionality, the computer program needs only to use one data transfer mechanism. Thus, computer programs only need to implement the connection component associated with data transfer applications. The preferred embodiment also provides a robust and flexible interface into the uniform data transfer mechanism so that computer programs may make easy and efficient use of the uniform data transfer mechanism.
The preferred embodiment of the present invention is designed to operate in an object-oriented environment, such as an environment that supports the Microsoft OLE 2.0 ("OLE") protocol established by Microsoft Corporation of Redmond, Wash. The environment in which the preferred embodiment of the present invention is practiced follows an underlying component object model. An object is a logical structure that includes data structures for holding data and may include functions that operation on the data held in the data structures. An object may hold just data and not include code for manipulating the data. An object is a useful structure for encapsulating data and behavior into a single logical entity.
Objects are organized into "classes." An object class is a group of objects with similar properties and common behavior. Each object is a member of a class and constitutes an instance of the object class. All members of a class include at least the properties defined for the object class, but the value of these properties may vary among the objects of the object class.
Another concept exploited in the preferred embodiment of the present invention is the notion of an "interface." An interface is a named set of logically related functions ("methods"). An interface lists signatures (such as parameters) for a set of methods. For instance, an example interface may define the signatures for various methods that are used to display an object on a video display. An interface does not provide code for implementing the methods; rather, the code for implementing the methods is provided by objects. Objects that provide the code for implementing the methods of an interface are said to "support" the interface. The code provided by an object that supports an interface must comply with the signatures provided within the interface. In the C++ programming language, an interface constitutes a set of virtual functions. Although the preferred embodiment of the present invention is described as being implemented in an object-oriented environment, those skilled in the art will appreciate that the present invention may also be practiced in non-object-oriented environments as well.
The basic concepts of the component object model may be explained relative to the block diagram of FIG. 6. The memory 504 of the computer contains a client 602 and a server 604. The client 602 and the server 604 are computer programs in a state of operation. The server 604 contains an object 606. The client 602 uses an interface provided by the object 606 to manipulate the object 606. The client 602 does not know of the implementation of the object 606 or the server 604. Only the server 604 knows of the implementation of the object 606 and how to manipulate the object 606. Since the client 602 does not know the implementation of the object, the client 602 is data independent. Data independence allows the developer of the client 602 to write code which will allow for the support of new types of data and interactions with new computer programs without having to change the code of the client 602. Since the internal representation of the object 606 is hidden from the client 602, the client 602 manipulates the object through the use of an "interface."
All objects in the component object model are required to support the IUnknown interface. Since all objects support the IUnknown interface, when a client 602 wishes to manipulate an object 606, the client 602 first accesses the IUnknown interface in order to access the interface that provides the appropriate methods to perform the desired manipulation. One method contained within the IUnknown interface is the QueryInterface method. The client 602 uses the QueryInterface method of the IUnknown interface to obtain a pointer to a desired interface from the object 606. If the object 606 supports the requested interface, the object 606 returns a pointer to the requested interface to the client 602. After receiving a pointer to the requested interface, the client 602 can directly manipulate the object 606 using the methods contained in the requested interface. Since the client 602 does not know of the implementation of the methods nor does the client 602 know of the internal representations of the object 606, the code of the client 602 is flexible and can support new forms of objects without having to change because the code of the client 602 is data independent.
Consider an example where a client 602 is a word processing document, a server 604 is a spreadsheet program, and an object 606 is a range of cells within the spreadsheet program. Thus, by using the component object model, the object 606 may appear as part of the client 602 to the user and may be manipulated by the user while using the client 602. The user may modify the cells in the object 606 by using the client 602, and the client 602 invokes the methods that implement the modifications in order to manipulate the object 606.
The preferred embodiment of the present invention provides a uniform data transfer mechanism ("UDT"). The UDT provides a mechanism and interface to computer programs so that the computer programs may transfer data in a uniform manner after a connection is established. Thus, the developers of computer programs which perform applications of data transfer functionality using UDT only implement a connection component for each application, not the data transfer component. As a result, the computer programs are easier to implement. Since the preferred embodiment is designed for use with all applications of data transfer functionality, the preferred embodiment provides a robust interface to support all existing applications as well as future applications.
As mentioned above, the preferred embodiment of the present invention provides interfaces for facilitating UDT. For purposes of explaining how the UDT mechanism works, the major interfaces that are provided will be described in more detail below. The preferred embodiment of the present invention provides a DLL that provides an IDataObject Interface. The IDataObject interface groups several methods that are useful to an object that transfers data. Upon receipt of a pointer to the IDataObject interface, the client may use UDT 708.
In the IDataObject interface, the FORMATETC structure is used in many methods. The FORMATETC structure is used to request or define the format and aspect ("characteristics") of the data being transferred in UDT 708 as well as other information. When a client requests specific characteristics for a data transfer, the client is said to be requesting data according to the preferences of the client. The FORMATETC structure is defined in Code Table No 1. All code described herein is provided in the C++ programming language.
Code Table No. I | ||
typedef struct tag FORMATETC { | ||
CLIPFORMAT | cfformat; | |
DVTARGETDEVICE | ptd; | |
DWORD | dwAspect; | |
LONG | lindex; | |
DWORD | tymed; | |
}FORMATETC; | ||
The cfformat member of FORMATETC describes the format in which data being transferred is conveyed. The ptd member of the FORMATETC structure specifies the device for which the data being transferred is destined. The dwAspect member of the FORMATETC structure allows a client to request data from an object in different aspects. An aspect is a representation of an object. An object can have many representations such as a browsing representation, wherein the representation is appropriate for viewing only, or a print representation wherein the data in an object is formatted for printing. Therefore, for example, by appropriately setting the dwAspect member of the FORMATETC structure, a client may request the browsing aspect of an object. There are four values appropriate for the dwAspect member: DVASPECT_CONTENT, DVASPECT_THUMBNAIL, DVASPECT_ICON, and DVASPECT_DOCPRINT. Use of the DVASPECT_CONTENT value in dwAspect member signifies a request for a representation of an object appropriate for the displaying of the object. Use of the DVASPECT_THUMBNAIL value in the dwAspect member signifies a request for a representation of an object suitable for browsing. Use of the DVASPECT_ICON value in the dwAspect member signifies a request for an iconic representation of the object. Use of the DVASPECT_DOCPRINT value in the dwAspect member signifies a request for a printed representation of the object (i.e., formatted for a sequence of pages). The lindex member of the FORMATETC structure indicates a range of pages in the printed representation of the object when the dwAspect member is a DVASPECT_DOCPRINT value.
The tymed member of the FORMATETC structure indicates the requested medium through which the client would like to receive the data. The values for the tymed member correspond to bit positions, thus a client can request any combination of the appropriate values by "ORing" the values together. The values for the tymed member thus enable a client to request that data be transferred over one of a number of media. The suitable values for the tymed member of the FORMATETC structure are defined in Code Table No. 2.
Code Table No. 2 | |
Value | Description |
TYMED_HGLOBAL | Indicates that the client requests the |
transfer medium to be global memory. | |
TYMED_FILE | Indicates that the client requests the |
transfer medium to be a file on the | |
permanent storage device. | |
TYMED_ISTREAM | Indicates that the client requests the |
transfer medium to be a stream file. A | |
stream file is a file used to store a | |
continuous series of bytes. | |
TYMED_ISTORAGE | Indicates that the client requests the |
data to be transferred through the use of | |
IStorage. IStorage is an interface to a storage | |
object A storage object does not contain data, | |
but refers to other storage objects and to | |
stream files. The storage objects combine to | |
form a hierarchy, similar to a directory tree on | |
typical permanent storage devices. Just as a | |
subdirectory can point to other subdirectories | |
or files, a storage object can point to other | |
storage objects and stream files. | |
TYMED_GDI | Indicates that the client requests the |
transfer medium to be a graphic data interface | |
object (GDI). A GDI is an object of graphical | |
data contained in a graphical display device, | |
such as a computer display or printer. Access | |
to the data in the GDI is provided through the | |
graphical data interface. An example of a | |
graphical data interface is provided in the | |
Windows operating system sold by Microsoft | |
Corporation of Redmond, Washington. | |
TYMED_MFPICT | Indicates that the client requests the |
transfer medium to be a metafile. A metafile is | |
a file containin pictorial information in the | |
form of records. Each record corresponds to a | |
reference to a graphic data interface routine. A | |
graphic data interface routine performs | |
manipulation of a graphic device. | |
Another structure used in the IDataObject interface is the STGMEDIUM structure. The STGMEDIUM structure is used to define the particular medium upon which the data is to be stored and, therefore, contains two members. The first member indicates the type of medium and, thus, the values for the first member are the same as those described above for the tymed member of the FORMATETC structure. The second member of the STGMEDIUM structure is a reference to the medium used for transferring the data. Although the tymed member of the FORMATETC structure and the STGMEDIUM structure are described with reference to specific media, one skilled in the art will appreciate that other media can be used.
The IDataObject interface provides nine methods which use the above-described structures. The nine methods of the IDataObject interface include: GetData, GetDataHere, QueryGetData, GetCanonicalFormatEtc, SetData, EnumFormatEtc, DAdvise, DUnadvise and EnumDAdvise. The IDataObject interface is defined in Code Table No. 3. Each method of the IDataObject interface is discussed separately below.
Code Table No. 3 | ||
interface MDataObject:[Unknown { | ||
virtual | HRESULT | GetData (pformatetc, pmedium) = 0; |
virtual | HRESULT | GetDataHere(pformatetc, pmedium) = 0; |
virtual | HRESULT | QueryGetData(pformatetc) = 0; |
virtual | HRESULT | GetCanonicalFormatEtc(pformatetcin, |
pformatEtcOut) = 0; | ||
virtual | HRESULT | SetData(pformatetc, pmedium, fRelease) = 0; |
virtual | HRESULT | EnumFormatEtc(wDirection, |
ppenumFormatEtc) = 0; | ||
virtual | HRESULT | DAdvise(pformatetc, grfAdvf, pAdvSink, |
pdwConnection) = 0; | ||
virtual | HRESULT | DUnadvise(dwConnection) = 0; |
virtual | HRESULT | EnumDAdvise(ppenumAdvise) = 0; |
} | ||
The GetData method of the IDataObject interface allows a client to retrieve data from an object that supports the IDataObject interface. The client may retrieve data from the object according to the preferences of the client. Thus, the client may specify a specific format, a specific aspect, a format for a specific device and conveyance through a specific medium. The parameters of the GetData method are defined in Code Table No. 4.
Code Table No. 4 | ||
HRESULT IDataObject::GetData(pformatetc, pmedium) | ||
Argument | Type | |
pformatetc | FORMATETC * | |
pmedium | STGMEDIUM * | |
return_value | HRESUIT * | |
The pformatetc parameter is a pointer to a FORMATETC structure and the members of the FORMATETC structure specify the preferences of the client for receiving the data. The tymed member of the pformatetc parameter indicates at least one medium upon which the client would like to receive the data. If the server can support the requested preferences and one of the requested media, the server returns the requested data on the medium specified by the pmedium parameter. Thus, the pmedium parameter is an output parameter. Otherwise, if the server cannot support the preferences or the requested media, the GetData method returns an error. The return value parameter of the GetData method is a value indicating a successful completion or unsuccessful completion of the GetData method. An example of an error that may occur is when the server cannot convert the data into the requested format.
The GetDataHere method of the IDataObject interface permits a client to specify the medium that is to be used for transferring the requested data. Since the method receives a reference to the medium as a parameter, the method only copies the requested data onto the medium specified by the parameter. However, the method must still determine whether the server can support the requested preferences. The GetDataHere method is defined in Code Table No. 5.
Code Table No. 5 | ||
HRESULT IDataObject::GetDataHere(pformatetc, pmedium) | ||
Argument | Type | |
pformatetc | FORMATETC * | |
pmedium | STGMEDIUM * | |
return_value | HRESULT | |
The pformatetc parameter of the GetDataHere method is a pointer to a FORMATETC structure which specifies the preferences of the client for the requested data. The pmedium parameter is a reference to the medium to be used for transferring the requested data. The pmedium parameter is an input parameter. The return_value parameter of the GetDataHere method is an output parameter indicating a successful completion or unsuccessful completion of the GetDataHere method. One example of an error that may occur is when the server is unable to support the requested format for the requested data.
Upon invocation of the GetDataHere method, the GetDataHere method first determines if the requested preferences for the requested data can be supported by the server. If the requested preferences can be supported by the server, the GetDataHere method transfers the requested data over the medium specified by the pmedium parameter and returns a value indicating success in the return value parameter. If the requested preferences cannot be supported by the server, the GetDataHere method returns a value in the return value parameter indicating that an error occurred.
The QueryGetData method in the IDataObject interface allows a client to test whether the server would be able to return specified data by the GetData method according to specified preferences on a specified medium. The definition of the QueryGetData method is provided in Code Table No. 6.
Code Table No. 6 | ||
HRESULT IDataObject::QueryGetData(pformatetc) | ||
Argument | Type | |
pformatetc | FORMATETC * | |
return_value | HRESULT | |
The pformatetc parameter of the QueryGetData method is a pointer to a FORMATETC structure. The FORMATETC structure referenced by the pformatetc parameter contains the preferences requested by the client including a medium for transferring the data. The return_value parameter of the QueryGetData method contains a value indicating a successful or unsuccessful completion of the QueryGetData method. An error that may be referenced in the return_value parameter is the inability of the server to support the requested format, the requested aspect or the requested medium.
The GetCanonicalFormatEtc method of the IDataObject interface allows a client to query an object to determine the characteristics of the data that will be returned to the client for a given input FORMATETC parameter. Thus, the GetCanonicalFormatEtc method gives the client the ability to determine whether the client will receive data in a format for which the client has already received data. Therefore, if the client has already requested data from an object and has received the requested data in a specific format, before requesting (by GetData) a new format for the received data, the client can use the GetCanonicalFormatEtc method to determine whether the object will return the new request for the data in the same format as the previous request for the data. Use of the GetCanonicalFormatEtc method by a client can save the client from using memory or disk space for unnecessary duplicate copies of similar data having similar characteristics. The definition for the GetCanonicalFormatEtc method is provided in Code Table No. 7.
Code Table No. 7 | ||
HRESULT IDataObject::GetCanonicalFormatEtc(pformatetc, pmedium) | ||
Argument | Type | |
pformatetcIn | FORMATETC * | |
pformatetcOut | FORMATETC * | |
return_value | HRESULT | |
The pformatetcIn parameter is a pointer to a FORMATETC structure that contains the preferences of the client for the requested data. The pformatIn is an input parameter. The pformatetcOut parameter is a reference to a FORMATETC structure which contains the characteristics of the requested data that will be returned for the given pformatetcIn parameter. The return_value contains an indication of whether the characteristics that can be supported by the server is the same as the characteristics specified by pformatetcIn.
The SetData method of the IDataObject interface allows a client to send data to an object according to specified characteristics over a specified medium. The definition for the SetData method is provided in Code Table No. 8.
Code Table No. 8 | ||
HRESULT IDataObject::SetData(pformatetc, pmedium, fRelease) | ||
Argument | Type | |
pformatetc | FORMATETC * | |
pmedium | STGMEDIUM * | |
fRelease | BOOL | |
return_value | HRESULT | |
The pformatetc parameter of the SetData method is a pointer to a FORMATETC structure which contains the characteristics of the data sent to an object. The pmedium parameter is a reference to the medium used for transferring the data. The fRelease parameter of the SetData method indicates whether the client or the server is responsible for releasing the medium specified by the pmedium parameter after the data has been sent to the object. The return_value contains a value indicating a successful or unsuccessful completion to the SetData method.
The EnumFormatEtc method of the IDataObject interface allows a client to enumerate the available characteristics of data sent to or received from an object. This method allows a client, before requesting data, to determine whether the data that the client requests can be received according to the preferences of the client. The definition of the EnumFormatEtc method is provided in Code Table No. 9.
Code Table No. 9 | ||
HRESULT IDataObject::EnumFormatEtc)wDirection, ppenumFormatEtc) | ||
Argument | Type | |
wDirection | WORD | |
ppenumFormatEtc | IEnumFORMATETC** | |
return_value | HRESULT | |
The wDirection parameter of the EnumFormatEtc method is used for setting a value indicating whether the request is for characteristics supported for a SetData or a GetData method. The ppenumFormatEtc is a pointer to a pointer to an enumerator which contains the available formats for the data in the object. The return value is a value indicating a successful or unsuccessful completion of the EnumFormatEtc method.
The DAdvise method of the IDataObject interface allows a client to establish an advisory connection between an object and an advisory sink. An advisory connection is a logical connection between an advisory sink and an object where, when the data of the object changes, the server notifies the advisory sink of the change. The advisory sink may be a client, server, object or other software entity. In calling the DAdvise method, the client requests the composition of the notification and how the notification will be performed. For example, the client can request that the object suppress the transfer of data in the notification or that the object perform only one notification. Once the client sets up an advisory connection, when the data in the referenced object changes, the server invokes the OnDataChange method of the IAdviseSink interface, which notifies the advisory sink and is passed to the object as a parameter in the DAdvise method. The IAdviseSink interface will be described in more detail below. The DAdvise method is defined in Code Table No. 10.
Code Table No. 10 | ||
HRESULT IDataObject::DAdvise(pformatetc, grfAdvf, pAdvSink, | ||
pdwCoanection) | ||
Argument | Type | |
pformatetc | FORMATETC* | |
grfAdvf | DWORD | |
pAdvSink | IAdviseSink* | |
pdwConnection | DWORD | |
return_value | HRESULT | |
The pformatetc parameter of the DAdvise method contains a pointer to a FORMATETC structure which indicates the preferences of the client for the data returned in the notification. The grfAdvf parameter contains a value indicating the choices of the client for the composition of the notification and how the notification will be performed. Acceptable values for the grfAdvf parameter include: ADVF_NODATA, ADVF_ONLYONCE, ADVF_PRIMEFIRST, and ADVF_DATAONSTOP. The ADVF_NODATA value in the gradvf parameter indicates not to return the changed data in the notification. A value of ADVF_ONLYONCE indicates that the advisory connection will be disconnected after one notification. A value of ADVF_PRIMEFIRST indicates that the server will send an additional notification to the advisory sink when the referenced data in the object first becomes available. A value of ADVF_DATAONSTOP indicates that an additional notification will be sent to the advisory sink upon the shutdown of the server. Also, the additional notification will contain the data that has chanced. The values for the grfAdvf parameter are defined in terms of bits, thus, any combination of the values may be "ORed" together. One combination in particular, ADVF_ONLYONCE ORed with ADVF_PRIMEFIRST, allows a client to receive data from a server without having to wait for the data to become available (i.e., the client will receive the data at a later time). Although only one combination of the values for the grfAdvf parameter is described, one skilled in the art will recognize that other combinations of the values for the grfAdvf parameter provide useful functionality.
The pAdvSink parameter is a pointer to an IAdviseSink interface. The IAdviseSink interface contains a method defined by the client ("OnDataChange"). The OnDataChange method has two parameters. The first parameter to the OnDataChange method is a pointer to a FORMATETC structure indicating the preferences of the client for the data in the notification. The second parameter to the OnDataChange method is a pointer to a medium to be used for transferring the notification.
The pdwConnection is a handle to the advisory connection returned to the client upon successful completion of the DAdvise method. The advisory connection handle is used by the client to uniquely identify an advisory connection. The return_value parameter of the DAdvise method indicates a successful or unsuccessful creation of an advisory connection.
The DUnadvise method in the IDataObject interface provides for disconnecting an advisory connection that was set up using the DAdvise method. The DUnadvise method is defined in Code Table No. 11.
Code Table No. 11 | ||
HRESULT IDataObject::DUnadvise(pdwCoanection) | ||
Argument | Type | |
dwConnection | DWORD | |
return_value | HRESULT | |
The dwConnection parameter of the DUnadvise method is a handle to the advisory connection that the client wants disconnected. The advisory connection handle was returned to the client upon a successful completion of the DAdvise method. The return_value parameter indicates whether the advisory connection was successfully disconnected.
The EnumDAdvise method of the IDataObject interface allows a client to enumerate all of the advisory connections currently on an object. The EnumDAdvise method is defined in Code Table No. 12.
Code Table No. 12 | ||
HRESULT IDataObject::EnumDAdvise(ppenumAdvise) | ||
Argument | Type | |
ppenumAdvise | IEnumSTATDATA* | |
return_value | HRESULT | |
The ppenumAdvise parameter for the EnumDAdvise method is a pointer to a pointer to a list of structures containing connection information for all connections on an object. The information contained in each structure includes the pformatetc, grfAdvf, dwConnection, and pAdvSink parameters that were passed to the server upon creation of the advisory connection through the DAdvise method. The return_value of the EnumDAdvise is a value indicating a successful or unsuccessful completion of the EnumDAdvise method.
When the client is ready to receive the data, the client may choose to transfer the data over a specific medium (step 1016), or the client may choose to request the data so that the server can pick which medium to transfer the data over (step 1020). If the client determines to transfer the data over a specific medium, the client invokes the GetDataHere method of the IDataObject interface (step 1018). If the client decides to allow the server to pick the medium used for transferring the data, the client invokes the GetData method of the IDataObject interface (step 1022).
At some point during the processing of the client, the client may determine to send data to the object (step 1024 in FIG. 10B). When the client determines to send data to the object, the client invokes the SetData method of the IDataObject interface (step 1026). Instead of, or in addition to sending and receiving data from the object, the client may decide to perform processing associated with advisory connections. If the client determines to perform processing associated with advisory connections, the client may choose to set up an advisory connection (step 1028), disconnect an advisory connection (step 1032), or enumerate all advisory connections on the object (step 1036). If the client chooses to set up an advisory connection, the client invokes the DAdvise method of the IDataObject interface (step 1030). If the client chooses to disconnect an advisory connection, the client invokes the DUnadvise method of the IDataObject interface (step 1034). If, however, the client decides to enumerate all advisory connections on an object, the client invokes the EnumDAdvise method of the IDataObject interface (step 1038).
After invoking one method of the IDataObject interface, the client may determine to perform more UDT-related processing (step 1040). If the client determines to perform more UDT-related processing, the client continues to step 1004 wherein the client may invoke another method of the IDataObject interface. However, if the client determines not to perform more UDT-related processing, UDT-related processing ends.
Following is a description of five applications of data transfer functionality utilizing UDT of the preferred embodiment of the present invention. The five applications utilizing UDT include: cut-and-paste, drag-and-drop, real time data transfer, custom marshalling and programmatic transfer.
An alternative computer system for performing the programmatic transfer mechanism utilizing the preferred embodiment of the present invention is depicted in FIG. 18. The programmatic transfer mechanism 1802 and two computer programs 1804, 1806 reside within the memory 504 of a computer system. The programmatic transfer mechanism 1802 has a script 1808 containing commands and an engine 1810 which understands and invokes the commands of the script 1808. The computer program 1804 contains an object 1812 and the computer program 1806 contains UDT 1814 of the preferred embodiment. In the alternative programmatic transfer application, a developer inputs commands into the script 1808, and the commands are executed by the engine 1810. The executed commands retrieve a pointer to the IDataObject interface of the object 1812 and pass the pointer of the IDataObject interface to the computer program 1806. Once the computer program 1806 has the pointer to the IDataObject interface, the computer program 1806 then invokes UDT 1814 to transfer data contained within the object 1812.
While the present invention has been described with reference to a preferred embodiment thereof, those skilled in the art will note that various changes in form may be made without departing from the spirit and scope of the claimed invention as defined in the appended claims.
Atkinson, Robert G., Williams, Antony S.
Patent | Priority | Assignee | Title |
10042611, | Mar 21 2016 | International Business Machines Corporation | Stream operator management |
10572582, | Nov 06 2006 | Microsoft Technology Licensing, LLC | Clipboard augmentation with references |
11243906, | Dec 14 2018 | OSAAP America, LLC | Drag and drop format conversion between applications |
7137127, | Oct 10 2000 | Method of processing information embedded in a displayed object | |
7234109, | Nov 19 2002 | Microsoft Technology Licensing, LLC | Equality of extensible markup language structures |
7581225, | Apr 29 2005 | Microsoft Technology Licensing, LLC | Multithreading with concurrency domains |
7886269, | Apr 29 2005 | Microsoft Technology Licensing, LLC | XML application framework |
7886307, | Sep 26 2003 | MATHWORKS, INC , THE | Object-oriented data transfer system for data sharing |
7933296, | Mar 02 2007 | Microsoft Technology Licensing, LLC | Services for data sharing and synchronization |
8020112, | Nov 06 2006 | Microsoft Technology Licensing, LLC | Clipboard augmentation |
8046737, | Apr 29 2005 | Microsoft Technology Licensing, LLC | XML application framework |
8132148, | Apr 29 2005 | Microsoft Technology Licensing, LLC | XML application framework |
8275793, | Apr 29 2005 | Microsoft Technology Licensing, LLC | Transaction transforms |
8296671, | May 01 2008 | Microsoft Technology Licensing, LLC | Enabling access to rich data by intercepting paste operations |
8370423, | Jun 16 2006 | Microsoft Technology Licensing, LLC | Data synchronization and sharing relationships |
8413063, | Dec 19 2008 | R2 SOLUTIONS LLC | Conversion and query for data dragged on web-sites |
8418132, | Apr 29 2005 | Microsoft Technology Licensing, LLC | Application description language |
8453066, | Nov 06 2006 | Microsoft Technology Licensing, LLC | Clipboard augmentation with references |
8504931, | Dec 19 2008 | R2 SOLUTIONS LLC | Conversion service for data dragged on web-sites |
8751442, | Feb 12 2007 | ZHIGU HOLDINGS LIMITED | Synchronization associated duplicate data resolution |
8793649, | Apr 29 2005 | Microsoft Technology Licensing, LLC | XML application framework |
8799857, | Apr 29 2005 | Microsoft Technology Licensing, LLC | XML application framework |
9203786, | Jun 16 2006 | Microsoft Technology Licensing, LLC | Data synchronization and sharing relationships |
9417933, | May 01 2008 | Microsoft Technology Licensing, LLC | Enabling access to rich data by intercepting paste operations |
9747266, | Nov 06 2006 | Microsoft Technology Licensing, LLC | Clipboard augmentation with references |
Patent | Priority | Assignee | Title |
5157763, | Oct 15 1987 | International Business Machines Corporation | Visually assisted method for transfer of data within an application or from a source application to a receiving application |
5187787, | Jul 27 1989 | Reuters Limited | Apparatus and method for providing decoupling of data exchange details for providing high performance communication between software processes |
5257369, | Oct 22 1990 | Thomson Reuters Global Resources Unlimited Company | Apparatus and method for providing decoupling of data exchange details for providing high performance communication between software processes |
5261080, | Aug 21 1987 | Eastman Kodak Company | Matchmaker for assisting and executing the providing and conversion of data between objects in a data processing system storing data in typed objects having different data formats |
5303379, | Aug 21 1987 | Eastman Kodak Company | Link mechanism for linking data between objects and for performing operations on the linked data in an object based system |
5333298, | Aug 08 1991 | Honeywell Inc. | System for making data available to an outside software package by utilizing a data file which contains source and destination information |
5392390, | Apr 10 1992 | Intellisync Corporation | Method for mapping, translating, and dynamically reconciling data between disparate computer platforms |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Feb 25 1999 | Microsoft Corporation | (assignment on the face of the patent) | / | |||
Oct 14 2014 | Microsoft Corporation | Microsoft Technology Licensing, LLC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 034541 | /0001 |
Date | Maintenance Fee Events |
Nov 01 2004 | ASPN: Payor Number Assigned. |
Sep 17 2007 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Sep 14 2011 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Nov 20 2015 | REM: Maintenance Fee Reminder Mailed. |
Apr 13 2016 | EXP: Patent Expired for Failure to Pay Maintenance Fees. |
Date | Maintenance Schedule |
Apr 13 2007 | 4 years fee payment window open |
Oct 13 2007 | 6 months grace period start (w surcharge) |
Apr 13 2008 | patent expiry (for year 4) |
Apr 13 2010 | 2 years to revive unintentionally abandoned end. (for year 4) |
Apr 13 2011 | 8 years fee payment window open |
Oct 13 2011 | 6 months grace period start (w surcharge) |
Apr 13 2012 | patent expiry (for year 8) |
Apr 13 2014 | 2 years to revive unintentionally abandoned end. (for year 8) |
Apr 13 2015 | 12 years fee payment window open |
Oct 13 2015 | 6 months grace period start (w surcharge) |
Apr 13 2016 | patent expiry (for year 12) |
Apr 13 2018 | 2 years to revive unintentionally abandoned end. (for year 12) |