ReactOS 0.4.16-dev-125-g798ea90
fusionpriv.h File Reference
#include <stdarg.h>
#include "ntstatus.h"
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winver.h"
#include "wine/heap.h"
#include <pshpack1.h>
#include <poppack.h>
Include dependency graph for fusionpriv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  METADATAHDR
 
struct  METADATASTREAMHDR
 
struct  METADATATABLESHDR
 
struct  MODULETABLE
 
struct  TYPEDEFTABLE
 
struct  TYPEREFTABLE
 
struct  FIELDTABLE
 
struct  ASSEMBLYTABLE
 
struct  MANIFESTRESTABLE
 
struct  METHODDEFTABLE
 
struct  PARAMTABLE
 
struct  INTERFACEIMPLTABLE
 
struct  MEMBERREFTABLE
 
struct  CONSTANTTABLE
 
struct  CUSTOMATTRIBUTETABLE
 
struct  FIELDMARSHALTABLE
 
struct  DECLSECURITYTABLE
 
struct  CLASSLAYOUTTABLE
 
struct  FIELDLAYOUTTABLE
 
struct  STANDALONESIGTABLE
 
struct  EVENTMAPTABLE
 
struct  EVENTTABLE
 
struct  PROPERTYMAPTABLE
 
struct  PROPERTYTABLE
 
struct  METHODSEMANTICSTABLE
 
struct  METHODIMPLTABLE
 
struct  MODULEREFTABLE
 
struct  TYPESPECTABLE
 
struct  IMPLMAPTABLE
 
struct  FIELDRVATABLE
 
struct  ASSEMBLYPROCESSORTABLE
 
struct  ASSEMBLYOSTABLE
 
struct  ASSEMBLYREFTABLE
 
struct  ASSEMBLYREFPROCESSORTABLE
 
struct  ASSEMBLYREFOSTABLE
 
struct  FILETABLE
 
struct  EXPORTEDTYPETABLE
 
struct  NESTEDCLASSTABLE
 
struct  GENERICPARAMTABLE
 
struct  METHODSPECTABLE
 
struct  GENERICPARAMCONSTRAINTTABLE
 
struct  IMPORTTABLE
 
struct  IMPORTLOOKUPTABLE
 
struct  HINTNAMETABLE
 
struct  RELOCATION
 
struct  VS_VERSIONINFO
 
struct  VARFILEINFO
 
struct  VAR
 
struct  STRINGFILEINFO
 
struct  STRINGTABLE
 
struct  STRINGHDR
 
struct  RESOURCE
 

Macros

#define WIN32_NO_STATUS
 
#define BYTES_PER_TOKEN   8
 
#define CHARS_PER_BYTE   2
 
#define TOKEN_LENGTH   (BYTES_PER_TOKEN * CHARS_PER_BYTE + 1)
 

Typedefs

typedef struct tagASSEMBLY ASSEMBLY
 

Functions

HRESULT assembly_create (ASSEMBLY **out, LPCWSTR file) DECLSPEC_HIDDEN
 
HRESULT assembly_release (ASSEMBLY *assembly) DECLSPEC_HIDDEN
 
HRESULT assembly_get_name (ASSEMBLY *assembly, LPWSTR *name) DECLSPEC_HIDDEN
 
HRESULT assembly_get_path (const ASSEMBLY *assembly, LPWSTR *path) DECLSPEC_HIDDEN
 
HRESULT assembly_get_version (ASSEMBLY *assembly, LPWSTR *version) DECLSPEC_HIDDEN
 
PEKIND assembly_get_architecture (ASSEMBLY *assembly) DECLSPEC_HIDDEN
 
HRESULT assembly_get_pubkey_token (ASSEMBLY *assembly, LPWSTR *token) DECLSPEC_HIDDEN
 
HRESULT assembly_get_runtime_version (ASSEMBLY *assembly, LPSTR *version) DECLSPEC_HIDDEN
 
HRESULT assembly_get_external_files (ASSEMBLY *assembly, LPWSTR **files, DWORD *count) DECLSPEC_HIDDEN
 
