ReactOS  0.4.14-dev-552-g2fad488
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 "wine/heap.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 **) DECLSPEC_HIDDEN
 
HRESULT HLinkBrowseContext_Constructor (IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
 
static LPWSTR hlink_strdupW (LPCWSTR str)
 
static LPWSTR hlink_co_strdupW (LPCWSTR str)
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 23 of file hlink_private.h.

Function Documentation

◆ hlink_co_strdupW()

static LPWSTR hlink_co_strdupW ( LPCWSTR  str)
inlinestatic

Definition at line 52 of file hlink_private.h.

53 {
54  LPWSTR ret = NULL;
55 
56  if(str) {
57  DWORD size;
58 
59  size = (lstrlenW(str)+1)*sizeof(WCHAR);
61  memcpy(ret, str, size);
62  }
63 
64  return ret;
65 }
#define lstrlenW
Definition: compat.h:415
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:404

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

◆ HLink_Constructor()

HRESULT HLink_Constructor ( IUnknown ,
REFIID  ,
void **   
)

Definition at line 1131 of file link.c.

1132 {
1133  HlinkImpl * hl;
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  hl = heap_alloc_zero(sizeof(HlinkImpl));
1142  if (!hl)
1143  return E_OUTOFMEMORY;
1144 
1145  hl->ref = 1;
1146  hl->IHlink_iface.lpVtbl = &hlvt;
1147  hl->IPersistStream_iface.lpVtbl = &psvt;
1148  hl->IDataObject_iface.lpVtbl = &dovt;
1150 
1151  *ppv = hl;
1152  return S_OK;
1153 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
IBindStatusCallback IBindStatusCallback_iface
Definition: link.c:56
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
LONG ref
Definition: link.c:43
Definition: link.c:40
smooth NULL
Definition: ftsmooth.c:416
IPersistStream IPersistStream_iface
Definition: link.c:45
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
IHlink IHlink_iface
Definition: link.c:42
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define S_OK
Definition: intsafe.h:59
IDataObject IDataObject_iface
Definition: link.c:46

◆ hlink_strdupW()

static LPWSTR hlink_strdupW ( LPCWSTR  str)
inlinestatic

Definition at line 37 of file hlink_private.h.

38 {
39  LPWSTR ret = NULL;
40 
41  if(str) {
42  DWORD size;
43 
44  size = (lstrlenW(str)+1)*sizeof(WCHAR);
45  ret = heap_alloc(size);
46  memcpy(ret, str, size);
47  }
48 
49  return ret;
50 }
#define lstrlenW
Definition: compat.h:415
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by ExtServ_ImplSetAdditionalHeaders(), ExtServ_ImplSetAuthenticateData(), HlinkCreateFromString(), IHlink_fnSetFriendlyName(), IHlink_fnSetMonikerReference(), IHlink_fnSetStringReference(), and IHlink_fnSetTargetFrameName().

◆ HLinkBrowseContext_Constructor()

HRESULT HLinkBrowseContext_Constructor ( IUnknown ,
REFIID  ,
void **   
)

Definition at line 370 of file browse_ctx.c.

371 {
372  HlinkBCImpl * hl;
373 
374  TRACE("unkOut=%p riid=%s\n", pUnkOuter, debugstr_guid(riid));
375  *ppv = NULL;
376 
377  if (pUnkOuter)
378  return CLASS_E_NOAGGREGATION;
379 
380  hl = heap_alloc_zero(sizeof(HlinkBCImpl));
381  if (!hl)
382  return E_OUTOFMEMORY;
383 
384  hl->ref = 1;
385  hl->IHlinkBrowseContext_iface.lpVtbl = &hlvt;
386  list_init(&hl->links);
387  hl->current = NULL;
388 
389  *ppv = hl;
390  return S_OK;
391 }
struct list links
Definition: browse_ctx.c:40
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
struct link_entry * current
Definition: browse_ctx.c:39
IHlinkBrowseContext IHlinkBrowseContext_iface
Definition: browse_ctx.c:36
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define S_OK
Definition: intsafe.h:59
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149