1997-11-30 18:45:40 +01:00
|
|
|
/*
|
|
|
|
* OLECLI library
|
|
|
|
*
|
|
|
|
* Copyright 1995 Martin von Loewis
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
1997-11-30 18:45:40 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* At the moment, these are only empty stubs.
|
|
|
|
*/
|
2001-07-24 01:50:18 +02:00
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2002-12-23 02:46:34 +01:00
|
|
|
#include "windef.h"
|
|
|
|
#include "wine/windef16.h"
|
2000-09-27 00:20:14 +02:00
|
|
|
#include "winbase.h"
|
2000-02-10 20:39:48 +01:00
|
|
|
#include "wingdi.h"
|
2002-10-19 01:48:57 +02:00
|
|
|
#include "wownt32.h"
|
2002-12-23 02:46:34 +01:00
|
|
|
#include "objbase.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
1999-01-23 12:54:12 +01:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
2002-12-23 02:46:34 +01:00
|
|
|
typedef enum
|
|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|
|
|
|
OLE_ERROR_ADVISE_PICT,
|
|
|
|
OLE_ERROR_ADVISE_RENAME,
|
|
|
|
OLE_ERROR_POKE_NATIVE,
|
|
|
|
OLE_ERROR_REQUEST_NATIVE,
|
|
|
|
OLE_ERROR_REQUEST_PICT,
|
|
|
|
OLE_ERROR_SERVER_BLOCKED,
|
|
|
|
OLE_ERROR_REGISTRATION,
|
|
|
|
OLE_ERROR_ALREADY_REGISTERED,
|
|
|
|
OLE_ERROR_TASK,
|
|
|
|
OLE_ERROR_OUTOFDATE,
|
|
|
|
OLE_ERROR_CANT_UPDATE_CLIENT,
|
|
|
|
OLE_ERROR_UPDATE,
|
|
|
|
OLE_ERROR_SETDATA_FORMAT,
|
|
|
|
OLE_ERROR_STATIC_FROM_OTHER_OS,
|
|
|
|
OLE_WARN_DELETE_DATA = 1000
|
|
|
|
} OLESTATUS;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
olerender_none,
|
|
|
|
olerender_draw,
|
|
|
|
olerender_format
|
|
|
|
} OLEOPT_RENDER;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
oleupdate_always,
|
|
|
|
oleupdate_onsave,
|
|
|
|
oleupdate_oncall,
|
|
|
|
oleupdate_onclose
|
|
|
|
} OLEOPT_UPDATE;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
OLE_NONE, /* none */
|
|
|
|
OLE_DELETE, /* delete object */
|
|
|
|
OLE_LNKPASTE, /* link paste */
|
|
|
|
OLE_EMBPASTE, /* paste(and update) */
|
|
|
|
OLE_SHOW,
|
|
|
|
OLE_RUN,
|
|
|
|
OLE_ACTIVATE,
|
|
|
|
OLE_UPDATE,
|
|
|
|
OLE_CLOSE,
|
|
|
|
OLE_RECONNECT,
|
|
|
|
OLE_SETUPDATEOPTIONS,
|
|
|
|
OLE_SERVERRUNLAUNCH, /* unlaunch (terminate?) server */
|
|
|
|
OLE_LOADFROMSTREAM, /* (auto reconnect) */
|
|
|
|
OLE_SETDATA, /* OleSetData */
|
|
|
|
OLE_REQUESTDATA, /* OleRequestData */
|
|
|
|
OLE_OTHER,
|
|
|
|
OLE_CREATE,
|
|
|
|
OLE_CREATEFROMTEMPLATE,
|
|
|
|
OLE_CREATELINKFROMFILE,
|
|
|
|
OLE_COPYFROMLNK,
|
|
|
|
OLE_CREATREFROMFILE,
|
|
|
|
OLE_CREATEINVISIBLE
|
|
|
|
} OLE_RELEASE_METHOD;
|
|
|
|
|
|
|
|
typedef LONG LHCLIENTDOC;
|
|
|
|
typedef struct _OLEOBJECT *LPOLEOBJECT;
|
|
|
|
typedef struct _OLECLIENT *LPOLECLIENT;
|
|
|
|
typedef LONG OLECLIPFORMAT;/* dunno about this type, please change/add */
|
|
|
|
typedef OLEOPT_UPDATE *LPOLEOPT_UPDATE;
|
|
|
|
|
|
|
|
struct _OLESTREAM;
|
|
|
|
|
|
|
|
typedef struct _OLEOBJECTVTBL {
|
|
|
|
void CALLBACK *(*QueryProtocol)(LPOLEOBJECT,LPCOLESTR16);
|
|
|
|
OLESTATUS (CALLBACK *Release)(LPOLEOBJECT);
|
|
|
|
OLESTATUS (CALLBACK *Show)(LPOLEOBJECT,BOOL16);
|
|
|
|
OLESTATUS (CALLBACK *DoVerb)(LPOLEOBJECT,UINT16,BOOL16,BOOL16);
|
|
|
|
OLESTATUS (CALLBACK *GetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE16 *);
|
|
|
|
OLESTATUS (CALLBACK *SetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE16);
|
|
|
|
OLESTATUS (CALLBACK *SetTargetDevice)(LPOLEOBJECT,HGLOBAL16);
|
|
|
|
OLESTATUS (CALLBACK *SetBounds)(LPOLEOBJECT,LPRECT16);
|
|
|
|
OLESTATUS (CALLBACK *EnumFormats)(LPOLEOBJECT,OLECLIPFORMAT);
|
|
|
|
OLESTATUS (CALLBACK *SetColorScheme)(LPOLEOBJECT,struct tagLOGPALETTE*);
|
|
|
|
OLESTATUS (CALLBACK *Delete)(LPOLEOBJECT);
|
|
|
|
OLESTATUS (CALLBACK *SetHostNames)(LPOLEOBJECT,LPCOLESTR16,LPCOLESTR16);
|
|
|
|
OLESTATUS (CALLBACK *SaveToStream)(LPOLEOBJECT,struct _OLESTREAM*);
|
|
|
|
OLESTATUS (CALLBACK *Clone)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT *);
|
|
|
|
OLESTATUS (CALLBACK *CopyFromLink)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT *);
|
|
|
|
OLESTATUS (CALLBACK *Equal)(LPOLEOBJECT,LPOLEOBJECT);
|
|
|
|
OLESTATUS (CALLBACK *CopyToClipBoard)(LPOLEOBJECT);
|
|
|
|
OLESTATUS (CALLBACK *Draw)(LPOLEOBJECT,HDC16,LPRECT16,LPRECT16,HDC16);
|
|
|
|
OLESTATUS (CALLBACK *Activate)(LPOLEOBJECT,UINT16,BOOL16,BOOL16,HWND16,LPRECT16);
|
|
|
|
OLESTATUS (CALLBACK *Execute)(LPOLEOBJECT,HGLOBAL16,UINT16);
|
|
|
|
OLESTATUS (CALLBACK *Close)(LPOLEOBJECT);
|
|
|
|
OLESTATUS (CALLBACK *Update)(LPOLEOBJECT);
|
|
|
|
OLESTATUS (CALLBACK *Reconnect)(LPOLEOBJECT);
|
|
|
|
OLESTATUS (CALLBACK *ObjectConvert)(LPOLEOBJECT,LPCOLESTR16,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT*);
|
|
|
|
OLESTATUS (CALLBACK *GetLinkUpdateOptions)(LPOLEOBJECT,LPOLEOPT_UPDATE);
|
|
|
|
OLESTATUS (CALLBACK *SetLinkUpdateOptions)(LPOLEOBJECT,OLEOPT_UPDATE);
|
|
|
|
OLESTATUS (CALLBACK *Rename)(LPOLEOBJECT,LPCOLESTR16);
|
|
|
|
OLESTATUS (CALLBACK *QueryName)(LPOLEOBJECT,LPSTR,LPUINT16);
|
|
|
|
OLESTATUS (CALLBACK *QueryType)(LPOLEOBJECT,LPLONG);
|
|
|
|
OLESTATUS (CALLBACK *QueryBounds)(LPOLEOBJECT,LPRECT16);
|
|
|
|
OLESTATUS (CALLBACK *QuerySize)(LPOLEOBJECT,LPDWORD);
|
|
|
|
OLESTATUS (CALLBACK *QueryOpen)(LPOLEOBJECT);
|
|
|
|
OLESTATUS (CALLBACK *QueryOutOfDate)(LPOLEOBJECT);
|
|
|
|
OLESTATUS (CALLBACK *QueryReleaseStatus)(LPOLEOBJECT);
|
|
|
|
OLESTATUS (CALLBACK *QueryReleaseError)(LPOLEOBJECT);
|
|
|
|
OLE_RELEASE_METHOD (CALLBACK *QueryReleaseMethod)(LPOLEOBJECT);
|
|
|
|
OLESTATUS (CALLBACK *RequestData)(LPOLEOBJECT,OLECLIPFORMAT);
|
|
|
|
OLESTATUS (CALLBACK *ObjectLong)(LPOLEOBJECT,UINT16,LPLONG);
|
|
|
|
} OLEOBJECTVTBL;
|
|
|
|
typedef OLEOBJECTVTBL *LPOLEOBJECTVTBL;
|
|
|
|
|
|
|
|
typedef struct _OLEOBJECT
|
|
|
|
{
|
|
|
|
LPOLEOBJECTVTBL lpvtbl;
|
|
|
|
} OLEOBJECT;
|
1997-11-30 18:45:40 +01:00
|
|
|
|
2000-06-20 22:59:27 +02:00
|
|
|
static LONG OLE_current_handle;
|
1997-11-30 18:45:40 +01:00
|
|
|
|
2001-02-21 00:43:43 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* OleSavedClientDoc [OLECLI32.45]
|
|
|
|
*/
|
|
|
|
OLESTATUS WINAPI OleSavedClientDoc(LHCLIENTDOC hDoc)
|
|
|
|
{
|
|
|
|
FIXME("(%ld: stub\n", hDoc);
|
|
|
|
return OLE_OK;
|
|
|
|
}
|
|
|
|
|
1998-10-11 16:21:42 +02:00
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* OleRegisterClientDoc [OLECLI32.41]
|
1997-11-30 18:45:40 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
OLESTATUS WINAPI OleRegisterClientDoc(LPCSTR classname, LPCSTR docname,
|
1997-11-30 18:45:40 +01:00
|
|
|
LONG reserved, LHCLIENTDOC *hRet )
|
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%s,%s,...): stub\n",classname,docname);
|
1997-11-30 18:45:40 +01:00
|
|
|
*hRet=++OLE_current_handle;
|
|
|
|
return OLE_OK;
|
|
|
|
}
|
|
|
|
|
1998-10-11 16:21:42 +02:00
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* OleRenameClientDoc [OLECLI32.43]
|
1997-11-30 18:45:40 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
OLESTATUS WINAPI OleRenameClientDoc(LHCLIENTDOC hDoc, LPCSTR newName)
|
1997-11-30 18:45:40 +01:00
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%ld,%s,...): stub\n",hDoc, newName);
|
1997-11-30 18:45:40 +01:00
|
|
|
return OLE_OK;
|
|
|
|
}
|
|
|
|
|
1998-10-11 16:21:42 +02:00
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* OleRevokeClientDoc [OLECLI32.42]
|
1997-11-30 18:45:40 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
OLESTATUS WINAPI OleRevokeClientDoc(LHCLIENTDOC hServerDoc)
|
1997-11-30 18:45:40 +01:00
|
|
|
{
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%ld): stub\n",hServerDoc);
|
1997-11-30 18:45:40 +01:00
|
|
|
return OLE_OK;
|
|
|
|
}
|
|
|
|
|
1998-10-11 16:21:42 +02:00
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* OleCreateLinkFromClip [OLECLI32.11]
|
1997-11-30 18:45:40 +01:00
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
OLESTATUS WINAPI OleCreateLinkFromClip(
|
1997-11-30 18:45:40 +01:00
|
|
|
LPCSTR name,LPOLECLIENT olecli,LHCLIENTDOC hclientdoc,LPCSTR xname,
|
|
|
|
LPOLEOBJECT *lpoleob,OLEOPT_RENDER render,OLECLIPFORMAT clipformat
|
|
|
|
) {
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%s,%p,%08lx,%s,%p,%d,%ld): stub!\n",
|
1998-03-29 21:44:57 +02:00
|
|
|
name,olecli,hclientdoc,xname,lpoleob,render,clipformat);
|
1997-11-30 18:45:40 +01:00
|
|
|
return OLE_OK;
|
|
|
|
}
|
|
|
|
|
1998-10-11 16:21:42 +02:00
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* OleQueryLinkFromClip [OLECLI32.9]
|
1997-11-30 18:45:40 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
OLESTATUS WINAPI OleQueryLinkFromClip(LPCSTR name,OLEOPT_RENDER render,OLECLIPFORMAT clipformat) {
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%s,%d,%ld): stub!\n",name,render,clipformat);
|
1997-11-30 18:45:40 +01:00
|
|
|
return OLE_OK;
|
|
|
|
}
|
1999-03-13 13:51:19 +01:00
|
|
|
|
1998-10-11 16:21:42 +02:00
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* OleQueryCreateFromClip [OLECLI32.10]
|
1997-11-30 18:45:40 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
OLESTATUS WINAPI OleQueryCreateFromClip(LPCSTR name,OLEOPT_RENDER render,OLECLIPFORMAT clipformat) {
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%s,%d,%ld): stub!\n",name,render,clipformat);
|
1997-11-30 18:45:40 +01:00
|
|
|
return OLE_OK;
|
|
|
|
}
|
|
|
|
|
1998-10-11 16:21:42 +02:00
|
|
|
/******************************************************************************
|
2000-06-23 18:13:33 +02:00
|
|
|
* OleIsDcMeta [OLECLI32.60]
|
1997-11-30 18:45:40 +01:00
|
|
|
*/
|
2000-06-23 18:13:33 +02:00
|
|
|
BOOL WINAPI OleIsDcMeta(HDC hdc)
|
1997-11-30 18:45:40 +01:00
|
|
|
{
|
2002-10-19 01:48:57 +02:00
|
|
|
TRACE("(%p)\n",hdc);
|
2000-06-23 18:13:33 +02:00
|
|
|
return GetObjectType( hdc ) == OBJ_METADC;
|
1997-11-30 18:45:40 +01:00
|
|
|
}
|
|
|
|
|
1998-10-11 16:21:42 +02:00
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* OleSetHostNames [OLECLI32.15]
|
1997-11-30 18:45:40 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
OLESTATUS WINAPI OleSetHostNames(LPOLEOBJECT oleob,LPCSTR name1,LPCSTR name2) {
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%p,%s,%s): stub\n",oleob,name1,name2);
|
1997-11-30 18:45:40 +01:00
|
|
|
return OLE_OK;
|
|
|
|
}
|
|
|
|
|
1998-10-11 16:21:42 +02:00
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* OleQueryType [OLECLI32.14]
|
1997-11-30 18:45:40 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
OLESTATUS WINAPI OleQueryType(LPOLEOBJECT oleob,LONG*xlong) {
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%p,%p): stub!\n",oleob,xlong);
|
1997-11-30 18:45:40 +01:00
|
|
|
if (!oleob)
|
|
|
|
return 0x10;
|
1999-07-04 18:02:24 +02:00
|
|
|
TRACE("Calling OLEOBJECT.QueryType (%p) (%p,%p)\n",
|
1998-03-29 21:44:57 +02:00
|
|
|
oleob->lpvtbl->QueryType,oleob,xlong);
|
1997-11-30 18:45:40 +01:00
|
|
|
return oleob->lpvtbl->QueryType(oleob,xlong);
|
|
|
|
}
|
|
|
|
|
1998-10-11 16:21:42 +02:00
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* OleCreateFromClip [OLECLI32.12]
|
1997-11-30 18:45:40 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
OLESTATUS WINAPI OleCreateFromClip(
|
1997-11-30 18:45:40 +01:00
|
|
|
LPCSTR name,LPOLECLIENT olecli,LHCLIENTDOC hclientdoc,LPCSTR xname,
|
|
|
|
LPOLEOBJECT *lpoleob,OLEOPT_RENDER render, OLECLIPFORMAT clipformat
|
|
|
|
) {
|
1999-07-04 18:02:24 +02:00
|
|
|
FIXME("(%s,%p,%08lx,%s,%p,%d,%ld): stub!\n",
|
1998-03-29 21:44:57 +02:00
|
|
|
name,olecli,hclientdoc,xname,lpoleob,render,clipformat);
|
1997-11-30 18:45:40 +01:00
|
|
|
/* clipb type, object kreieren entsprechend etc. */
|
|
|
|
return OLE_OK;
|
|
|
|
}
|