HRESULT IAssemblyName_SetPath (IAssemblyName *iface, LPCWSTR path) DECLSPEC_HIDDEN
 
HRESULT IAssemblyName_GetPath (IAssemblyName *iface, LPWSTR buf, ULONG *len) DECLSPEC_HIDDEN
 
static LPWSTR strdupW (LPCWSTR src)
 
static void token_to_str (BYTE *bytes, LPWSTR str)
 

Macro Definition Documentation

◆ BYTES_PER_TOKEN

#define BYTES_PER_TOKEN   8

Definition at line 466 of file fusionpriv.h.

◆ CHARS_PER_BYTE

#define CHARS_PER_BYTE   2

Definition at line 467 of file fusionpriv.h.

◆ TOKEN_LENGTH

#define TOKEN_LENGTH   (BYTES_PER_TOKEN * CHARS_PER_BYTE + 1)

Definition at line 468 of file fusionpriv.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 27 of file fusionpriv.h.

Typedef Documentation

◆ ASSEMBLY

Definition at line 438 of file fusionpriv.h.

Function Documentation

◆ assembly_create()

HRESULT assembly_create ( ASSEMBLY **  out,
LPCWSTR  file 
)

Definition at line 641 of file assembly.c.

642{
644 HRESULT hr;
645
646 *out = NULL;
647
648 if (!(assembly = heap_alloc_zero(sizeof(*assembly)))) return E_OUTOFMEMORY;
649
650 assembly->path = strdupW(file);
651 if (!assembly->path)
652 {
654 goto failed;
655 }
656
659 if (assembly->hfile == INVALID_HANDLE_VALUE)
660 {
662 goto failed;
663 }
664
666 0, 0, NULL);
667 if (!assembly->hmap)
668 {
670 goto failed;
671 }
672
673 assembly->data = MapViewOfFile(assembly->hmap, FILE_MAP_READ, 0, 0, 0);
674 if (!assembly->data)
675 {
677 goto failed;
678 }
679
681 if (FAILED(hr)) goto failed;
682
684 if (FAILED(hr)) goto failed;
685
686 *out = assembly;
687 return S_OK;
688
689failed:
691 return hr;
692}
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
#define PAGE_READONLY
Definition: compat.h:138
#define OPEN_EXISTING
Definition: compat.h:775
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileMappingW(a, b, c, d, e, f)
Definition: compat.h:744
#define GENERIC_READ
Definition: compat.h:135
#define CreateFileW
Definition: compat.h:741
#define FILE_MAP_READ
Definition: compat.h:776
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define MapViewOfFile
Definition: compat.h:745
#define FILE_SHARE_READ
Definition: compat.h:136
HRESULT assembly_release(ASSEMBLY *assembly)
Definition: assembly.c:694
static HRESULT parse_pe_header(ASSEMBLY *assembly)
Definition: assembly.c:603
static HRESULT parse_clr_metadata(ASSEMBLY *assembly)
Definition: assembly.c:560
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
static FILE * out
Definition: regtests2xml.c:44
HRESULT hr
Definition: shlfolder.c:183
Definition: fci.c:127
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92

◆ assembly_get_architecture()

PEKIND assembly_get_architecture ( ASSEMBLY assembly)

Definition at line 788 of file assembly.c.

789{
790 if ((assembly->corhdr->MajorRuntimeVersion == 2) && (assembly->corhdr->MinorRuntimeVersion == 0))
791 return peNone; /* .NET 1.x assembly */
792
793 if (assembly->nthdr->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC)
794 return peAMD64; /* AMD64/IA64 assembly */
795
796 if ((assembly->corhdr->Flags & COMIMAGE_FLAGS_ILONLY) && !(assembly->corhdr->Flags & COMIMAGE_FLAGS_32BITREQUIRED))
797 return peMSIL; /* MSIL assembly */
798
799 return peI386; /* x86 assembly */
800}
@ peMSIL
Definition: fusion.idl:38
@ peI386
Definition: fusion.idl:39
@ peNone
Definition: fusion.idl:37
@ peAMD64
Definition: fusion.idl:41
#define IMAGE_NT_OPTIONAL_HDR64_MAGIC
Definition: ntimage.h:377
@ COMIMAGE_FLAGS_ILONLY
Definition: winnt_old.h:3262
@ COMIMAGE_FLAGS_32BITREQUIRED
Definition: winnt_old.h:3263

