ReactOS 0.4.17-dev-769-g1500a35
hlink_private.h File Reference
#include <stdarg.h>
#include "winerror.h"
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "hlink.h"
Include dependency graph for hlink_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define COBJMACROS
 

Functions

HRESULT HLink_Constructor (IUnknown *, REFIID, void **)
 
HRESULT HLinkBrowseContext_Constructor (IUnknown *, REFIID, void **)
 
static LPWSTR hlink_co_strdupW (LPCWSTR str)
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file hlink_private.h.

Function Documentation

◆ hlink_co_strdupW()

static LPWSTR hlink_co_strdupW ( LPCWSTR  str)
inlinestatic

Definition at line 34 of file hlink_private.h.

35{
36 LPWSTR ret = NULL;
37
38 if(str) {
39 DWORD size;
40
41 size = (lstrlenW(str)+1)*sizeof(WCHAR);
43 memcpy(ret, str, size);
44 }
45
46 return ret;
47}
#define NULL
Definition: types.h:112
void *WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: malloc.c:381
#define lstrlenW
Definition: compat.h:750
return ret
Definition: mutex.c:147
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
short WCHAR
Definition: pedump.c:58
const WCHAR * str
uint16_t * LPWSTR
Definition: typedefs.h:56

Referenced by Authenticate_Authenticate(), HttpNegotiate_BeginningTransaction(), IHlink_fnGetFriendlyName(), IHlink_fnGetStringReference(), and IHlink_fnGetTargetFrameName().

◆ HLink_Constructor()

HRESULT HLink_Constructor ( IUnknown pUnkOuter,
REFIID  riid,
void **  ppv 
)

Definition at line 1130 of file link.c.

1131{
1132 HlinkImpl * hl;
1133 HRESULT hr;
1134
1135 TRACE("unkOut=%p riid=%s\n", pUnkOuter, debugstr_guid(riid));
1136 *ppv = NULL;
1137
1138 if (pUnkOuter)
1139 return CLASS_E_NOAGGREGATION;
1140
1141 if (!(hl = calloc(1, sizeof(*hl))))
1142 return E_OUTOFMEMORY;
1143
1144 hl->ref = 1;
1145 hl->IHlink_iface.lpVtbl = &hlvt;
1146 hl->IPersistStream_iface.lpVtbl = &psvt;
1147 hl->IDataObject_iface.lpVtbl = &dovt;
1149
1150 hr = IHlink_QueryInterface(&hl->IHlink_iface, riid, ppv);
1151 IHlink_Release(&hl->IHlink_iface);
1152
1153 return hr;
1154}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
HRESULT hr
Definition: delayimp.cpp:582
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define calloc
Definition: rosglue.h:14
#define TRACE(s)
Definition: solgame.cpp:4
Definition: link.c:41
IDataObject IDataObject_iface
Definition: link.c:46
IBindStatusCallback IBindStatusCallback_iface
Definition: link.c:56
IHlink IHlink_iface
Definition: link.c:42
IPersistStream IPersistStream_iface
Definition: link.c:45
LONG ref
Definition: link.c:43
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:3771

◆ HLinkBrowseContext_Constructor()

HRESULT HLinkBrowseContext_Constructor ( IUnknown pUnkOuter,
REFIID  riid,
void **  ppv 
)

Definition at line 371 of file browse_ctx.c.

372{
373 HlinkBCImpl * hl;
374 HRESULT hr;
375
376 TRACE("unkOut=%p riid=%s\n", pUnkOuter, debugstr_guid(riid));
377 *ppv = NULL;
378
379 if (pUnkOuter)
381
382 hl = calloc(1, sizeof(*hl));
383 if (!hl)
384 return E_OUTOFMEMORY;
385
386 hl->ref = 1;
387 hl->IHlinkBrowseContext_iface.lpVtbl = &hlvt;
388 list_init(&hl->links);
389
390 hr = IHlinkBrowseContext_QueryInterface(&hl->IHlinkBrowseContext_iface, riid, ppv);
391 IHlinkBrowseContext_Release(&hl->IHlinkBrowseContext_iface);
392
393 return hr;
394}
static void list_init(struct list_entry *head)
Definition: list.h:51
struct list links
Definition: browse_ctx.c:40
IHlinkBrowseContext IHlinkBrowseContext_iface
Definition: browse_ctx.c:36