ReactOS  0.4.15-dev-5492-g47f3a4e
CFontExt.cpp File Reference
#include "precomp.h"
#include "undocgdi.h"
Include dependency graph for CFontExt.cpp:

Go to the source code of this file.

Classes

struct  FolderViewColumns
 

Macros

#define SHCIDS_ALLFIELDS   0x80000000L
 

Enumerations

enum  font_columns {
  FONTEXT_COL_NAME, FONTEXT_COL_FILENAME, FONTEXT_COL_SIZE, FONTEXT_COL_MODIFIED,
  FONTEXT_COL_ATTR
}
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (fontext)
 
bool GetInterfaceName (const WCHAR *InterfaceString, WCHAR *buf, size_t size)
 
WCHARg2s (REFCLSID iid)
 

Variables

static FolderViewColumns g_ColumnDefs []
 

Macro Definition Documentation

◆ SHCIDS_ALLFIELDS

#define SHCIDS_ALLFIELDS   0x80000000L

Definition at line 15 of file CFontExt.cpp.

Enumeration Type Documentation

◆ font_columns

Enumerator
FONTEXT_COL_NAME 
FONTEXT_COL_FILENAME 
FONTEXT_COL_SIZE 
FONTEXT_COL_MODIFIED 
FONTEXT_COL_ATTR 

Definition at line 26 of file CFontExt.cpp.

Function Documentation

◆ g2s()

WCHAR* g2s ( REFCLSID  iid)

Definition at line 57 of file CFontExt.cpp.

58 {
59  static WCHAR buf[2][300];
60  static int idx = 0;
61 
62  idx ^= 1;
63 
64  LPOLESTR tmp;
65  HRESULT hr = ProgIDFromCLSID(iid, &tmp);
66  if (SUCCEEDED(hr))
67  {
68  wcscpy(buf[idx], tmp);
69  CoTaskMemFree(tmp);
70  return buf[idx];
71  }
74  {
75  return buf[idx];
76  }
78 
79  return buf[idx];
80 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
HRESULT hr
Definition: shlfolder.c:183
bool GetInterfaceName(const WCHAR *InterfaceString, WCHAR *buf, size_t size)
Definition: CFontExt.cpp:46
static LPOLESTR
Definition: stg_prop.c:27
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
HRESULT WINAPI DECLSPEC_HOTPATCH ProgIDFromCLSID(REFCLSID clsid, LPOLESTR *ppszProgID)
Definition: compobj.c:2530
if SUCCEEDED(hr)
unsigned int idx
Definition: utils.c:41
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#define _countof(array)
Definition: sndvol32.h:68
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
Definition: compobj.c:2434
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)

Referenced by CFontExt::BindToObject().

◆ GetInterfaceName()

bool GetInterfaceName ( const WCHAR InterfaceString,
WCHAR buf,
size_t  size 
)

Definition at line 46 of file CFontExt.cpp.

47 {
48  WCHAR LocalBuf[100];
49  DWORD dwType = 0, dwDataSize = size * sizeof(WCHAR);
50 
51  if (!SUCCEEDED(StringCchPrintfW(LocalBuf, _countof(LocalBuf), L"Interface\\%s", InterfaceString)))
52  return false;
53 
54  return RegGetValueW(HKEY_CLASSES_ROOT, LocalBuf, NULL, RRF_RT_REG_SZ, &dwType, buf, &dwDataSize) == ERROR_SUCCESS;
55 }
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
Definition: reg.c:1965
#define ERROR_SUCCESS
Definition: deptool.c:10
#define RRF_RT_REG_SZ
Definition: driver.c:575
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define L(x)
Definition: ntvdm.h:50
if SUCCEEDED(hr)
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define _countof(array)
Definition: sndvol32.h:68
unsigned long DWORD
Definition: ntddk_ex.h:95
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
#define NULL
Definition: types.h:112
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10

Referenced by g2s(), and InfoTdiQueryGetInterfaceMIB().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( fontext  )

Variable Documentation

◆ g_ColumnDefs