Referenced by IAssemblyCacheImpl_InstallAssembly().

◆ assembly_get_external_files()

HRESULT assembly_get_external_files ( ASSEMBLY assembly,
LPWSTR **  files,
DWORD count 
)

Definition at line 871 of file assembly.c.

872{
873 LONG offset;
874 INT i, num_rows;
875 WCHAR **ret;
876 BYTE *ptr;
877 DWORD idx;
878
879 *count = 0;
880
881 offset = assembly->tables[TableFromToken(mdtFile)].offset;
882 if (offset == -1)
883 return S_OK;
884
886 if (!ptr)
887 return S_OK;
888
889 num_rows = assembly->tables[TableFromToken(mdtFile)].rows;
890 if (num_rows <= 0)
891 return S_OK;
892
893 if (!(ret = heap_alloc(num_rows * sizeof(WCHAR *)))) return E_OUTOFMEMORY;
894
895 for (i = 0; i < num_rows; i++)
896 {
897 ptr += sizeof(DWORD); /* skip Flags field */
898 if (assembly->stringsz == sizeof(DWORD))
899 idx = *(DWORD *)ptr;
900 else
901 idx = *(WORD *)ptr;
902
904 if (!ret[i])
905 {
906 for (; i >= 0; i--) heap_free(ret[i]);
907 heap_free(ret);
908 return E_OUTOFMEMORY;
909 }
910 ptr += assembly->stringsz; /* skip Name field */
911 ptr += assembly->blobsz; /* skip Hash field */
912 }
913 *count = num_rows;
914 *files = ret;
915 return S_OK;
916}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
@ mdtFile
Definition: corhdr.h:41
unsigned int idx
Definition: utils.c:41
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
#define TableFromToken(tk)
Definition: assembly.c:39
static VOID * assembly_data_offset(ASSEMBLY *assembly, ULONG offset)
Definition: assembly.c:139
static LPWSTR assembly_dup_str(const ASSEMBLY *assembly, DWORD index)
Definition: assembly.c:709
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLintptr offset
Definition: glext.h:5920
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
int JSAMPARRAY int int num_rows
Definition: jpegint.h:421
static PVOID ptr
Definition: dispmode.c:27
#define DWORD
Definition: nt_native.h:44
long LONG
Definition: pedump.c:60
int32_t INT
Definition: typedefs.h:58
int ret
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned char BYTE
Definition: xxhash.c:193

Referenced by IAssemblyCacheImpl_InstallAssembly().

◆ assembly_get_name()

HRESULT assembly_get_name ( ASSEMBLY assembly,
LPWSTR name 
)

Definition at line 723 of file assembly.c.

724{
725 BYTE *ptr;
726 LONG offset;
727 DWORD stridx;
728
729 offset = assembly->tables[TableFromToken(mdtAssembly)].offset;
730 if (offset == -1)
731 return E_FAIL;
732
734 if (!ptr)
735 return E_FAIL;
736
737 ptr += FIELD_OFFSET(ASSEMBLYTABLE, PublicKey) + assembly->blobsz;
738 if (assembly->stringsz == sizeof(DWORD))
739 stridx = *(DWORD *)ptr;
740 else
741 stridx = *(WORD *)ptr;
742
743 *name = assembly_dup_str(assembly, stridx);
744 if (!*name)
745 return E_OUTOFMEMORY;
746
747 return S_OK;
748}
@ mdtAssembly
Definition: corhdr.h:39
#define E_FAIL
Definition: ddrawi.h:102
Definition: name.c:39
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255

Referenced by IAssemblyCacheImpl_InstallAssembly().

◆ assembly_get_path()

HRESULT assembly_get_path ( const ASSEMBLY assembly,
LPWSTR path 
)

Definition at line 750 of file assembly.c.

751{
752 WCHAR *cpy = heap_alloc((lstrlenW(assembly->path) + 1) * sizeof(WCHAR));
753 *path = cpy;
754 if (cpy)
755 lstrcpyW(cpy, assembly->path);
756 else
757 return E_OUTOFMEMORY;
758
759 return S_OK;
760}
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750

Referenced by IAssemblyCacheImpl_InstallAssembly().

◆ assembly_get_pubkey_token()

HRESULT assembly_get_pubkey_token ( ASSEMBLY assembly,
LPWSTR token 
)

Definition at line 807 of file assembly.c.

808{
809 ULONG i, size;
810 LONG offset;
811 BYTE hashdata[20], *pubkey, *ptr;
813 BYTE tokbytes[BYTES_PER_TOKEN];
814 HRESULT hr = E_FAIL;
815 LPWSTR tok;
816 DWORD idx;
817
818 *token = NULL;
819
820 offset = assembly->tables[TableFromToken(mdtAssembly)].offset;
821 if (offset == -1)
822 return E_FAIL;
823
825 if (!ptr)
826 return E_FAIL;
827
828 ptr += FIELD_OFFSET(ASSEMBLYTABLE, PublicKey);
829 if (assembly->blobsz == sizeof(DWORD))
830 idx = *(DWORD *)ptr;
831 else
832 idx = *(WORD *)ptr;
833
835
837 return E_FAIL;
838
839 if (BCryptHash(alg, NULL, 0, pubkey, size, hashdata, sizeof(hashdata)) != STATUS_SUCCESS)
840 {
841 hr = E_FAIL;
842 goto done;
843 }
844
845 size = sizeof(hashdata);
846 for (i = size - 1; i >= size - 8; i--)
847 tokbytes[size - i - 1] = hashdata[i];
848
849 if (!(tok = heap_alloc((TOKEN_LENGTH + 1) * sizeof(WCHAR))))
850 {
852 goto done;
853 }
854
855 token_to_str(tokbytes, tok);
856
857 *token = tok;
858 hr = S_OK;
859
860done:
862 return hr;
863}
#define MS_PRIMITIVE_PROVIDER
Definition: bcrypt.h:69
#define BCRYPT_SHA1_ALGORITHM
Definition: bcrypt.h:74
NTSTATUS WINAPI BCryptHash(BCRYPT_ALG_HANDLE algorithm, UCHAR *secret, ULONG secretlen, UCHAR *input, ULONG inputlen, UCHAR *output, ULONG outputlen)
Definition: bcrypt_main.c:1096
NTSTATUS WINAPI BCryptOpenAlgorithmProvider(BCRYPT_ALG_HANDLE *handle, LPCWSTR id, LPCWSTR implementation, DWORD flags)
Definition: bcrypt_main.c:336
NTSTATUS WINAPI BCryptCloseAlgorithmProvider(BCRYPT_ALG_HANDLE handle, DWORD flags)
Definition: bcrypt_main.c:380
static const WCHAR pubkey[]
Definition: asmname.c:68
static BYTE * assembly_get_blob(ASSEMBLY *assembly, DWORD index, ULONG *size)
Definition: assembly.c:802
#define TOKEN_LENGTH
Definition: fusionpriv.h:468
#define BYTES_PER_TOKEN
Definition: fusionpriv.h:466
static void token_to_str(BYTE *bytes, LPWSTR str)
Definition: fusionpriv.h:470
GLsizeiptr size
Definition: glext.h:5919
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
#define STATUS_SUCCESS
Definition: shellext.h:65
uint32_t ULONG
Definition: typedefs.h:59
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by IAssemblyCacheImpl_InstallAssembly().

◆ assembly_get_runtime_version()

HRESULT assembly_get_runtime_version ( ASSEMBLY assembly,
LPSTR version 
)

Definition at line 865 of file assembly.c.

866{
867 *version = assembly->metadatahdr->Version;
868 return S_OK;
869}
static const WCHAR version[]
Definition: asmname.c:66

◆ assembly_get_version()

HRESULT assembly_get_version ( ASSEMBLY assembly,
LPWSTR version 
)

Definition at line 762 of file assembly.c.

763{
764 static const WCHAR format[] = {'%','u','.','%','u','.','%','u','.','%','u',0};
765
766 ASSEMBLYTABLE *asmtbl;
767 LONG offset;
768
769 *version = NULL;
770
771 offset = assembly->tables[TableFromToken(mdtAssembly)].offset;
772 if (offset == -1)
773 return E_FAIL;
774
776 if (!asmtbl)
777 return E_FAIL;
778
779 if (!(*version = heap_alloc(24 * sizeof(WCHAR))))
780 return E_OUTOFMEMORY;
781
782 swprintf(*version, format, asmtbl->MajorVersion, asmtbl->MinorVersion,
783 asmtbl->BuildNumber, asmtbl->RevisionNumber);
784
785 return S_OK;
786}
#define swprintf
Definition: precomp.h:40
WORD RevisionNumber
Definition: fusionpriv.h:110
WORD BuildNumber
Definition: fusionpriv.h:109
WORD MinorVersion
Definition: fusionpriv.h:108
WORD MajorVersion
Definition: fusionpriv.h:107
Definition: format.c:58

Referenced by IAssemblyCacheImpl_InstallAssembly().

◆ assembly_release()

HRESULT assembly_release ( ASSEMBLY assembly)

Definition at line 694 of file assembly.c.

695{
696 if (!assembly)
697 return S_OK;
698
699 heap_free(assembly->metadatahdr);
700 heap_free(assembly->path);
702 CloseHandle(assembly->hmap);
703 CloseHandle(assembly->hfile);
705
706 return S_OK;
707}
#define CloseHandle
Definition: compat.h:739
#define UnmapViewOfFile
Definition: compat.h:746

◆ IAssemblyName_GetPath()

HRESULT IAssemblyName_GetPath ( IAssemblyName iface,
LPWSTR  buf,
ULONG len 
)

Definition at line 534 of file asmname.c.

535{
538
539 if (!name->path)
540 return S_OK;
541
542 if (!buf)
543 buffer_size = 0;
544
545 *len = lstrlenW(name->path) + 1;
546
547 if (*len <= buffer_size)
548 lstrcpyW(buf, name->path);
549 else
551
552 return S_OK;
553}
static IAssemblyNameImpl * unsafe_impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:516
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLsizei len
Definition: glext.h:6722
static void buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
Definition: swimpl.c:888
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:2345

Referenced by IAssemblyCacheImpl_QueryAssemblyInfo(), and IAssemblyCacheImpl_UninstallAssembly().

◆ IAssemblyName_SetPath()

HRESULT IAssemblyName_SetPath ( IAssemblyName iface,
LPCWSTR  path 
)

Definition at line 523 of file asmname.c.

524{
526
527 name->path = strdupW(path);
528 if (!name->path)
529 return E_OUTOFMEMORY;
530
531 return S_OK;
532}

Referenced by enum_gac_assemblies().

◆ strdupW()

static LPWSTR strdupW ( LPCWSTR  src)
inlinestatic

Definition at line 453 of file fusionpriv.h.

454{
455 LPWSTR dest;
456
457 if (!src)
458 return NULL;
459
460 if ((dest = heap_alloc((lstrlenW(src) + 1) * sizeof(WCHAR))))
461 lstrcpyW(dest, src);
462
463 return dest;
464}
GLenum src
Definition: glext.h:6340
static char * dest
Definition: rtl.c:135

◆ token_to_str()

static void token_to_str ( BYTE bytes,
LPWSTR  str 
)
inlinestatic

Definition at line 470 of file fusionpriv.h.

471{
472 DWORD i;
473
474 static const WCHAR hexval[] = {
475 '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'
476 };
477
478 for(i = 0; i < BYTES_PER_TOKEN; i++)
479 {
480 str[i * 2] = hexval[((bytes[i] >> 4) & 0xF)];
481 str[i * 2 + 1] = hexval[(bytes[i]) & 0x0F];
482 }
483 str[i * 2] = 0;
484}
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
const WCHAR * str

Referenced by assembly_get_pubkey_token(), build_file_mask(), and compare_assembly_names().