ReactOS  0.4.15-dev-2350-g7194f2f
actctx.c File Reference
#include <rtl.h>
#include <ntstrsafe.h>
#include <compat_undoc.h>
#include <debug.h>
#include <wine/unicode.h>
Include dependency graph for actctx.c:

Go to the source code of this file.

Classes

struct  xmlstr_t
 
struct  xml_elem
 
struct  xml_attr
 
struct  xmlbuf_t
 
struct  file_info
 
struct  assembly_version
 
struct  assembly_identity
 
struct  strsection_header
 
struct  string_index
 
struct  guidsection_header
 
struct  guid_index
 
struct  wndclass_redirect_data
 
struct  dllredirect_data
 
struct  tlibredirect_data
 
struct  comclassredirect_data
 
struct  ifacepsredirect_data
 
struct  clrsurrogate_data
 
struct  clrclass_data
 
struct  progidredirect_data
 
struct  progids
 
struct  entity
 
struct  entity_array
 
struct  dll_redirect
 
struct  assembly
 
struct  _ASSEMBLY_STORAGE_MAP_ENTRY
 
struct  _ASSEMBLY_STORAGE_MAP
 
struct  _ACTIVATION_CONTEXT
 
struct  actctx_loader
 
struct  _ACTIVATION_CONTEXT_WRAPPED
 
struct  olemisc_entry
 

Macros

#define NDEBUG
 
#define ACTCTX_FLAGS_ALL
 
#define STRSECTION_MAGIC   0x64487353 /* dHsS */
 
#define GUIDSECTION_MAGIC   0x64487347 /* dHsG */
 
#define ACTCTX_MAGIC_MARKER   (PVOID)'gMcA'
 
#define ACTCTX_FAKE_HANDLE   ((HANDLE) 0xf00baa)
 
#define ACTCTX_FAKE_COOKIE   ((ULONG_PTR) 0xf00bad)
 
#define MAX_NAMESPACES   64
 
#define FIND_ACTCTX_RETURN_FLAGS   0x00000002
 
#define FIND_ACTCTX_RETURN_ASSEMBLY_METADATA   0x00000004
 
#define FIND_ACTCTX_VALID_MASK   (FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX | FIND_ACTCTX_RETURN_FLAGS | FIND_ACTCTX_RETURN_ASSEMBLY_METADATA)
 

Typedefs

typedef struct _ASSEMBLY_STORAGE_MAP_ENTRY ASSEMBLY_STORAGE_MAP_ENTRY
 
typedef struct _ASSEMBLY_STORAGE_MAP_ENTRYPASSEMBLY_STORAGE_MAP_ENTRY
 
typedef struct _ASSEMBLY_STORAGE_MAP ASSEMBLY_STORAGE_MAP
 
typedef struct _ASSEMBLY_STORAGE_MAPPASSEMBLY_STORAGE_MAP
 
typedef struct _ACTIVATION_CONTEXT ACTIVATION_CONTEXT
 
typedef struct _ACTIVATION_CONTEXTPIACTIVATION_CONTEXT
 
typedef struct _ACTIVATION_CONTEXT_WRAPPED ACTIVATION_CONTEXT_WRAPPED
 
typedef struct _ACTIVATION_CONTEXT_WRAPPEDPACTIVATION_CONTEXT_WRAPPED
 

Enumerations

enum  comclass_threadingmodel {
  ThreadingModel_Apartment = 1, ThreadingModel_Free = 2, ThreadingModel_No = 3, ThreadingModel_Both = 4,
  ThreadingModel_Neutral = 5, ThreadingModel_Apartment = 1, ThreadingModel_Free = 2, ThreadingModel_No = 3,
  ThreadingModel_Both = 4, ThreadingModel_Neutral = 5, ThreadingModel_Apartment = 1, ThreadingModel_Free = 2,
  ThreadingModel_No = 3, ThreadingModel_Both = 4, ThreadingModel_Neutral = 5
}
 
enum  comclass_miscfields {
  MiscStatus = 1, MiscStatusIcon = 2, MiscStatusContent = 4, MiscStatusThumbnail = 8,
  MiscStatusDocPrint = 16, MiscStatus = 1, MiscStatusIcon = 2, MiscStatusContent = 4,
  MiscStatusThumbnail = 8, MiscStatusDocPrint = 16, MiscStatus = 1, MiscStatusIcon = 2,
  MiscStatusContent = 4, MiscStatusThumbnail = 8, MiscStatusDocPrint = 16
}
 
enum  ifaceps_mask { NumMethods = 1, BaseIface = 2, NumMethods = 1, BaseIface = 2 }
 
enum  assembly_type { APPLICATION_MANIFEST, ASSEMBLY_MANIFEST, ASSEMBLY_SHARED_MANIFEST }
 
enum  context_sections {
  WINDOWCLASS_SECTION = 1, DLLREDIRECT_SECTION = 2, TLIBREDIRECT_SECTION = 4, SERVERREDIRECT_SECTION = 8,
  IFACEREDIRECT_SECTION = 16, CLRSURROGATES_SECTION = 32, PROGIDREDIRECT_SECTION = 64
}
 

Functions

VOID NTAPI RtlpSxsBreakOnInvalidMarker (IN PACTIVATION_CONTEXT ActCtx, IN ULONG FailureCode)
 
FORCEINLINE VOID RtlpValidateActCtx (IN PACTIVATION_CONTEXT ActCtx)
 
static WCHARstrdupW (const WCHAR *str)
 
static WCHARxmlstrdupW (const xmlstr_t *str)
 
static BOOL xmlstr_cmp (const xmlstr_t *xmlstr, const WCHAR *str)
 
static BOOL xmlstr_cmpi (const xmlstr_t *xmlstr, const WCHAR *str)
 
static BOOL xmlstr_cmp_end (const xmlstr_t *xmlstr, const WCHAR *str)
 
static BOOL xml_attr_cmp (const struct xml_attr *attr, const WCHAR *str)
 
static BOOL xml_name_cmp (const struct xml_elem *elem1, const struct xml_elem *elem2)
 
static BOOL xml_elem_cmp (const struct xml_elem *elem, const WCHAR *str, const WCHAR *namespace)
 
static BOOL isxmlspace (WCHAR ch)
 
static struct assemblyadd_assembly (ACTIVATION_CONTEXT *actctx, enum assembly_type at)
 
static struct dll_redirectadd_dll_redirect (struct assembly *assembly)
 
static PCOMPATIBILITY_CONTEXT_ELEMENT add_compat_context (struct assembly *assembly)
 
static void free_assembly_identity (struct assembly_identity *ai)
 
static struct entityadd_entity (struct entity_array *array, DWORD kind)
 
static void free_entity_array (struct entity_array *array)
 
static BOOL is_matching_string (const WCHAR *str1, const WCHAR *str2)
 
static BOOL is_matching_identity (const struct assembly_identity *id1, const struct assembly_identity *id2)
 
static BOOL add_dependent_assembly_id (struct actctx_loader *acl, struct assembly_identity *ai)
 
static void free_depend_manifests (struct actctx_loader *acl)
 
static WCHARbuild_assembly_dir (struct assembly_identity *ai)
 
static void append_string (WCHAR *buffer, const WCHAR *prefix, const WCHAR *str)
 
static WCHARbuild_assembly_id (const struct assembly_identity *ai)
 
static ACTIVATION_CONTEXTcheck_actctx (HANDLE h)
 
static void actctx_addref (ACTIVATION_CONTEXT *actctx)
 
static void actctx_release (ACTIVATION_CONTEXT *actctx)
 
static BOOL set_error (xmlbuf_t *xmlbuf)
 
static BOOL is_xmlns_attr (const struct xml_attr *attr)
 
static void push_xmlns (xmlbuf_t *xmlbuf, const struct xml_attr *attr)
 
static xmlstr_t find_xmlns (xmlbuf_t *xmlbuf, const xmlstr_t *name)
 
static BOOL next_xml_attr (xmlbuf_t *xmlbuf, struct xml_attr *attr, BOOL *end)
 
static void read_xml_elem (xmlbuf_t *xmlbuf, struct xml_elem *elem)
 
static BOOL next_xml_elem (xmlbuf_t *xmlbuf, struct xml_elem *elem, const struct xml_elem *parent)
 
static BOOL parse_xml_header (xmlbuf_t *xmlbuf)
 
static BOOL parse_text_content (xmlbuf_t *xmlbuf, xmlstr_t *content)
 
static BOOL parse_version (const xmlstr_t *str, struct assembly_version *version)
 
static void parse_expect_no_attr (xmlbuf_t *xmlbuf, BOOL *end)
 
static void parse_expect_end_elem (xmlbuf_t *xmlbuf, const struct xml_elem *parent)
 
static void parse_unknown_elem (xmlbuf_t *xmlbuf, const struct xml_elem *parent)
 
static void parse_assembly_identity_elem (xmlbuf_t *xmlbuf, ACTIVATION_CONTEXT *actctx, struct assembly_identity *ai, const struct xml_elem *parent)
 
static enum comclass_threadingmodel parse_com_class_threadingmodel (xmlstr_t *value)
 
static OLEMISC get_olemisc_value (const WCHAR *str, int len)
 
static DWORD parse_com_class_misc (const xmlstr_t *value)
 
static BOOL com_class_add_progid (const xmlstr_t *progid, struct entity *entity)
 
static void parse_com_class_progid (xmlbuf_t *xmlbuf, struct entity *entity, const struct xml_elem *parent)
 
static void parse_com_class_elem (xmlbuf_t *xmlbuf, struct dll_redirect *dll, struct actctx_loader *acl, const struct xml_elem *parent)
 
static BOOL parse_nummethods (const xmlstr_t *str, struct entity *entity)
 
static void parse_add_interface_class (xmlbuf_t *xmlbuf, struct entity_array *entities, struct actctx_loader *acl, WCHAR *clsid)
 
static void parse_cominterface_proxy_stub_elem (xmlbuf_t *xmlbuf, struct dll_redirect *dll, struct actctx_loader *acl, const struct xml_elem *parent)
 
static BOOL parse_typelib_flags (const xmlstr_t *value, struct entity *entity)
 
static BOOL parse_typelib_version (const xmlstr_t *str, struct entity *entity)
 
static void parse_typelib_elem (xmlbuf_t *xmlbuf, struct dll_redirect *dll, struct actctx_loader *acl, const struct xml_elem *parent)
 
static int aligned_string_len (int len)
 
static int get_assembly_version (struct assembly *assembly, WCHAR *ret)
 
static void parse_window_class_elem (xmlbuf_t *xmlbuf, struct dll_redirect *dll, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_binding_redirect_elem (xmlbuf_t *xmlbuf, const struct xml_elem *parent)
 
static void parse_description_elem (xmlbuf_t *xmlbuf, const struct xml_elem *parent)
 
static void parse_com_interface_external_proxy_stub_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_clr_class_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_clr_surrogate_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_dependent_assembly_elem (xmlbuf_t *xmlbuf, struct actctx_loader *acl, const struct xml_elem *parent, BOOL optional)
 
static void parse_dependency_elem (xmlbuf_t *xmlbuf, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_noinherit_elem (xmlbuf_t *xmlbuf, const struct xml_elem *parent)
 
static void parse_noinheritable_elem (xmlbuf_t *xmlbuf, const struct xml_elem *parent)
 
static void parse_file_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_supportedos_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_compatibility_application_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_compatibility_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_settings_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, struct xml_elem *parent)
 
static void parse_windows_settings_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_application_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_requested_execution_level_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_requested_privileges_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_security_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_trust_info_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, const struct xml_elem *parent)
 
static void parse_assembly_elem (xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl, const struct xml_elem *parent, struct assembly_identity *expected_ai)
 
static NTSTATUS parse_manifest_buffer (struct actctx_loader *acl, struct assembly *assembly, struct assembly_identity *ai, xmlbuf_t *xmlbuf)
 
static NTSTATUS parse_manifest (struct actctx_loader *acl, struct assembly_identity *ai, LPCWSTR filename, LPCWSTR directory, BOOL shared, const void *buffer, SIZE_T size)
 
static NTSTATUS open_nt_file (HANDLE *handle, UNICODE_STRING *name)
 
static NTSTATUS get_module_filename (HMODULE module, UNICODE_STRING *str, USHORT extra_len)
 
static NTSTATUS get_manifest_in_module (struct actctx_loader *acl, struct assembly_identity *ai, LPCWSTR filename, LPCWSTR directory, BOOL shared, HANDLE hModule, LPCWSTR resname, ULONG lang)
 
IMAGE_RESOURCE_DIRECTORYfind_entry_by_name (IMAGE_RESOURCE_DIRECTORY *dir, LPCWSTR name, void *root, int want_dir)
 
IMAGE_RESOURCE_DIRECTORYfind_first_entry (IMAGE_RESOURCE_DIRECTORY *dir, void *root, int want_dir)
 
static IMAGE_RESOURCE_DIRECTORYfind_first_id_entry (IMAGE_RESOURCE_DIRECTORY *dir, void *root, int want_dir)
 
static NTSTATUS search_manifest_in_module (struct actctx_loader *acl, struct assembly_identity *ai, LPCWSTR filename, LPCWSTR directory, BOOL shared, HANDLE hModule, ULONG lang)
 
static NTSTATUS get_manifest_in_pe_file (struct actctx_loader *acl, struct assembly_identity *ai, LPCWSTR filename, LPCWSTR directory, BOOL shared, HANDLE file, LPCWSTR resname, ULONG lang)
 
static NTSTATUS get_manifest_in_manifest_file (struct actctx_loader *acl, struct assembly_identity *ai, LPCWSTR filename, LPCWSTR directory, BOOL shared, HANDLE file)
 
static NTSTATUS get_manifest_in_associated_manifest (struct actctx_loader *acl, struct assembly_identity *ai, LPCWSTR filename, LPCWSTR directory, HMODULE module, LPCWSTR resname)
 
static WCHARlookup_manifest_file (HANDLE dir, struct assembly_identity *ai)
 
static NTSTATUS lookup_winsxs (struct actctx_loader *acl, struct assembly_identity *ai)
 
static NTSTATUS lookup_assembly (struct actctx_loader *acl, struct assembly_identity *ai)
 
static NTSTATUS parse_depend_manifests (struct actctx_loader *acl)
 
static NTSTATUS find_query_actctx (HANDLE *handle, DWORD flags, ULONG class)
 
static NTSTATUS build_dllredirect_section (ACTIVATION_CONTEXT *actctx, struct strsection_header **section)
 
static struct string_indexfind_string_index (const struct strsection_header *section, const UNICODE_STRING *name)
 
static struct guid_indexfind_guid_index (const struct guidsection_header *section, const GUID *guid)
 
static struct dllredirect_dataget_dllredirect_data (ACTIVATION_CONTEXT *ctxt, struct string_index *index)
 
static NTSTATUS find_dll_redirection (ACTIVATION_CONTEXT *actctx, const UNICODE_STRING *name, PACTCTX_SECTION_KEYED_DATA data)
 
static struct string_indexget_wndclass_first_index (ACTIVATION_CONTEXT *actctx)
 
static struct wndclass_redirect_dataget_wndclass_data (ACTIVATION_CONTEXT *ctxt, struct string_index *index)
 
static NTSTATUS build_wndclass_section (ACTIVATION_CONTEXT *actctx, struct strsection_header **section)
 
static NTSTATUS find_window_class (ACTIVATION_CONTEXT *actctx, const UNICODE_STRING *name, PACTCTX_SECTION_KEYED_DATA data)
 
static NTSTATUS build_tlib_section (ACTIVATION_CONTEXT *actctx, struct guidsection_header **section)
 
static struct tlibredirect_dataget_tlib_data (ACTIVATION_CONTEXT *actctx, struct guid_index *index)
 
static NTSTATUS find_tlib_redirection (ACTIVATION_CONTEXT *actctx, const GUID *guid, ACTCTX_SECTION_KEYED_DATA *data)
 
static void generate_uuid (ULONG *seed, GUID *guid)
 
static void get_comserver_datalen (const struct entity_array *entities, const struct dll_redirect *dll, unsigned int *count, unsigned int *len, unsigned int *module_len)
 
static void add_comserver_record (const struct guidsection_header *section, const struct entity_array *entities, const struct dll_redirect *dll, struct guid_index **index, ULONG *data_offset, ULONG *module_offset, ULONG *seed, ULONG rosterindex)
 
static NTSTATUS build_comserver_section (ACTIVATION_CONTEXT *actctx, struct guidsection_header **section)
 
static struct comclassredirect_dataget_comclass_data (ACTIVATION_CONTEXT *actctx, struct guid_index *index)
 
static NTSTATUS find_comserver_redirection (ACTIVATION_CONTEXT *actctx, const GUID *guid, ACTCTX_SECTION_KEYED_DATA *data)
 
static void get_ifaceps_datalen (const struct entity_array *entities, unsigned int *count, unsigned int *len)
 
static void add_ifaceps_record (struct guidsection_header *section, struct entity_array *entities, struct guid_index **index, ULONG *data_offset, ULONG rosterindex)
 
static NTSTATUS build_ifaceps_section (ACTIVATION_CONTEXT *actctx, struct guidsection_header **section)
 
static struct ifacepsredirect_dataget_ifaceps_data (ACTIVATION_CONTEXT *actctx, struct guid_index *index)
 
static NTSTATUS find_cominterface_redirection (ACTIVATION_CONTEXT *actctx, const GUID *guid, ACTCTX_SECTION_KEYED_DATA *data)
 
static NTSTATUS build_clr_surrogate_section (ACTIVATION_CONTEXT *actctx, struct guidsection_header **section)
 
static struct clrsurrogate_dataget_surrogate_data (ACTIVATION_CONTEXT *actctx, const struct guid_index *index)
 
static NTSTATUS find_clr_surrogate (ACTIVATION_CONTEXT *actctx, const GUID *guid, ACTCTX_SECTION_KEYED_DATA *data)
 
static void get_progid_datalen (struct entity_array *entities, unsigned int *count, unsigned int *total_len)
 
static void write_progid_record (struct strsection_header *section, const WCHAR *progid, const GUID *alias, struct string_index **index, ULONG *data_offset, ULONG *global_offset, ULONG rosterindex)
 
static void add_progid_record (ACTIVATION_CONTEXT *actctx, struct strsection_header *section, const struct entity_array *entities, struct string_index **index, ULONG *data_offset, ULONG *global_offset, ULONG rosterindex)
 
static NTSTATUS build_progid_section (ACTIVATION_CONTEXT *actctx, struct strsection_header **section)
 
static struct progidredirect_dataget_progid_data (ACTIVATION_CONTEXT *actctx, const struct string_index *index)
 
static NTSTATUS find_progid_redirection (ACTIVATION_CONTEXT *actctx, const UNICODE_STRING *name, PACTCTX_SECTION_KEYED_DATA data)
 
static NTSTATUS find_string (ACTIVATION_CONTEXT *actctx, ULONG section_kind, const UNICODE_STRING *section_name, DWORD flags, PACTCTX_SECTION_KEYED_DATA data)
 
static NTSTATUS find_guid (ACTIVATION_CONTEXT *actctx, ULONG section_kind, const GUID *guid, DWORD flags, PACTCTX_SECTION_KEYED_DATA data)
 
void actctx_init (PVOID *pOldShimData)
 
NTSTATUS NTAPI RtlCreateActivationContext (IN ULONG Flags, IN PACTIVATION_CONTEXT_DATA ActivationContextData, IN ULONG ExtraBytes, IN PVOID NotificationRoutine, IN PVOID NotificationContext, OUT PACTIVATION_CONTEXT *ActCtx)
 
VOID NTAPI RtlAddRefActivationContext (HANDLE handle)
 
VOID NTAPI RtlReleaseActivationContext (HANDLE handle)
 
NTSTATUS NTAPI RtlZombifyActivationContext (PVOID Context)
 
NTSTATUS NTAPI RtlActivateActivationContextEx (ULONG flags, PTEB tebAddress, HANDLE handle, PULONG_PTR cookie)
 
NTSTATUS NTAPI RtlActivateActivationContext (ULONG flags, HANDLE handle, PULONG_PTR cookie)
 
NTSTATUS NTAPI RtlDeactivateActivationContext (ULONG flags, ULONG_PTR cookie)
 
VOID NTAPI RtlFreeActivationContextStack (IN PACTIVATION_CONTEXT_STACK Stack)
 
VOID NTAPI RtlFreeThreadActivationContextStack (VOID)
 
NTSTATUS NTAPI RtlGetActiveActivationContext (HANDLE *handle)
 
BOOLEAN NTAPI RtlIsActivationContextActive (HANDLE handle)
 
NTSTATUS NTAPI RtlQueryInformationActivationContext (ULONG flags, HANDLE handle, PVOID subinst, ULONG class, PVOID buffer, SIZE_T bufsize, SIZE_T *retlen)
 
NTSTATUS NTAPI RtlQueryInformationActiveActivationContext (ULONG ulInfoClass, PVOID pvBuffer, SIZE_T cbBuffer OPTIONAL, SIZE_T *pcbWrittenOrRequired OPTIONAL)
 
NTSTATUS NTAPI RtlpFindActivationContextSection_CheckParameters (ULONG flags, const GUID *guid, ULONG section_kind, const UNICODE_STRING *section_name, PACTCTX_SECTION_KEYED_DATA data)
 
NTSTATUS NTAPI RtlFindActivationContextSectionString (ULONG flags, const GUID *guid, ULONG section_kind, const UNICODE_STRING *section_name, PVOID ptr)
 
NTSTATUS WINAPI RtlFindActivationContextSectionGuid (ULONG flags, const GUID *extguid, ULONG section_kind, const GUID *guid, void *ptr)
 
NTSTATUS NTAPI RtlAllocateActivationContextStack (IN PACTIVATION_CONTEXT_STACK *Stack)
 
PRTL_ACTIVATION_CONTEXT_STACK_FRAME FASTCALL RtlActivateActivationContextUnsafeFast (IN PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame, IN PVOID Context)
 
PRTL_ACTIVATION_CONTEXT_STACK_FRAME FASTCALL RtlDeactivateActivationContextUnsafeFast (IN PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame)
 

Variables

BOOLEAN RtlpNotAllowingMultipleActivation
 
static const xmlstr_t empty_xmlstr
 
static const WCHAR current_archW [] = {'n','o','n','e',0}
 
static const WCHAR asmv1W [] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','1',0}
 
static const WCHAR asmv2W [] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','2',0}
 
static const WCHAR asmv3W [] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','3',0}
 
static const WCHAR assemblyW [] = {'a','s','s','e','m','b','l','y',0}
 
static const WCHAR assemblyIdentityW [] = {'a','s','s','e','m','b','l','y','I','d','e','n','t','i','t','y',0}
 
static const WCHAR bindingRedirectW [] = {'b','i','n','d','i','n','g','R','e','d','i','r','e','c','t',0}
 
static const WCHAR clrClassW [] = {'c','l','r','C','l','a','s','s',0}
 
static const WCHAR clrSurrogateW [] = {'c','l','r','S','u','r','r','o','g','a','t','e',0}
 
static const WCHAR comClassW [] = {'c','o','m','C','l','a','s','s',0}
 
static const WCHAR comInterfaceExternalProxyStubW [] = {'c','o','m','I','n','t','e','r','f','a','c','e','E','x','t','e','r','n','a','l','P','r','o','x','y','S','t','u','b',0}
 
static const WCHAR comInterfaceProxyStubW [] = {'c','o','m','I','n','t','e','r','f','a','c','e','P','r','o','x','y','S','t','u','b',0}
 
static const WCHAR dependencyW [] = {'d','e','p','e','n','d','e','n','c','y',0}
 
static const WCHAR dependentAssemblyW [] = {'d','e','p','e','n','d','e','n','t','A','s','s','e','m','b','l','y',0}
 
static const WCHAR descriptionW [] = {'d','e','s','c','r','i','p','t','i','o','n',0}
 
static const WCHAR fileW [] = {'f','i','l','e',0}
 
static const WCHAR hashW [] = {'h','a','s','h',0}
 
static const WCHAR noInheritW [] = {'n','o','I','n','h','e','r','i','t',0}
 
static const WCHAR noInheritableW [] = {'n','o','I','n','h','e','r','i','t','a','b','l','e',0}
 
static const WCHAR typelibW [] = {'t','y','p','e','l','i','b',0}
 
static const WCHAR windowClassW [] = {'w','i','n','d','o','w','C','l','a','s','s',0}
 
static const WCHAR clsidW [] = {'c','l','s','i','d',0}
 
static const WCHAR hashalgW [] = {'h','a','s','h','a','l','g',0}
 
static const WCHAR helpdirW [] = {'h','e','l','p','d','i','r',0}
 
static const WCHAR iidW [] = {'i','i','d',0}
 
static const WCHAR languageW [] = {'l','a','n','g','u','a','g','e',0}
 
static const WCHAR manifestVersionW [] = {'m','a','n','i','f','e','s','t','V','e','r','s','i','o','n',0}
 
static const WCHAR g_nameW [] = {'n','a','m','e',0}
 
static const WCHAR neutralW [] = {'n','e','u','t','r','a','l',0}
 
static const WCHAR newVersionW [] = {'n','e','w','V','e','r','s','i','o','n',0}
 
static const WCHAR oldVersionW [] = {'o','l','d','V','e','r','s','i','o','n',0}
 
static const WCHAR optionalW [] = {'o','p','t','i','o','n','a','l',0}
 
static const WCHAR processorArchitectureW [] = {'p','r','o','c','e','s','s','o','r','A','r','c','h','i','t','e','c','t','u','r','e',0}
 
static const WCHAR progidW [] = {'p','r','o','g','i','d',0}
 
static const WCHAR publicKeyTokenW [] = {'p','u','b','l','i','c','K','e','y','T','o','k','e','n',0}
 
static const WCHAR threadingmodelW [] = {'t','h','r','e','a','d','i','n','g','M','o','d','e','l',0}
 
static const WCHAR tlbidW [] = {'t','l','b','i','d',0}
 
static const WCHAR typeW [] = {'t','y','p','e',0}
 
static const WCHAR versionW [] = {'v','e','r','s','i','o','n',0}
 
static const WCHAR xmlnsW [] = {'x','m','l','n','s',0}
 
static const WCHAR versionedW [] = {'v','e','r','s','i','o','n','e','d',0}
 
static const WCHAR yesW [] = {'y','e','s',0}
 
static const WCHAR noW [] = {'n','o',0}
 
static const WCHAR restrictedW [] = {'R','E','S','T','R','I','C','T','E','D',0}
 
static const WCHAR controlW [] = {'C','O','N','T','R','O','L',0}
 
static const WCHAR hiddenW [] = {'H','I','D','D','E','N',0}
 
static const WCHAR hasdiskimageW [] = {'H','A','S','D','I','S','K','I','M','A','G','E',0}
 
static const WCHAR flagsW [] = {'f','l','a','g','s',0}
 
static const WCHAR miscstatusW [] = {'m','i','s','c','S','t','a','t','u','s',0}
 
static const WCHAR miscstatusiconW [] = {'m','i','s','c','S','t','a','t','u','s','I','c','o','n',0}
 
static const WCHAR miscstatuscontentW [] = {'m','i','s','c','S','t','a','t','u','s','C','o','n','t','e','n','t',0}
 
static const WCHAR miscstatusthumbnailW [] = {'m','i','s','c','S','t','a','t','u','s','T','h','u','m','b','n','a','i','l',0}
 
static const WCHAR miscstatusdocprintW [] = {'m','i','s','c','S','t','a','t','u','s','D','o','c','P','r','i','n','t',0}
 
static const WCHAR baseInterfaceW [] = {'b','a','s','e','I','n','t','e','r','f','a','c','e',0}
 
static const WCHAR nummethodsW [] = {'n','u','m','M','e','t','h','o','d','s',0}
 
static const WCHAR proxyStubClsid32W [] = {'p','r','o','x','y','S','t','u','b','C','l','s','i','d','3','2',0}
 
static const WCHAR runtimeVersionW [] = {'r','u','n','t','i','m','e','V','e','r','s','i','o','n',0}
 
static const WCHAR mscoreeW [] = {'M','S','C','O','R','E','E','.','D','L','L',0}
 
static const WCHAR mscoree2W [] = {'m','s','c','o','r','e','e','.','d','l','l',0}
 
static const WCHAR activatewhenvisibleW [] = {'a','c','t','i','v','a','t','e','w','h','e','n','v','i','s','i','b','l','e',0}
 
static const WCHAR actslikebuttonW [] = {'a','c','t','s','l','i','k','e','b','u','t','t','o','n',0}
 
static const WCHAR actslikelabelW [] = {'a','c','t','s','l','i','k','e','l','a','b','e','l',0}
 
static const WCHAR alignableW [] = {'a','l','i','g','n','a','b','l','e',0}
 
static const WCHAR alwaysrunW [] = {'a','l','w','a','y','s','r','u','n',0}
 
static const WCHAR canlinkbyole1W [] = {'c','a','n','l','i','n','k','b','y','o','l','e','1',0}
 
static const WCHAR cantlinkinsideW [] = {'c','a','n','t','l','i','n','k','i','n','s','i','d','e',0}
 
static const WCHAR ignoreactivatewhenvisibleW [] = {'i','g','n','o','r','e','a','c','t','i','v','a','t','e','w','h','e','n','v','i','s','i','b','l','e',0}
 
static const WCHAR imemodeW [] = {'i','m','e','m','o','d','e',0}
 
static const WCHAR insertnotreplaceW [] = {'i','n','s','e','r','t','n','o','t','r','e','p','l','a','c','e',0}
 
static const WCHAR insideoutW [] = {'i','n','s','i','d','e','o','u','t',0}
 
static const WCHAR invisibleatruntimeW [] = {'i','n','v','i','s','i','b','l','e','a','t','r','u','n','t','i','m','e',0}
 
static const WCHAR islinkobjectW [] = {'i','s','l','i','n','k','o','b','j','e','c','t',0}
 
static const WCHAR nouiactivateW [] = {'n','o','u','i','a','c','t','i','v','a','t','e',0}
 
static const WCHAR onlyiconicW [] = {'o','n','l','y','i','c','o','n','i','c',0}
 
static const WCHAR recomposeonresizeW [] = {'r','e','c','o','m','p','o','s','e','o','n','r','e','s','i','z','e',0}
 
static const WCHAR renderingisdeviceindependentW [] = {'r','e','n','d','e','r','i','n','g','i','s','d','e','v','i','c','e','i','n','d','e','p','e','n','d','e','n','t',0}
 
static const WCHAR setclientsitefirstW [] = {'s','e','t','c','l','i','e','n','t','s','i','t','e','f','i','r','s','t',0}
 
static const WCHAR simpleframeW [] = {'s','i','m','p','l','e','f','r','a','m','e',0}
 
static const WCHAR staticW [] = {'s','t','a','t','i','c',0}
 
static const WCHAR supportsmultilevelundoW [] = {'s','u','p','p','o','r','t','s','m','u','l','t','i','l','e','v','e','l','u','n','d','o',0}
 
static const WCHAR wantstomenumergeW [] = {'w','a','n','t','s','t','o','m','e','n','u','m','e','r','g','e',0}
 
static const WCHAR compatibilityW [] = {'c','o','m','p','a','t','i','b','i','l','i','t','y',0}
 
static const WCHAR compatibilityNSW [] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','c','o','m','p','a','t','i','b','i','l','i','t','y','.','v','1',0}
 
static const WCHAR applicationW [] = {'a','p','p','l','i','c','a','t','i','o','n',0}
 
static const WCHAR supportedOSW [] = {'s','u','p','p','o','r','t','e','d','O','S',0}
 
static const WCHAR IdW [] = {'I','d',0}
 
static const WCHAR requestedExecutionLevelW [] = {'r','e','q','u','e','s','t','e','d','E','x','e','c','u','t','i','o','n','L','e','v','e','l',0}
 
static const WCHAR requestedPrivilegesW [] = {'r','e','q','u','e','s','t','e','d','P','r','i','v','i','l','e','g','e','s',0}
 
static const WCHAR securityW [] = {'s','e','c','u','r','i','t','y',0}
 
static const WCHAR trustInfoW [] = {'t','r','u','s','t','I','n','f','o',0}
 
static const WCHAR windowsSettingsW [] = {'w','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0}
 
static const WCHAR autoElevateW [] = {'a','u','t','o','E','l','e','v','a','t','e',0}
 
static const WCHAR disableThemingW [] = {'d','i','s','a','b','l','e','T','h','e','m','i','n','g',0}
 
static const WCHAR disableWindowFilteringW [] = {'d','i','s','a','b','l','e','W','i','n','d','o','w','F','i','l','t','e','r','i','n','g',0}
 
static const WCHAR windowsSettings2005NSW [] = {'h','t','t','p',':','/','/','s','c','h','e','m','a','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','S','M','I','/','2','0','0','5','/','W','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0}
 
static const WCHAR windowsSettings2011NSW [] = {'h','t','t','p',':','/','/','s','c','h','e','m','a','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','S','M','I','/','2','0','1','1','/','W','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0}
 
static const WCHAR windowsSettings2016NSW [] = {'h','t','t','p',':','/','/','s','c','h','e','m','a','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','S','M','I','/','2','0','1','6','/','W','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0}
 
static const WCHAR windowsSettings2017NSW [] = {'h','t','t','p',':','/','/','s','c','h','e','m','a','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','S','M','I','/','2','0','1','7','/','W','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0}
 
static const WCHAR dpiAwareW [] = {'d','p','i','A','w','a','r','e',0}
 
static const WCHAR dpiAwarenessW [] = {'d','p','i','A','w','a','r','e','n','e','s','s',0}
 
static const WCHAR gdiScalingW [] = {'g','d','i','S','c','a','l','i','n','g',0}
 
static const WCHAR highResolutionScrollingAwareW [] = {'h','i','g','h','R','e','s','o','l','u','t','i','o','n','S','c','r','o','l','l','i','n','g','A','w','a','r','e',0}
 
static const WCHAR longPathAwareW [] = {'l','o','n','g','P','a','t','h','A','w','a','r','e',0}
 
static const WCHAR magicFutureSettingW [] = {'m','a','g','i','c','F','u','t','u','r','e','S','e','t','t','i','n','g',0}
 
static const WCHAR printerDriverIsolationW [] = {'p','r','i','n','t','e','r','D','r','i','v','e','r','I','s','o','l','a','t','i','o','n',0}
 
static const WCHAR ultraHighResolutionScrollingAwareW [] = {'u','l','t','r','a','H','i','g','h','R','e','s','o','l','u','t','i','o','n','S','c','r','o','l','l','i','n','g','A','w','a','r','e',0}
 
static const struct olemisc_entry olemisc_values []
 
static const WCHAR g_xmlW [] = {'?','x','m','l',0}
 
static const WCHAR manifestv1W [] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','1',0}
 
static const WCHAR manifestv2W [] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','2',0}
 
static const WCHAR manifestv3W [] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','3',0}
 
static const WCHAR dotManifestW [] = {'.','m','a','n','i','f','e','s','t',0}
 
static const WCHAR version_formatW [] = {'%','u','.','%','u','.','%','u','.','%','u',0}
 
static const WCHAR wildcardW [] = {'*',0}
 
static ACTIVATION_CONTEXT_WRAPPED system_actctx = { ACTCTX_MAGIC_MARKER, { 1 } }
 
static ACTIVATION_CONTEXTprocess_actctx = &system_actctx.ActivationContext
 
static ACTIVATION_CONTEXTimplicit_actctx = &system_actctx.ActivationContext
 

Macro Definition Documentation

◆ ACTCTX_FAKE_COOKIE

#define ACTCTX_FAKE_COOKIE   ((ULONG_PTR) 0xf00bad)

Definition at line 44 of file actctx.c.

◆ ACTCTX_FAKE_HANDLE

#define ACTCTX_FAKE_HANDLE   ((HANDLE) 0xf00baa)

Definition at line 43 of file actctx.c.

◆ ACTCTX_FLAGS_ALL

#define ACTCTX_FLAGS_ALL
Value:
(\
ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID |\
ACTCTX_FLAG_LANGID_VALID |\
ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID |\
ACTCTX_FLAG_RESOURCE_NAME_VALID |\
ACTCTX_FLAG_SET_PROCESS_DEFAULT |\
ACTCTX_FLAG_APPLICATION_NAME_VALID |\
ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF |\
ACTCTX_FLAG_HMODULE_VALID )

Definition at line 28 of file actctx.c.

◆ ACTCTX_MAGIC_MARKER

#define ACTCTX_MAGIC_MARKER   (PVOID)'gMcA'

Definition at line 41 of file actctx.c.

◆ FIND_ACTCTX_RETURN_ASSEMBLY_METADATA

#define FIND_ACTCTX_RETURN_ASSEMBLY_METADATA   0x00000004

Definition at line 5678 of file actctx.c.

◆ FIND_ACTCTX_RETURN_FLAGS

#define FIND_ACTCTX_RETURN_FLAGS   0x00000002

Definition at line 5677 of file actctx.c.

◆ FIND_ACTCTX_VALID_MASK

#define FIND_ACTCTX_VALID_MASK   (FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX | FIND_ACTCTX_RETURN_FLAGS | FIND_ACTCTX_RETURN_ASSEMBLY_METADATA)

Definition at line 5679 of file actctx.c.

◆ GUIDSECTION_MAGIC

#define GUIDSECTION_MAGIC   0x64487347 /* dHsG */

Definition at line 39 of file actctx.c.

◆ MAX_NAMESPACES

#define MAX_NAMESPACES   64

Definition at line 46 of file actctx.c.

◆ NDEBUG

#define NDEBUG

Definition at line 21 of file actctx.c.

◆ STRSECTION_MAGIC

#define STRSECTION_MAGIC   0x64487353 /* dHsS */

Definition at line 38 of file actctx.c.

Typedef Documentation

◆ ACTIVATION_CONTEXT

◆ ACTIVATION_CONTEXT_WRAPPED

◆ ASSEMBLY_STORAGE_MAP

◆ ASSEMBLY_STORAGE_MAP_ENTRY

◆ PACTIVATION_CONTEXT_WRAPPED

◆ PASSEMBLY_STORAGE_MAP

◆ PASSEMBLY_STORAGE_MAP_ENTRY

◆ PIACTIVATION_CONTEXT

Enumeration Type Documentation

◆ assembly_type

Enumerator
APPLICATION_MANIFEST 
ASSEMBLY_MANIFEST 
ASSEMBLY_SHARED_MANIFEST 

Definition at line 458 of file actctx.c.

◆ comclass_miscfields

Enumerator
MiscStatus 
MiscStatusIcon 
MiscStatusContent 
MiscStatusThumbnail 
MiscStatusDocPrint 
MiscStatus 
MiscStatusIcon 
MiscStatusContent 
MiscStatusThumbnail 
MiscStatusDocPrint 
MiscStatus 
MiscStatusIcon 
MiscStatusContent 
MiscStatusThumbnail 
MiscStatusDocPrint 

Definition at line 184 of file actctx.c.

◆ comclass_threadingmodel

Enumerator
ThreadingModel_Apartment 
ThreadingModel_Free 
ThreadingModel_No 
ThreadingModel_Both 
ThreadingModel_Neutral 
ThreadingModel_Apartment 
ThreadingModel_Free 
ThreadingModel_No 
ThreadingModel_Both 
ThreadingModel_Neutral 
ThreadingModel_Apartment 
ThreadingModel_Free 
ThreadingModel_No 
ThreadingModel_Both 
ThreadingModel_Neutral 

Definition at line 175 of file actctx.c.

◆ context_sections

Enumerator
WINDOWCLASS_SECTION 
DLLREDIRECT_SECTION 
TLIBREDIRECT_SECTION 
SERVERREDIRECT_SECTION 
IFACEREDIRECT_SECTION 
CLRSURROGATES_SECTION 
PROGIDREDIRECT_SECTION 

Definition at line 482 of file actctx.c.

◆ ifaceps_mask

Enumerator
NumMethods 
BaseIface 
NumMethods 
BaseIface 

Definition at line 217 of file actctx.c.

218 {
219  NumMethods = 1,
220  BaseIface = 2
221 };

Function Documentation

◆ actctx_addref()

static void actctx_addref ( ACTIVATION_CONTEXT actctx)
inlinestatic

Definition at line 1180 of file actctx.c.

1181 {
1182  InterlockedExchangeAdd( &actctx->RefCount, 1 );
1183 }
#define actctx
Definition: kernel32.h:8
#define InterlockedExchangeAdd
Definition: interlocked.h:181

Referenced by find_guid(), find_string(), and RtlAddRefActivationContext().

◆ actctx_init()

void actctx_init ( PVOID pOldShimData)

Definition at line 4973 of file actctx.c.

4974 {
4975  ACTCTXW ctx;
4976  HANDLE handle;
4977  WCHAR buffer[1024];
4978  NTSTATUS Status;
4979 
4980  ctx.cbSize = sizeof(ctx);
4981  ctx.lpSource = NULL;
4982  ctx.dwFlags = ACTCTX_FLAG_RESOURCE_NAME_VALID | ACTCTX_FLAG_HMODULE_VALID;
4983  ctx.hModule = NtCurrentTeb()->ProcessEnvironmentBlock->ImageBaseAddress;
4985 
4987  {
4989  }
4990 
4991  /* ReactOS specific:
4992  Now that we have found the process_actctx we can initialize the process compat subsystem */
4994 
4995 
4996  ctx.dwFlags = 0;
4997  ctx.hModule = NULL;
4998  ctx.lpResourceName = NULL;
4999  ctx.lpSource = buffer;
5001 
5003  {
5004  RtlStringCchCatW(buffer, RTL_NUMBER_OF(buffer), L"\\winsxs\\manifests\\forwardcompatible.manifest");
5005  }
5006  else
5007  {
5008  RtlStringCchCatW(buffer, RTL_NUMBER_OF(buffer), L"\\winsxs\\manifests\\systemcompatible.manifest");
5009  }
5010 
5012  if (NT_SUCCESS(Status))
5013  {
5015  }
5016  else
5017  {
5018  DPRINT1("Failed to create the implicit act ctx. Status: 0x%x!!!\n", Status);
5019  }
5020 }
NTSTATUS NTAPI RtlCreateActivationContext(IN ULONG Flags, IN PACTIVATION_CONTEXT_DATA ActivationContextData, IN ULONG ExtraBytes, IN PVOID NotificationRoutine, IN PVOID NotificationContext, OUT PACTIVATION_CONTEXT *ActCtx)
Definition: actctx.c:5031
VOID NTAPI LdrpInitializeProcessCompat(PVOID pProcessActctx, PVOID *pOldShimData)
Definition: ldrinit.c:1576
LONG NTSTATUS
Definition: precomp.h:26
GLuint buffer
Definition: glext.h:5915
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
Definition: sock.c:82
static ACTIVATION_CONTEXT * check_actctx(HANDLE h)
Definition: actctx.c:1158
static DWORD RosGetProcessCompatVersion(VOID)
Definition: compat_undoc.h:22
Status
Definition: gdiplustypes.h:24
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
NTSTRSAFEAPI RtlStringCchCatW(_Inout_updates_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _In_ NTSTRSAFE_PCWSTR pszSrc)
Definition: ntstrsafe.h:601
#define SharedUserData
static const WCHAR L[]
Definition: oid.c:1250
static ACTIVATION_CONTEXT * process_actctx
Definition: actctx.c:765
NTSTRSAFEAPI RtlStringCchCopyW(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _In_ NTSTRSAFE_PCWSTR pszSrc)
Definition: ntstrsafe.h:127
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
#define NULL
Definition: types.h:112
#define DPRINT1
Definition: precomp.h:8
static const GUID LPCWSTR
Definition: actctx.c:37
#define CREATEPROCESS_MANIFEST_RESOURCE_ID
Definition: winuser.h:621
static ACTIVATION_CONTEXT * implicit_actctx
Definition: actctx.c:766

Referenced by LdrpInitializeProcess().

◆ actctx_release()

static void actctx_release ( ACTIVATION_CONTEXT actctx)
static

Definition at line 1185 of file actctx.c.

1186 {
1188 
1189  if (InterlockedExchangeAdd(&actctx->RefCount, -1) == 1)
1190  {
1191  unsigned int i, j;
1192 
1193  for (i = 0; i < actctx->num_assemblies; i++)
1194  {
1195  struct assembly *assembly = &actctx->assemblies[i];
1196  for (j = 0; j < assembly->num_dlls; j++)
1197  {
1198  struct dll_redirect *dll = &assembly->dlls[j];
1199  free_entity_array( &dll->entities );
1200  RtlFreeHeap( RtlGetProcessHeap(), 0, dll->name );
1201  RtlFreeHeap( RtlGetProcessHeap(), 0, dll->hash );
1202  }
1203  RtlFreeHeap( RtlGetProcessHeap(), 0, assembly->dlls );
1204  RtlFreeHeap( RtlGetProcessHeap(), 0, assembly->manifest.info );
1205  RtlFreeHeap( RtlGetProcessHeap(), 0, assembly->directory );
1206  RtlFreeHeap( RtlGetProcessHeap(), 0, assembly->compat_contexts );
1209  }
1210  RtlFreeHeap( RtlGetProcessHeap(), 0, actctx->config.info );
1211  RtlFreeHeap( RtlGetProcessHeap(), 0, actctx->appdir.info );
1212  RtlFreeHeap( RtlGetProcessHeap(), 0, actctx->assemblies );
1213  RtlFreeHeap( RtlGetProcessHeap(), 0, actctx->dllredirect_section );
1214  RtlFreeHeap( RtlGetProcessHeap(), 0, actctx->wndclass_section );
1215  RtlFreeHeap( RtlGetProcessHeap(), 0, actctx->tlib_section );
1216  RtlFreeHeap( RtlGetProcessHeap(), 0, actctx->comserver_section );
1217  RtlFreeHeap( RtlGetProcessHeap(), 0, actctx->ifaceps_section );
1218  RtlFreeHeap( RtlGetProcessHeap(), 0, actctx->clrsurrogate_section );
1219  RtlFreeHeap( RtlGetProcessHeap(), 0, actctx->progid_section );
1220 
1221  pActual = CONTAINING_RECORD(actctx, ACTIVATION_CONTEXT_WRAPPED, ActivationContext);
1222  pActual->MagicMarker = 0;
1223  RtlFreeHeap(RtlGetProcessHeap(), 0, pActual);
1224  }
1225 }
static void free_entity_array(struct entity_array *array)
Definition: actctx.c:952
struct file_info manifest
Definition: actctx.c:469
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:606
static HMODULE dll
Definition: str.c:188
WCHAR * directory
Definition: actctx.c:470
#define actctx
Definition: kernel32.h:8
COMPATIBILITY_CONTEXT_ELEMENT * compat_contexts
Definition: actctx.c:476
#define InterlockedExchangeAdd
Definition: interlocked.h:181
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
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 GLint GLint j
Definition: glfuncs.h:250
static void free_assembly_identity(struct assembly_identity *ai)
Definition: actctx.c:915
unsigned int num_dlls
Definition: actctx.c:473
struct dll_redirect * dlls
Definition: actctx.c:472
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
struct entity_array entities
Definition: actctx.c:475
struct assembly_identity id
Definition: actctx.c:468

Referenced by RtlCreateActivationContext(), and RtlReleaseActivationContext().

◆ add_assembly()

static struct assembly* add_assembly ( ACTIVATION_CONTEXT actctx,
enum assembly_type  at 
)
static

Definition at line 839 of file actctx.c.

840 {
841  struct assembly *assembly;
842 
843  DPRINT("add_assembly() actctx %p, activeframe ??\n", actctx);
844 
845  if (actctx->num_assemblies == actctx->allocated_assemblies)
846  {
847  void *ptr;
848  unsigned int new_count;
849  if (actctx->assemblies)
850  {
851  new_count = actctx->allocated_assemblies * 2;
852  ptr = RtlReAllocateHeap( RtlGetProcessHeap(), HEAP_ZERO_MEMORY,
853  actctx->assemblies, new_count * sizeof(*assembly) );
854  }
855  else
856  {
857  new_count = 4;
858  ptr = RtlAllocateHeap( RtlGetProcessHeap(), HEAP_ZERO_MEMORY, new_count * sizeof(*assembly) );
859  }
860  if (!ptr) return NULL;
861  actctx->assemblies = ptr;
862  actctx->allocated_assemblies = new_count;
863  }
864 
865  assembly = &actctx->assemblies[actctx->num_assemblies++];
866  assembly->type = at;
867  return assembly;
868 }
static struct _tagASSEMBLY assembly
static PVOID ptr
Definition: dispmode.c:27
#define actctx
Definition: kernel32.h:8
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
BSTR type
Definition: cache.c:326
#define NULL
Definition: types.h:112
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE, ULONG, PVOID, SIZE_T)
Definition: heap.c:2667
#define DPRINT
Definition: sndvol32.h:71

Referenced by parse_manifest().

◆ add_compat_context()

static PCOMPATIBILITY_CONTEXT_ELEMENT add_compat_context ( struct assembly assembly)
static

Definition at line 896 of file actctx.c.

897 {
898  void *ptr;
900  {
901  unsigned int new_count = assembly->num_compat_contexts + 1;
902  ptr = RtlReAllocateHeap( RtlGetProcessHeap(), HEAP_ZERO_MEMORY,
904  new_count * sizeof(COMPATIBILITY_CONTEXT_ELEMENT) );
905  }
906  else
907  {
908  ptr = RtlAllocateHeap( RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(COMPATIBILITY_CONTEXT_ELEMENT) );
909  }
910  if (!ptr) return NULL;
913 }
static PVOID ptr
Definition: dispmode.c:27
COMPATIBILITY_CONTEXT_ELEMENT * compat_contexts
Definition: actctx.c:476
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
#define NULL
Definition: types.h:112
ULONG num_compat_contexts
Definition: actctx.c:477
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE, ULONG, PVOID, SIZE_T)
Definition: heap.c:2667

Referenced by parse_supportedos_elem().

◆ add_comserver_record()

static void add_comserver_record ( const struct guidsection_header section,
const struct entity_array entities,
const struct dll_redirect dll,
struct guid_index **  index,
ULONG data_offset,
ULONG module_offset,
ULONG seed,
ULONG  rosterindex 
)
static

Definition at line 4074 of file actctx.c.

4077 {
4078  unsigned int i;
4079 
4080  for (i = 0; i < entities->num; i++)
4081  {
4082  struct entity *entity = &entities->base[i];
4083  if (entity->kind == ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION)
4084  {
4085  ULONG module_len, progid_len, str_len = 0;
4086  struct comclassredirect_data *data;
4087  struct guid_index *alias_index;
4088  struct clrclass_data *clrdata;
4090  WCHAR *ptrW;
4091 
4092  if (entity->u.comclass.progid)
4093  progid_len = strlenW(entity->u.comclass.progid)*sizeof(WCHAR);
4094  else
4095  progid_len = 0;
4096 
4097  module_len = dll ? strlenW(dll->name)*sizeof(WCHAR) : strlenW(mscoreeW)*sizeof(WCHAR);
4098 
4099  /* setup new index entry */
4101  RtlGUIDFromString(&str, &(*index)->guid);
4102 
4103  (*index)->data_offset = *data_offset;
4104  (*index)->data_len = sizeof(*data); /* additional length added later */
4105  (*index)->rosterindex = rosterindex;
4106 
4107  /* Setup new index entry for alias guid. Alias index records are placed after
4108  normal records, so normal guids are hit first on search. Note that class count
4109  is doubled. */
4110  alias_index = (*index) + section->count/2;
4111  generate_uuid(seed, &alias_index->guid);
4112  alias_index->data_offset = (*index)->data_offset;
4113  alias_index->data_len = 0;
4114  alias_index->rosterindex = (*index)->rosterindex;
4115 
4116  /* setup data */
4117  data = (struct comclassredirect_data*)((BYTE*)section + (*index)->data_offset);
4118  data->size = sizeof(*data);
4119  data->res = 0;
4120  data->res1[0] = 0;
4121  data->res1[1] = 0;
4122  data->model = entity->u.comclass.model;
4123  data->clsid = (*index)->guid;
4124  data->alias = alias_index->guid;
4125  data->clsid2 = data->clsid;
4126  if (entity->u.comclass.tlbid)
4127  {
4129  RtlGUIDFromString(&str, &data->tlbid);
4130  }
4131  else
4132  memset(&data->tlbid, 0, sizeof(data->tlbid));
4133  data->name_len = module_len;
4134  data->name_offset = *module_offset;
4135  data->progid_len = progid_len;
4136  data->progid_offset = data->progid_len ? data->size : 0; /* in case of clrClass additional offset is added later */
4137  data->clrdata_len = 0; /* will be set later */
4138  data->clrdata_offset = entity->u.comclass.name ? sizeof(*data) : 0;
4139  data->miscstatus = entity->u.comclass.miscstatus;
4140  data->miscstatuscontent = entity->u.comclass.miscstatuscontent;
4141  data->miscstatusthumbnail = entity->u.comclass.miscstatusthumbnail;
4142  data->miscstatusicon = entity->u.comclass.miscstatusicon;
4143  data->miscstatusdocprint = entity->u.comclass.miscstatusdocprint;
4144 
4145  /* mask describes which misc* data is available */
4146  data->miscmask = 0;
4147  if (data->miscstatus)
4148  data->miscmask |= MiscStatus;
4149  if (data->miscstatuscontent)
4150  data->miscmask |= MiscStatusContent;
4151  if (data->miscstatusthumbnail)
4152  data->miscmask |= MiscStatusThumbnail;
4153  if (data->miscstatusicon)
4154  data->miscmask |= MiscStatusIcon;
4155  if (data->miscstatusdocprint)
4156  data->miscmask |= MiscStatusDocPrint;
4157 
4158  if (data->clrdata_offset)
4159  {
4160  clrdata = (struct clrclass_data*)((BYTE*)data + data->clrdata_offset);
4161 
4162  clrdata->size = sizeof(*clrdata);
4163  clrdata->res[0] = 0;
4164  clrdata->res[1] = 2; /* FIXME: unknown field */
4165  clrdata->module_len = strlenW(mscoreeW)*sizeof(WCHAR);
4166  clrdata->module_offset = *module_offset + data->name_len + sizeof(WCHAR);
4167  clrdata->name_len = strlenW(entity->u.comclass.name)*sizeof(WCHAR);
4168  clrdata->name_offset = clrdata->size;
4169  clrdata->version_len = entity->u.comclass.version ? strlenW(entity->u.comclass.version)*sizeof(WCHAR) : 0;
4170  clrdata->version_offset = clrdata->version_len ? clrdata->name_offset + clrdata->name_len + sizeof(WCHAR) : 0;
4171  clrdata->res2[0] = 0;
4172  clrdata->res2[1] = 0;
4173 
4174  data->clrdata_len = clrdata->size + clrdata->name_len + sizeof(WCHAR);
4175 
4176  /* module name */
4177  ptrW = (WCHAR*)((BYTE*)section + clrdata->module_offset);
4178  memcpy(ptrW, mscoree2W, clrdata->module_len);
4179  ptrW[clrdata->module_len/sizeof(WCHAR)] = 0;
4180 
4181  ptrW = (WCHAR*)((BYTE*)section + data->name_offset);
4182  memcpy(ptrW, mscoreeW, data->name_len);
4183  ptrW[data->name_len/sizeof(WCHAR)] = 0;
4184 
4185  /* class name */
4186  ptrW = (WCHAR*)((BYTE*)clrdata + clrdata->name_offset);
4187  memcpy(ptrW, entity->u.comclass.name, clrdata->name_len);
4188  ptrW[clrdata->name_len/sizeof(WCHAR)] = 0;
4189 
4190  /* runtime version, optional */
4191  if (clrdata->version_len)
4192  {
4193  data->clrdata_len += clrdata->version_len + sizeof(WCHAR);
4194 
4195  ptrW = (WCHAR*)((BYTE*)clrdata + clrdata->version_offset);
4196  memcpy(ptrW, entity->u.comclass.version, clrdata->version_len);
4197  ptrW[clrdata->version_len/sizeof(WCHAR)] = 0;
4198  }
4199 
4200  if (data->progid_len)
4201  data->progid_offset += data->clrdata_len;
4202  (*index)->data_len += sizeof(*clrdata);
4203  }
4204  else
4205  {
4206  clrdata = NULL;
4207 
4208  /* module name */
4209  ptrW = (WCHAR*)((BYTE*)section + data->name_offset);
4210  memcpy(ptrW, dll->name, data->name_len);
4211  ptrW[data->name_len/sizeof(WCHAR)] = 0;
4212  }
4213 
4214  /* progid string */
4215  if (data->progid_len)
4216  {
4217  ptrW = (WCHAR*)((BYTE*)data + data->progid_offset);
4218  memcpy(ptrW, entity->u.comclass.progid, data->progid_len);
4219  ptrW[data->progid_len/sizeof(WCHAR)] = 0;
4220  }
4221 
4222  /* string block length */
4223  str_len = 0;
4224  if (clrdata)
4225  {
4226  str_len += clrdata->name_len + sizeof(WCHAR);
4227  if (clrdata->version_len)
4228  str_len += clrdata->version_len + sizeof(WCHAR);
4229  }
4230  if (progid_len)
4231  str_len += progid_len + sizeof(WCHAR);
4232 
4233  (*index)->data_len += aligned_string_len(str_len);
4234  alias_index->data_len = (*index)->data_len;
4235 
4236  /* move to next data record */
4237  (*data_offset) += sizeof(*data) + aligned_string_len(str_len);
4238  (*module_offset) += module_len + sizeof(WCHAR);
4239 
4240  if (clrdata)
4241  {
4242  (*data_offset) += sizeof(*clrdata);
4243  (*module_offset) += clrdata->module_len + sizeof(WCHAR);
4244  }
4245  (*index) += 1;
4246  }
4247  }
4248 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
DWORD res2[2]
Definition: sxs.c:98
static const Entity entities[NUM_ENTITIES]
Definition: tinyxml2.cpp:129
#define str_len
Definition: treelist.c:89
Definition: parser.c:55
static const WCHAR mscoree2W[]
Definition: actctx.c:672
ULONG data_offset
Definition: actctx.c:1084
static HMODULE dll
Definition: str.c:188
Definition: actctx.c:387
ULONG version_len
Definition: sxs.c:96
const WCHAR * str
ULONG version_offset
Definition: sxs.c:97
ULONG rosterindex
Definition: actctx.c:1086
ULONG name_offset
Definition: sxs.c:95
ULONG name_len
Definition: sxs.c:94
ULONG size
Definition: sxs.c:90
__wchar_t WCHAR
Definition: xmlstorage.h:180
static int aligned_string_len(int len)
Definition: actctx.c:1958
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING, GUID *)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
unsigned char BYTE
Definition: xxhash.c:193
union entity::@4758 u
ULONG data_len
Definition: actctx.c:1085
struct entity::@4758::@4760 comclass
GUID guid
Definition: actctx.c:1083
ULONG module_offset
Definition: sxs.c:93
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
#define NULL
Definition: types.h:112
static const WCHAR mscoreeW[]
Definition: actctx.c:671
ULONG module_len
Definition: sxs.c:92
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define memset(x, y, z)
Definition: compat.h:39
DWORD res[2]
Definition: sxs.c:91
static void generate_uuid(ULONG *seed, GUID *guid)
Definition: actctx.c:4011
DWORD kind
Definition: actctx.c:389

Referenced by build_comserver_section().

◆ add_dependent_assembly_id()

static BOOL add_dependent_assembly_id ( struct actctx_loader acl,
struct assembly_identity ai 
)
static

Definition at line 1022 of file actctx.c.

1024 {
1025  unsigned int i;
1026 
1027  /* check if we already have that assembly */
1028 
1029  for (i = 0; i < acl->actctx->num_assemblies; i++)
1030  if (is_matching_identity( ai, &acl->actctx->assemblies[i].id ))
1031  {
1032  DPRINT( "reusing existing assembly for %S arch %S version %u.%u.%u.%u\n",
1033  ai->name, ai->arch, ai->version.major, ai->version.minor,
1034  ai->version.build, ai->version.revision );
1035  return TRUE;
1036  }
1037 
1038  for (i = 0; i < acl->num_dependencies; i++)
1039  if (is_matching_identity( ai, &acl->dependencies[i] ))
1040  {
1041  DPRINT( "reusing existing dependency for %S arch %S version %u.%u.%u.%u\n",
1042  ai->name, ai->arch, ai->version.major, ai->version.minor,
1043  ai->version.build, ai->version.revision );
1044  return TRUE;
1045  }
1046 
1047  if (acl->num_dependencies == acl->allocated_dependencies)
1048  {
1049  void *ptr;
1050  unsigned int new_count;
1051  if (acl->dependencies)
1052  {
1053  new_count = acl->allocated_dependencies * 2;
1054  ptr = RtlReAllocateHeap(RtlGetProcessHeap(), 0, acl->dependencies,
1055  new_count * sizeof(acl->dependencies[0]));
1056  }
1057  else
1058  {
1059  new_count = 4;
1060  ptr = RtlAllocateHeap(RtlGetProcessHeap(), 0, new_count * sizeof(acl->dependencies[0]));
1061  }
1062  if (!ptr) return FALSE;
1063  acl->dependencies = ptr;
1064  acl->allocated_dependencies = new_count;
1065  }
1066  acl->dependencies[acl->num_dependencies++] = *ai;
1067 
1068  return TRUE;
1069 }
unsigned int allocated_dependencies
Definition: actctx.c:542
struct assembly_identity * dependencies
Definition: actctx.c:540
WCHAR * arch
Definition: actctx.c:93
#define TRUE
Definition: types.h:120
struct assembly_version version
Definition: actctx.c:97
#define FALSE
Definition: types.h:117
static PVOID ptr
Definition: dispmode.c:27
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
unsigned int num_assemblies
Definition: actctx.c:524
ACTIVATION_CONTEXT * actctx
Definition: actctx.c:539
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
struct assembly * assemblies
Definition: actctx.c:523
WCHAR * name
Definition: actctx.c:92
unsigned int num_dependencies
Definition: actctx.c:541
NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE, ULONG, PVOID, SIZE_T)
Definition: heap.c:2667
#define DPRINT
Definition: sndvol32.h:71
static BOOL is_matching_identity(const struct assembly_identity *id1, const struct assembly_identity *id2)
Definition: actctx.c:1002

Referenced by parse_dependent_assembly_elem().

◆ add_dll_redirect()

static struct dll_redirect* add_dll_redirect ( struct assembly assembly)
static

Definition at line 870 of file actctx.c.

871 {
872  DPRINT("add_dll_redirect() to assembly %p, num_dlls %d\n", assembly, assembly->allocated_dlls);
873 
875  {
876  void *ptr;
877  unsigned int new_count;
878  if (assembly->dlls)
879  {
880  new_count = assembly->allocated_dlls * 2;
881  ptr = RtlReAllocateHeap( RtlGetProcessHeap(), HEAP_ZERO_MEMORY,
882  assembly->dlls, new_count * sizeof(*assembly->dlls) );
883  }
884  else
885  {
886  new_count = 4;
887  ptr = RtlAllocateHeap( RtlGetProcessHeap(), HEAP_ZERO_MEMORY, new_count * sizeof(*assembly->dlls) );
888  }
889  if (!ptr) return NULL;
890  assembly->dlls = ptr;
891  assembly->allocated_dlls = new_count;
892  }
893  return &assembly->dlls[assembly->num_dlls++];
894 }
static PVOID ptr
Definition: dispmode.c:27
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
unsigned int num_dlls
Definition: actctx.c:473
struct dll_redirect * dlls
Definition: actctx.c:472
#define NULL
Definition: types.h:112
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE, ULONG, PVOID, SIZE_T)
Definition: heap.c:2667
#define DPRINT
Definition: sndvol32.h:71
unsigned int allocated_dlls
Definition: actctx.c:474

Referenced by parse_file_elem().

◆ add_entity()

static struct entity* add_entity ( struct entity_array array,
DWORD  kind 
)
static

Definition at line 924 of file actctx.c.

925 {
926  struct entity* entity;
927 
928  if (array->num == array->allocated)
929  {
930  void *ptr;
931  unsigned int new_count;
932  if (array->base)
933  {
934  new_count = array->allocated * 2;
935  ptr = RtlReAllocateHeap( RtlGetProcessHeap(), HEAP_ZERO_MEMORY,
936  array->base, new_count * sizeof(*array->base) );
937  }
938  else
939  {
940  new_count = 4;
941  ptr = RtlAllocateHeap( RtlGetProcessHeap(), HEAP_ZERO_MEMORY, new_count * sizeof(*array->base) );
942  }
943  if (!ptr) return NULL;
944  array->base = ptr;
945  array->allocated = new_count;
946  }
947  entity = &array->base[array->num++];
948  entity->kind = kind;
949  return entity;
950 }
Definition: actctx.c:387
static PVOID ptr
Definition: dispmode.c:27
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
unsigned num
Definition: undname.c:57
#define NULL
Definition: types.h:112
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE, ULONG, PVOID, SIZE_T)
Definition: heap.c:2667
DWORD kind
Definition: actctx.c:389

Referenced by parse_add_interface_class(), parse_clr_class_elem(), parse_clr_surrogate_elem(), parse_com_class_elem(), parse_com_interface_external_proxy_stub_elem(), parse_cominterface_proxy_stub_elem(), parse_settings_elem(), parse_typelib_elem(), and parse_window_class_elem().

◆ add_ifaceps_record()

static void add_ifaceps_record ( struct guidsection_header section,
struct entity_array entities,
struct guid_index **  index,
ULONG data_offset,
ULONG  rosterindex 
)
static

Definition at line 4364 of file actctx.c.

4366 {
4367  unsigned int i;
4368 
4369  for (i = 0; i < entities->num; i++)
4370  {
4371  struct entity *entity = &entities->base[i];
4372  if (entity->kind == ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION)
4373  {
4374  struct ifacepsredirect_data *data = (struct ifacepsredirect_data*)((BYTE*)section + *data_offset);
4376  ULONG name_len;
4377 
4378  if (entity->u.ifaceps.name)
4379  name_len = strlenW(entity->u.ifaceps.name)*sizeof(WCHAR);
4380  else
4381  name_len = 0;
4382 
4383  /* setup index */
4385  RtlGUIDFromString(&str, &(*index)->guid);
4386  (*index)->data_offset = *data_offset;
4387  (*index)->data_len = sizeof(*data) + name_len ? aligned_string_len(name_len + sizeof(WCHAR)) : 0;
4388  (*index)->rosterindex = rosterindex;
4389 
4390  /* setup data record */
4391  data->size = sizeof(*data);
4392  data->mask = entity->u.ifaceps.mask;
4393 
4394  /* proxyStubClsid32 value is only stored for external PS,
4395  if set it's used as iid, otherwise 'iid' attribute value is used */
4396  if (entity->u.ifaceps.ps32)
4397  {
4399  RtlGUIDFromString(&str, &data->iid);
4400  }
4401  else
4402  data->iid = (*index)->guid;
4403 
4404  data->nummethods = entity->u.ifaceps.nummethods;
4405 
4406  if (entity->u.ifaceps.tlib)
4407  {
4409  RtlGUIDFromString(&str, &data->tlbid);
4410  }
4411  else
4412  memset(&data->tlbid, 0, sizeof(data->tlbid));
4413 
4414  if (entity->u.ifaceps.base)
4415  {
4417  RtlGUIDFromString(&str, &data->base);
4418  }
4419  else
4420  memset(&data->base, 0, sizeof(data->base));
4421 
4422  data->name_len = name_len;
4423  data->name_offset = data->name_len ? sizeof(*data) : 0;
4424 
4425  /* name string */
4426  if (data->name_len)
4427  {
4428  WCHAR *ptrW = (WCHAR*)((BYTE*)data + data->name_offset);
4429  memcpy(ptrW, entity->u.ifaceps.name, data->name_len);
4430  ptrW[data->name_len/sizeof(WCHAR)] = 0;
4431  }
4432 
4433  /* move to next record */
4434  (*index) += 1;
4435  *data_offset += sizeof(*data);
4436  if (data->name_len)
4437  *data_offset += aligned_string_len(data->name_len + sizeof(WCHAR));
4438  }
4439  }
4440 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
static const Entity entities[NUM_ENTITIES]
Definition: tinyxml2.cpp:129
Definition: parser.c:55
Definition: actctx.c:387
const WCHAR * str
__wchar_t WCHAR
Definition: xmlstorage.h:180
static int aligned_string_len(int len)
Definition: actctx.c:1958
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING, GUID *)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
unsigned char BYTE
Definition: xxhash.c:193
union entity::@4758 u
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
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
struct entity::@4758::@4761 ifaceps
#define memset(x, y, z)
Definition: compat.h:39
DWORD kind
Definition: actctx.c:389

Referenced by build_ifaceps_section().

◆ add_progid_record()

static void add_progid_record ( ACTIVATION_CONTEXT actctx,
struct strsection_header section,
const struct entity_array entities,
struct string_index **  index,
ULONG data_offset,
ULONG global_offset,
ULONG  rosterindex 
)
static

Definition at line 4755 of file actctx.c.

4757 {
4758  unsigned int i, j;
4759 
4760  for (i = 0; i < entities->num; i++)
4761  {
4762  struct entity *entity = &entities->base[i];
4763  if (entity->kind == ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION)
4764  {
4765  const struct progids *progids = &entity->u.comclass.progids;
4766  struct comclassredirect_data *comclass;
4767  struct guid_index *guid_index;
4769  GUID clsid;
4770 
4773 
4774  guid_index = find_guid_index(actctx->comserver_section, &clsid);
4775  comclass = get_comclass_data(actctx, guid_index);
4776 
4777  if (entity->u.comclass.progid)
4778  write_progid_record(section, entity->u.comclass.progid, &comclass->alias,
4779  index, data_offset, global_offset, rosterindex);
4780 
4781  for (j = 0; j < progids->num; j++)
4783  index, data_offset, global_offset, rosterindex);
4784  }
4785  }
4786 }
static const Entity entities[NUM_ENTITIES]
Definition: tinyxml2.cpp:129
static struct guid_index * find_guid_index(const struct guidsection_header *section, const GUID *guid)
Definition: actctx.c:3560
Definition: parser.c:55
static void write_progid_record(struct strsection_header *section, const WCHAR *progid, const GUID *alias, struct string_index **index, ULONG *data_offset, ULONG *global_offset, ULONG rosterindex)
Definition: actctx.c:4712
unsigned int num
Definition: actctx.c:383
ULONG data_offset
Definition: actctx.c:1084
Definition: actctx.c:387
const WCHAR * str
#define actctx
Definition: kernel32.h:8
GLuint index
Definition: glext.h:6031
ULONG rosterindex
Definition: actctx.c:1086
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 GLint GLint j
Definition: glfuncs.h:250
REFCLSID clsid
Definition: msctf.c:82
NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING, GUID *)
union entity::@4758 u
WCHAR ** progids
Definition: actctx.c:382
struct entity::@4758::@4760 comclass
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
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
static struct comclassredirect_data * get_comclass_data(ACTIVATION_CONTEXT *actctx, struct guid_index *index)
Definition: actctx.c:4302
DWORD kind
Definition: actctx.c:389

Referenced by build_progid_section().

◆ aligned_string_len()

static int aligned_string_len ( int  len)
inlinestatic

◆ append_string()

static void append_string ( WCHAR buffer,
const WCHAR prefix,
const WCHAR str 
)
inlinestatic

Definition at line 1110 of file actctx.c.

1111 {
1112  WCHAR *p = buffer;
1113 
1114  if (!str) return;
1115  strcatW( buffer, prefix );
1116  p += strlenW(p);
1117  *p++ = '"';
1118  strcpyW( p, str );
1119  p += strlenW(p);
1120  *p++ = '"';
1121  *p = 0;
1122 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
GLuint buffer
Definition: glext.h:5915
const WCHAR * str
__wchar_t WCHAR
Definition: xmlstorage.h:180
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
WINE_UNICODE_INLINE WCHAR * strcatW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:242
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by build_assembly_id().

◆ build_assembly_dir()

static WCHAR* build_assembly_dir ( struct assembly_identity ai)
static

Definition at line 1079 of file actctx.c.

1080 {
1081  static const WCHAR undW[] = {'_',0};
1082  static const WCHAR noneW[] = {'n','o','n','e',0};
1083  static const WCHAR mskeyW[] = {'d','e','a','d','b','e','e','f',0};
1084 
1085  const WCHAR *arch = ai->arch ? ai->arch : noneW;
1086  const WCHAR *key = ai->public_key ? ai->public_key : noneW;
1087  const WCHAR *lang = ai->language ? ai->language : noneW;
1088  const WCHAR *name = ai->name ? ai->name : noneW;
1089  SIZE_T size = (strlenW(arch) + 1 + strlenW(name) + 1 + strlenW(key) + 24 + 1 +
1090  strlenW(lang) + 1) * sizeof(WCHAR) + sizeof(mskeyW);
1091  WCHAR *ret;
1092 
1093  if (!(ret = RtlAllocateHeap( RtlGetProcessHeap(), 0, size ))) return NULL;
1094 
1095  strcpyW( ret, arch );
1096  strcatW( ret, undW );
1097  strcatW( ret, name );
1098  strcatW( ret, undW );
1099  strcatW( ret, key );
1100  strcatW( ret, undW );
1102  ai->version.major, ai->version.minor, ai->version.build, ai->version.revision );
1103  strcatW( ret, undW );
1104  strcatW( ret, lang );
1105  strcatW( ret, undW );
1106  strcatW( ret, mskeyW );
1107  return ret;
1108 }
static const WCHAR version_formatW[]
Definition: actctx.c:761
WCHAR * arch
Definition: actctx.c:93
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
struct assembly_version version
Definition: actctx.c:97
WCHAR * public_key
Definition: actctx.c:94
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
static const WCHAR lang[]
Definition: wbemdisp.c:287
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret
ULONG_PTR SIZE_T
Definition: typedefs.h:80
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define sprintfW
Definition: unicode.h:58
WCHAR * name
Definition: actctx.c:92
WINE_UNICODE_INLINE WCHAR * strcatW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:242
#define NULL
Definition: types.h:112
Definition: name.c:38
WCHAR * language
Definition: actctx.c:95
Definition: path.c:41

Referenced by lookup_assembly().

◆ build_assembly_id()

static WCHAR* build_assembly_id ( const struct assembly_identity ai)
static

Definition at line 1124 of file actctx.c.

1125 {
1126  static const WCHAR archW[] =
1127  {',','p','r','o','c','e','s','s','o','r','A','r','c','h','i','t','e','c','t','u','r','e','=',0};
1128  static const WCHAR public_keyW[] =
1129  {',','p','u','b','l','i','c','K','e','y','T','o','k','e','n','=',0};
1130  static const WCHAR typeW2[] =
1131  {',','t','y','p','e','=',0};
1132  static const WCHAR versionW2[] =
1133  {',','v','e','r','s','i','o','n','=',0};
1134 
1135  WCHAR version[64], *ret;
1136  SIZE_T size = 0;
1137 
1139  ai->version.major, ai->version.minor, ai->version.build, ai->version.revision );
1140  if (ai->name) size += strlenW(ai->name) * sizeof(WCHAR);
1141  if (ai->arch) size += strlenW(archW) + strlenW(ai->arch) + 2;
1142  if (ai->public_key) size += strlenW(public_keyW) + strlenW(ai->public_key) + 2;
1143  if (ai->type) size += strlenW(typeW2) + strlenW(ai->type) + 2;
1144  size += strlenW(versionW2) + strlenW(version) + 2;
1145 
1146  if (!(ret = RtlAllocateHeap( RtlGetProcessHeap(), 0, (size + 1) * sizeof(WCHAR) )))
1147  return NULL;
1148 
1149  if (ai->name) strcpyW( ret, ai->name );
1150  else *ret = 0;
1151  append_string( ret, archW, ai->arch );
1152  append_string( ret, public_keyW, ai->public_key );
1153  append_string( ret, typeW2, ai->type );
1154  append_string( ret, versionW2, version );
1155  return ret;
1156 }
static const WCHAR version_formatW[]
Definition: actctx.c:761
WCHAR * arch
Definition: actctx.c:93
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
struct assembly_version version
Definition: actctx.c:97
static const WCHAR archW[]
Definition: name.c:49
WCHAR * public_key
Definition: actctx.c:94
static const WCHAR version[]
Definition: asmname.c:66
static void append_string(WCHAR *buffer, const WCHAR *prefix, const WCHAR *str)
Definition: actctx.c:1110
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * type
Definition: actctx.c:96
int ret
ULONG_PTR SIZE_T
Definition: typedefs.h:80
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define sprintfW
Definition: unicode.h:58
WCHAR * name
Definition: actctx.c:92
#define NULL
Definition: types.h:112

Referenced by RtlQueryInformationActivationContext().

◆ build_clr_surrogate_section()

static NTSTATUS build_clr_surrogate_section ( ACTIVATION_CONTEXT actctx,
struct guidsection_header **  section 
)
static

Definition at line 4535 of file actctx.c.

4536 {
4537  unsigned int i, j, total_len = 0, count = 0;
4538  struct guidsection_header *header;
4539  struct clrsurrogate_data *data;
4540  struct guid_index *index;
4542 
4543  /* compute section length */
4544  for (i = 0; i < actctx->num_assemblies; i++)
4545  {
4546  struct assembly *assembly = &actctx->assemblies[i];
4547  for (j = 0; j < assembly->entities.num; j++)
4548  {
4549  struct entity *entity = &assembly->entities.base[j];
4550  if (entity->kind == ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES)
4551  {
4552  ULONG len;
4553 
4554  total_len += sizeof(*index) + sizeof(*data);
4555  len = strlenW(entity->u.clrsurrogate.name) + 1;
4556  if (entity->u.clrsurrogate.version)
4557  len += strlenW(entity->u.clrsurrogate.version) + 1;
4558  total_len += aligned_string_len(len*sizeof(WCHAR));
4559 
4560  count++;
4561  }
4562  }
4563  }
4564 
4565  total_len += sizeof(*header);
4566 
4567  header = RtlAllocateHeap(RtlGetProcessHeap(), 0, total_len);
4568  if (!header) return STATUS_NO_MEMORY;
4569 
4570  memset(header, 0, sizeof(*header));
4571  header->magic = GUIDSECTION_MAGIC;
4572  header->size = sizeof(*header);
4573  header->count = count;
4574  header->index_offset = sizeof(*header);
4575  index = (struct guid_index*)((BYTE*)header + header->index_offset);
4576  data_offset = header->index_offset + count*sizeof(*index);
4577 
4578  for (i = 0; i < actctx->num_assemblies; i++)
4579  {
4580  struct assembly *assembly = &actctx->assemblies[i];
4581  for (j = 0; j < assembly->entities.num; j++)
4582  {
4583  struct entity *entity = &assembly->entities.base[j];
4584  if (entity->kind == ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES)
4585  {
4586  ULONG version_len, name_len;
4588  WCHAR *ptrW;
4589 
4590  if (entity->u.clrsurrogate.version)
4591  version_len = strlenW(entity->u.clrsurrogate.version)*sizeof(WCHAR);
4592  else
4593  version_len = 0;
4594  name_len = strlenW(entity->u.clrsurrogate.name)*sizeof(WCHAR);
4595 
4596  /* setup new index entry */
4598  RtlGUIDFromString(&str, &index->guid);
4599 
4600  index->data_offset = data_offset;
4601  index->data_len = sizeof(*data) + aligned_string_len(name_len + sizeof(WCHAR) + (version_len ? version_len + sizeof(WCHAR) : 0));
4602  index->rosterindex = i + 1;
4603 
4604  /* setup data */
4605  data = (struct clrsurrogate_data*)((BYTE*)header + index->data_offset);
4606  data->size = sizeof(*data);
4607  data->res = 0;
4608  data->clsid = index->guid;
4609  data->version_offset = version_len ? data->size : 0;
4610  data->version_len = version_len;
4611  data->name_offset = data->size + version_len;
4612  if (version_len)
4613  data->name_offset += sizeof(WCHAR);
4614  data->name_len = name_len;
4615 
4616  /* surrogate name */
4617  ptrW = (WCHAR*)((BYTE*)data + data->name_offset);
4618  memcpy(ptrW, entity->u.clrsurrogate.name, data->name_len);
4619  ptrW[data->name_len/sizeof(WCHAR)] = 0;
4620 
4621  /* runtime version */
4622  if (data->version_len)
4623  {
4624  ptrW = (WCHAR*)((BYTE*)data + data->version_offset);
4625  memcpy(ptrW, entity->u.clrsurrogate.version, data->version_len);
4626  ptrW[data->version_len/sizeof(WCHAR)] = 0;
4627  }
4628 
4629  data_offset += index->data_offset;
4630  index++;
4631  }
4632  }
4633  }
4634 
4635  *section = header;
4636 
4637  return STATUS_SUCCESS;
4638 }
#define GUIDSECTION_MAGIC
Definition: actctx.c:39
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
GLuint GLuint GLsizei count
Definition: gl.h:1545
Definition: parser.c:55
struct entity::@4758::@4763 clrsurrogate
ULONG data_offset
Definition: actctx.c:1084
Definition: actctx.c:387
const WCHAR * str
#define actctx
Definition: kernel32.h:8
GLuint index
Definition: glext.h:6031
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 GLint GLint j
Definition: glfuncs.h:250
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
__wchar_t WCHAR
Definition: xmlstorage.h:180
static int aligned_string_len(int len)
Definition: actctx.c:1958
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define index(s, c)
Definition: various.h:29
NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING, GUID *)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
unsigned char BYTE
Definition: xxhash.c:193
union entity::@4758 u
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
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
struct entity_array entities
Definition: actctx.c:475
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define STATUS_SUCCESS
Definition: shellext.h:65
#define memset(x, y, z)
Definition: compat.h:39
ULONG version_len
Definition: actctx.c:1638
struct CFHEADER header
Definition: fdi.c:101
DWORD kind
Definition: actctx.c:389

Referenced by find_clr_surrogate().

◆ build_comserver_section()

static NTSTATUS build_comserver_section ( ACTIVATION_CONTEXT actctx,
struct guidsection_header **  section 
)
static

Definition at line 4250 of file actctx.c.

4251 {
4252  unsigned int i, j, total_len = 0, class_count = 0, names_len = 0;
4253  struct guidsection_header *header;
4254  ULONG module_offset, data_offset;
4255  struct guid_index *index;
4256  ULONG seed;
4257 
4258  /* compute section length */
4259  for (i = 0; i < actctx->num_assemblies; i++)
4260  {
4261  struct assembly *assembly = &actctx->assemblies[i];
4262  get_comserver_datalen(&assembly->entities, NULL, &class_count, &total_len, &names_len);
4263  for (j = 0; j < assembly->num_dlls; j++)
4264  {
4265  struct dll_redirect *dll = &assembly->dlls[j];
4266  get_comserver_datalen(&dll->entities, dll, &class_count, &total_len, &names_len);
4267  }
4268  }
4269 
4270  total_len += aligned_string_len(names_len);
4271  total_len += sizeof(*header);
4272 
4273  header = RtlAllocateHeap(RtlGetProcessHeap(), 0, total_len);
4274  if (!header) return STATUS_NO_MEMORY;
4275 
4276  memset(header, 0, sizeof(*header));
4277  header->magic = GUIDSECTION_MAGIC;
4278  header->size = sizeof(*header);
4279  header->count = 2*class_count;
4280  header->index_offset = sizeof(*header) + aligned_string_len(names_len);
4281  index = (struct guid_index*)((BYTE*)header + header->index_offset);
4282  module_offset = sizeof(*header);
4283  data_offset = header->index_offset + 2*class_count*sizeof(*index);
4284 
4285  seed = NtGetTickCount();
4286  for (i = 0; i < actctx->num_assemblies; i++)
4287  {
4288  struct assembly *assembly = &actctx->assemblies[i];
4289  add_comserver_record(header, &assembly->entities, NULL, &index, &data_offset, &module_offset, &seed, i+1);
4290  for (j = 0; j < assembly->num_dlls; j++)
4291  {
4292  struct dll_redirect *dll = &assembly->dlls[j];
4293  add_comserver_record(header, &dll->entities, dll, &index, &data_offset, &module_offset, &seed, i+1);
4294  }
4295  }
4296 
4297  *section = header;
4298 
4299  return STATUS_SUCCESS;
4300 }
#define GUIDSECTION_MAGIC
Definition: actctx.c:39
Definition: parser.c:55
#define NtGetTickCount
Definition: rtlp.h:146
ULONG data_offset
Definition: actctx.c:1084
static HMODULE dll
Definition: str.c:188
#define actctx
Definition: kernel32.h:8
GLuint index
Definition: glext.h:6031
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 GLint GLint j
Definition: glfuncs.h:250
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
static int aligned_string_len(int len)
Definition: actctx.c:1958
static void get_comserver_datalen(const struct entity_array *entities, const struct dll_redirect *dll, unsigned int *count, unsigned int *len, unsigned int *module_len)
Definition: actctx.c:4026
#define index(s, c)
Definition: various.h:29
unsigned char BYTE
Definition: xxhash.c:193
unsigned int num_dlls
Definition: actctx.c:473
struct dll_redirect * dlls
Definition: actctx.c:472
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
static void add_comserver_record(const struct guidsection_header *section, const struct entity_array *entities, const struct dll_redirect *dll, struct guid_index **index, ULONG *data_offset, ULONG *module_offset, ULONG *seed, ULONG rosterindex)
Definition: actctx.c:4074
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
#define NULL
Definition: types.h:112
struct entity_array entities
Definition: actctx.c:475
unsigned int ULONG
Definition: retypes.h:1
#define STATUS_SUCCESS
Definition: shellext.h:65
#define memset(x, y, z)
Definition: compat.h:39
struct CFHEADER header
Definition: fdi.c:101

Referenced by find_comserver_redirection(), and find_progid_redirection().

◆ build_dllredirect_section()

static NTSTATUS build_dllredirect_section ( ACTIVATION_CONTEXT actctx,
struct strsection_header **  section 
)
static

Definition at line 3438 of file actctx.c.

3439 {
3440  unsigned int i, j, total_len = 0, dll_count = 0;
3441  struct strsection_header *header;
3442  struct dllredirect_data *data;
3443  struct string_index *index;
3445 
3446  DPRINT("actctx %p, num_assemblies %d\n", actctx, actctx->num_assemblies);
3447 
3448  /* compute section length */
3449  for (i = 0; i < actctx->num_assemblies; i++)
3450  {
3451  struct assembly *assembly = &actctx->assemblies[i];
3452  for (j = 0; j < assembly->num_dlls; j++)
3453  {
3454  struct dll_redirect *dll = &assembly->dlls[j];
3455 
3456  /* each entry needs index, data and string data */
3457  total_len += sizeof(*index);
3458  total_len += sizeof(*data);
3459  total_len += aligned_string_len((strlenW(dll->name)+1)*sizeof(WCHAR));
3460 
3461  DPRINT("assembly %d (%p), dll %d: dll name %S\n", i, assembly, j, dll->name);
3462  }
3463 
3465  }
3466 
3467  total_len += sizeof(*header);
3468 
3469  header = RtlAllocateHeap(RtlGetProcessHeap(), 0, total_len);
3470  if (!header) return STATUS_NO_MEMORY;
3471 
3472  memset(header, 0, sizeof(*header));
3473  header->magic = STRSECTION_MAGIC;
3474  header->size = sizeof(*header);
3475  header->count = dll_count;
3476  header->index_offset = sizeof(*header);
3477  index = (struct string_index*)((BYTE*)header + header->index_offset);
3478  name_offset = header->index_offset + header->count*sizeof(*index);
3479 
3480  for (i = 0; i < actctx->num_assemblies; i++)
3481  {
3482  struct assembly *assembly = &actctx->assemblies[i];
3483 
3484  DPRINT("assembly->num_dlls %d\n", assembly->num_dlls);
3485 
3486  for (j = 0; j < assembly->num_dlls; j++)
3487  {
3488  struct dll_redirect *dll = &assembly->dlls[j];
3490  WCHAR *ptrW;
3491 
3492  DPRINT("%d: dll name %S\n", j, dll->name);
3493  /* setup new index entry */
3494  str.Buffer = dll->name;
3495  str.Length = (USHORT)strlenW(dll->name)*sizeof(WCHAR);
3496  str.MaximumLength = str.Length + sizeof(WCHAR);
3497  /* hash original class name */
3499 
3500  index->name_offset = name_offset;
3501  index->name_len = str.Length;
3502  index->data_offset = index->name_offset + aligned_string_len(str.MaximumLength);
3503  index->data_len = sizeof(*data);
3504  index->rosterindex = i + 1;
3505 
3506  /* setup data */
3507  data = (struct dllredirect_data*)((BYTE*)header + index->data_offset);
3508  data->size = sizeof(*data);
3509  data->unk = 2; /* FIXME: seems to be constant */
3510  memset(data->res, 0, sizeof(data->res));
3511 
3512  /* dll name */
3513  ptrW = (WCHAR*)((BYTE*)header + index->name_offset);
3514  memcpy(ptrW, dll->name, index->name_len);
3515  ptrW[index->name_len/sizeof(WCHAR)] = 0;
3516 
3517  name_offset += sizeof(*data) + aligned_string_len(str.MaximumLength);
3518 
3519  index++;
3520  }
3521  }
3522 
3523  *section = header;
3524 
3525  return STATUS_SUCCESS;
3526 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define TRUE
Definition: types.h:120
Definition: parser.c:55
static HMODULE dll
Definition: str.c:188
const WCHAR * str
#define actctx
Definition: kernel32.h:8
GLuint index
Definition: glext.h:6031
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 GLint GLint j
Definition: glfuncs.h:250
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
__wchar_t WCHAR
Definition: xmlstorage.h:180
static int aligned_string_len(int len)
Definition: actctx.c:1958
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define index(s, c)
Definition: various.h:29
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
unsigned char BYTE
Definition: xxhash.c:193
unsigned int num_dlls
Definition: actctx.c:473
struct dll_redirect * dlls
Definition: actctx.c:472
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
unsigned short USHORT
Definition: pedump.c:61
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
ULONG name_offset
Definition: actctx.c:1062
LONG dll_count
Definition: itss.c:49
NTSYSAPI NTSTATUS NTAPI RtlHashUnicodeString(_In_ CONST UNICODE_STRING *String, _In_ BOOLEAN CaseInSensitive, _In_ ULONG HashAlgorithm, _Out_ PULONG HashValue)
unsigned int ULONG
Definition: retypes.h:1
#define STRSECTION_MAGIC
Definition: actctx.c:38
#define STATUS_SUCCESS
Definition: shellext.h:65
#define HASH_STRING_ALGORITHM_X65599
Definition: rtlstr.c:33
#define DPRINT
Definition: sndvol32.h:71
#define memset(x, y, z)
Definition: compat.h:39
struct CFHEADER header
Definition: fdi.c:101

Referenced by find_dll_redirection().

◆ build_ifaceps_section()

static NTSTATUS build_ifaceps_section ( ACTIVATION_CONTEXT actctx,
struct guidsection_header **  section 
)
static

Definition at line 4442 of file actctx.c.

4443 {
4444  unsigned int i, j, total_len = 0, count = 0;
4445  struct guidsection_header *header;
4446  struct guid_index *index;
4448 
4449  /* compute section length */
4450  for (i = 0; i < actctx->num_assemblies; i++)
4451  {
4452  struct assembly *assembly = &actctx->assemblies[i];
4453 
4454  get_ifaceps_datalen(&assembly->entities, &count, &total_len);
4455  for (j = 0; j < assembly->num_dlls; j++)
4456  {
4457  struct dll_redirect *dll = &assembly->dlls[j];
4458  get_ifaceps_datalen(&dll->entities, &count, &total_len);
4459  }
4460  }
4461 
4462  total_len += sizeof(*header);
4463 
4464  header = RtlAllocateHeap(RtlGetProcessHeap(), 0, total_len);
4465  if (!header) return STATUS_NO_MEMORY;
4466 
4467  memset(header, 0, sizeof(*header));
4468  header->magic = GUIDSECTION_MAGIC;
4469  header->size = sizeof(*header);
4470  header->count = count;
4471  header->index_offset = sizeof(*header);
4472  index = (struct guid_index*)((BYTE*)header + header->index_offset);
4473  data_offset = header->index_offset + count*sizeof(*index);
4474 
4475  for (i = 0; i < actctx->num_assemblies; i++)
4476  {
4477  struct assembly *assembly = &actctx->assemblies[i];
4478 
4479  add_ifaceps_record(header, &assembly->entities, &index, &data_offset, i + 1);
4480  for (j = 0; j < assembly->num_dlls; j++)
4481  {
4482  struct dll_redirect *dll = &assembly->dlls[j];
4483  add_ifaceps_record(header, &dll->entities, &index, &data_offset, i + 1);
4484  }
4485  }
4486 
4487  *section = header;
4488 
4489  return STATUS_SUCCESS;
4490 }
#define GUIDSECTION_MAGIC
Definition: actctx.c:39
GLuint GLuint GLsizei count
Definition: gl.h:1545
Definition: parser.c:55
ULONG data_offset
Definition: actctx.c:1084
static HMODULE dll
Definition: str.c:188
#define actctx
Definition: kernel32.h:8
GLuint index
Definition: glext.h:6031
static void get_ifaceps_datalen(const struct entity_array *entities, unsigned int *count, unsigned int *len)
Definition: actctx.c:4347
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 GLint GLint j
Definition: glfuncs.h:250
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
#define index(s, c)
Definition: various.h:29
unsigned char BYTE
Definition: xxhash.c:193
unsigned int num_dlls
Definition: actctx.c:473
struct dll_redirect * dlls
Definition: actctx.c:472
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
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
struct entity_array entities
Definition: actctx.c:475
unsigned int ULONG
Definition: retypes.h:1
#define STATUS_SUCCESS
Definition: shellext.h:65
static void add_ifaceps_record(struct guidsection_header *section, struct entity_array *entities, struct guid_index **index, ULONG *data_offset, ULONG rosterindex)
Definition: actctx.c:4364
#define memset(x, y, z)
Definition: compat.h:39
struct CFHEADER header
Definition: fdi.c:101

Referenced by find_cominterface_redirection().

◆ build_progid_section()

static NTSTATUS build_progid_section ( ACTIVATION_CONTEXT actctx,
struct strsection_header **  section 
)
static

Definition at line 4788 of file actctx.c.

4789 {
4790  unsigned int i, j, total_len = 0, count = 0;
4791  struct strsection_header *header;
4792  ULONG data_offset, global_offset;
4793  struct string_index *index;
4794 
4795  /* compute section length */
4796  for (i = 0; i < actctx->num_assemblies; i++)
4797  {
4798  struct assembly *assembly = &actctx->assemblies[i];
4799 
4800  get_progid_datalen(&assembly->entities, &count, &total_len);
4801  for (j = 0; j < assembly->num_dlls; j++)
4802  {
4803  struct dll_redirect *dll = &assembly->dlls[j];
4804  get_progid_datalen(&dll->entities, &count, &total_len);
4805  }
4806  }
4807 
4808  total_len += sizeof(*header);
4809 
4810  header = RtlAllocateHeap(RtlGetProcessHeap(), 0, total_len);
4811  if (!header) return STATUS_NO_MEMORY;
4812 
4813  memset(header, 0, sizeof(*header));
4814  header->magic = STRSECTION_MAGIC;
4815  header->size = sizeof(*header);
4816  header->count = count;
4817  header->global_offset = header->size;
4818  header->global_len = count*sizeof(GUID);
4819  header->index_offset = header->size + header->global_len;
4820 
4821  index = (struct string_index*)((BYTE*)header + header->index_offset);
4822  data_offset = header->index_offset + count*sizeof(*index);
4823  global_offset = header->global_offset;
4824 
4825  for (i = 0; i < actctx->num_assemblies; i++)
4826  {
4827  struct assembly *assembly = &actctx->assemblies[i];
4828 
4829  add_progid_record(actctx, header, &assembly->entities, &index, &data_offset, &global_offset, i + 1);
4830  for (j = 0; j < assembly->num_dlls; j++)
4831  {
4832  struct dll_redirect *dll = &assembly->dlls[j];
4833  add_progid_record(actctx, header, &dll->entities, &index, &data_offset, &global_offset, i + 1);
4834  }
4835  }
4836 
4837  *section = header;
4838 
4839  return STATUS_SUCCESS;
4840 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
Definition: parser.c:55
static HMODULE dll
Definition: str.c:188
#define actctx
Definition: kernel32.h:8
GLuint index
Definition: glext.h:6031
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 GLint GLint j
Definition: glfuncs.h:250
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
#define index(s, c)
Definition: various.h:29
unsigned char BYTE
Definition: xxhash.c:193
unsigned int num_dlls
Definition: actctx.c:473
struct dll_redirect * dlls
Definition: actctx.c:472
struct _GUID GUID
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
ULONG data_offset
Definition: actctx.c:1064
static void add_progid_record(ACTIVATION_CONTEXT *actctx, struct strsection_header *section, const struct entity_array *entities, struct string_index **index, ULONG *data_offset, ULONG *global_offset, ULONG rosterindex)
Definition: actctx.c:4755
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
struct entity_array entities
Definition: actctx.c:475
unsigned int ULONG
Definition: retypes.h:1
#define STRSECTION_MAGIC
Definition: actctx.c:38
#define STATUS_SUCCESS
Definition: shellext.h:65
static void get_progid_datalen(struct entity_array *entities, unsigned int *count, unsigned int *total_len)
Definition: actctx.c:4687
#define memset(x, y, z)
Definition: compat.h:39
struct CFHEADER header
Definition: fdi.c:101

Referenced by find_progid_redirection().

◆ build_tlib_section()

static NTSTATUS build_tlib_section ( ACTIVATION_CONTEXT actctx,
struct guidsection_header **  section 
)
static

Definition at line 3843 of file actctx.c.

3844 {
3845  unsigned int i, j, k, total_len = 0, tlib_count = 0, names_len = 0;
3846  struct guidsection_header *header;
3847  ULONG module_offset, data_offset;
3848  struct tlibredirect_data *data;
3849  struct guid_index *index;
3850 
3851  /* compute section length */
3852  for (i = 0; i < actctx->num_assemblies; i++)
3853  {
3854  struct assembly *assembly = &actctx->assemblies[i];
3855  for (j = 0; j < assembly->num_dlls; j++)
3856  {
3857  struct dll_redirect *dll = &assembly->dlls[j];
3858  for (k = 0; k < dll->entities.num; k++)
3859  {
3860  struct entity *entity = &dll->entities.base[k];
3861  if (entity->kind == ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION)
3862  {
3863  /* each entry needs index, data and string data for module name and help string */
3864  total_len += sizeof(*index);
3865  total_len += sizeof(*data);
3866  /* help string is stored separately */
3867  if (*entity->u.typelib.helpdir)
3868  total_len += aligned_string_len((strlenW(entity->u.typelib.helpdir)+1)*sizeof(WCHAR));
3869 
3870  /* module names are packed one after another */
3871  names_len += (strlenW(dll->name)+1)*sizeof(WCHAR);
3872 
3873  tlib_count++;
3874  }
3875  }
3876  }
3877  }
3878 
3879  total_len += aligned_string_len(names_len);
3880  total_len += sizeof(*header);
3881 
3882  header = RtlAllocateHeap(RtlGetProcessHeap(), 0, total_len);
3883  if (!header) return STATUS_NO_MEMORY;
3884 
3885  memset(header, 0, sizeof(*header));
3886  header->magic = GUIDSECTION_MAGIC;
3887  header->size = sizeof(*header);
3888  header->count = tlib_count;
3889  header->index_offset = sizeof(*header) + aligned_string_len(names_len);
3890  index = (struct guid_index*)((BYTE*)header + header->index_offset);
3891  module_offset = sizeof(*header);
3892  data_offset = header->index_offset + tlib_count*sizeof(*index);
3893 
3894  for (i = 0; i < actctx->num_assemblies; i++)
3895  {
3896  struct assembly *assembly = &actctx->assemblies[i];
3897  for (j = 0; j < assembly->num_dlls; j++)
3898  {
3899  struct dll_redirect *dll = &assembly->dlls[j];
3900  for (k = 0; k < dll->entities.num; k++)
3901  {
3902  struct entity *entity = &dll->entities.base[k];
3903  if (entity->kind == ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION)
3904  {
3905  ULONG module_len, help_len;
3907  WCHAR *ptrW;
3908 
3909  if (*entity->u.typelib.helpdir)
3910  help_len = strlenW(entity->u.typelib.helpdir)*sizeof(WCHAR);
3911  else
3912  help_len = 0;
3913 
3914  module_len = strlenW(dll->name)*sizeof(WCHAR);
3915 
3916  /* setup new index entry */
3918  RtlGUIDFromString(&str, &index->guid);
3919  index->data_offset = data_offset;
3920  index->data_len = sizeof(*data) + aligned_string_len(help_len);
3921  index->rosterindex = i + 1;
3922 
3923  /* setup data */
3924  data = (struct tlibredirect_data*)((BYTE*)header + index->data_offset);
3925  data->size = sizeof(*data);
3926  data->res = 0;
3927  data->name_len = module_len;
3928  data->name_offset = module_offset;
3929  /* FIXME: resourceid handling is really weird, and it doesn't seem to be useful */
3930  data->langid = 0;
3931  data->flags = entity->u.typelib.flags;
3932  data->help_len = help_len;
3933  data->help_offset = sizeof(*data);
3934  data->major_version = entity->u.typelib.major;
3935  data->minor_version = entity->u.typelib.minor;
3936 
3937  /* module name */
3938  ptrW = (WCHAR*)((BYTE*)header + data->name_offset);
3939  memcpy(ptrW, dll->name, data->name_len);
3940  ptrW[data->name_len/sizeof(WCHAR)] = 0;
3941 
3942  /* help string */
3943  if (data->help_len)
3944  {
3945  ptrW = (WCHAR*)((BYTE*)data + data->help_offset);
3946  memcpy(ptrW, entity->u.typelib.helpdir, data->help_len);
3947  ptrW[data->help_len/sizeof(WCHAR)] = 0;
3948  }
3949 
3950  data_offset += sizeof(*data);
3951  if (help_len)
3952  data_offset += aligned_string_len(help_len + sizeof(WCHAR));
3953 
3954  module_offset += module_len + sizeof(WCHAR);
3955 
3956  index++;
3957  }
3958  }
3959  }
3960  }
3961 
3962  *section = header;
3963 
3964  return STATUS_SUCCESS;
3965 }
#define GUIDSECTION_MAGIC
Definition: actctx.c:39
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
Definition: parser.c:55
ULONG data_offset
Definition: actctx.c:1084
static HMODULE dll
Definition: str.c:188
ULONG help_len
Definition: oleaut.c:792
Definition: actctx.c:387
struct entity::@4758::@4759 typelib
const WCHAR * str
#define actctx
Definition: kernel32.h:8
GLuint index
Definition: glext.h:6031
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 GLint GLint j
Definition: glfuncs.h:250
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
__wchar_t WCHAR
Definition: xmlstorage.h:180
static int aligned_string_len(int len)
Definition: actctx.c:1958
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define index(s, c)
Definition: various.h:29
NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING, GUID *)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
unsigned char BYTE
Definition: xxhash.c:193
union entity::@4758 u
unsigned int num_dlls
Definition: actctx.c:473
struct dll_redirect * dlls
Definition: actctx.c:472
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
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define STATUS_SUCCESS
Definition: shellext.h:65
#define memset(x, y, z)
Definition: compat.h:39
int k
Definition: mpi.c:3369
struct CFHEADER header
Definition: fdi.c:101
DWORD kind
Definition: actctx.c:389

Referenced by find_tlib_redirection().

◆ build_wndclass_section()

static NTSTATUS build_wndclass_section ( ACTIVATION_CONTEXT actctx,
struct strsection_header **  section 
)
static

Definition at line 3640 of file actctx.c.

3641 {
3642  unsigned int i, j, k, total_len = 0, class_count = 0;
3643  struct wndclass_redirect_data *data;
3644  struct strsection_header *header;
3645  struct string_index *index;
3647 
3648  /* compute section length */
3649  for (i = 0; i < actctx->num_assemblies; i++)
3650  {
3651  struct assembly *assembly = &actctx->assemblies[i];
3652  for (j = 0; j < assembly->num_dlls; j++)
3653  {
3654  struct dll_redirect *dll = &assembly->dlls[j];
3655  for (k = 0; k < dll->entities.num; k++)
3656  {
3657  struct entity *entity = &dll->entities.base[k];
3658  if (entity->kind == ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION)
3659  {
3660  int class_len = strlenW(entity->u.class.name) + 1;
3661  int len;
3662 
3663  /* each class entry needs index, data and string data */
3664  total_len += sizeof(*index);
3665  total_len += sizeof(*data);
3666  /* original name is stored separately */
3667  total_len += aligned_string_len(class_len*sizeof(WCHAR));
3668  /* versioned name and module name are stored one after another */
3669  if (entity->u.class.versioned)
3670  len = get_assembly_version(assembly, NULL) + class_len + 1 /* '!' separator */;
3671  else
3672  len = class_len;
3673  len += strlenW(dll->name) + 1;
3674  total_len += aligned_string_len(len*sizeof(WCHAR));
3675 
3676  class_count++;
3677  }
3678  }
3679  }
3680  }
3681 
3682  total_len += sizeof(*header);
3683 
3684  header = RtlAllocateHeap(RtlGetProcessHeap(), 0, total_len);
3685  if (!header) return STATUS_NO_MEMORY;
3686 
3687  memset(header, 0, sizeof(*header));
3688  header->magic = STRSECTION_MAGIC;
3689  header->size = sizeof(*header);
3690  header->count = class_count;
3691  header->index_offset = sizeof(*header);
3692  index = (struct string_index*)((BYTE*)header + header->index_offset);
3693  name_offset = header->index_offset + header->count*sizeof(*index);
3694 
3695  for (i = 0; i < actctx->num_assemblies; i++)
3696  {
3697  struct assembly *assembly = &actctx->assemblies[i];
3698  for (j = 0; j < assembly->num_dlls; j++)
3699  {
3700  struct dll_redirect *dll = &assembly->dlls[j];
3701  for (k = 0; k < dll->entities.num; k++)
3702  {
3703  struct entity *entity = &dll->entities.base[k];
3704  if (entity->kind == ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION)
3705  {
3706  static const WCHAR exclW[] = {'!',0};
3707  ULONG versioned_len, module_len;
3709  WCHAR *ptrW;
3710 
3711  /* setup new index entry */
3712  str.Buffer = entity->u.class.name;
3713  str.Length = (USHORT)strlenW(entity->u.class.name)*sizeof(WCHAR);
3714  str.MaximumLength = str.Length + sizeof(WCHAR);
3715  /* hash original class name */
3717 
3718  /* include '!' separator too */
3719  if (entity->u.class.versioned)
3720  versioned_len = (get_assembly_version(assembly, NULL) + 1)*sizeof(WCHAR) + str.Length;
3721  else
3722  versioned_len = str.Length;
3723  module_len = strlenW(dll->name)*sizeof(WCHAR);
3724 
3725  index->name_offset = name_offset;
3726  index->name_len = str.Length;
3727  index->data_offset = index->name_offset + aligned_string_len(str.MaximumLength);
3728  index->data_len = sizeof(*data) + versioned_len + module_len + 2*sizeof(WCHAR) /* two nulls */;
3729  index->rosterindex = i + 1;
3730 
3731  /* setup data */
3732  data = (struct wndclass_redirect_data*)((BYTE*)header + index->data_offset);
3733  data->size = sizeof(*data);
3734  data->res = 0;
3735  data->name_len = versioned_len;
3736  data->name_offset = sizeof(*data);
3737  data->module_len = module_len;
3738  data->module_offset = index->data_offset + data->name_offset + data->name_len + sizeof(WCHAR);
3739 
3740  /* original class name */
3741  ptrW = (WCHAR*)((BYTE*)header + index->name_offset);
3742  memcpy(ptrW, entity->u.class.name, index->name_len);
3743  ptrW[index->name_len/sizeof(WCHAR)] = 0;
3744 
3745  /* module name */
3746  ptrW = (WCHAR*)((BYTE*)header + data->module_offset);
3747  memcpy(ptrW, dll->name, data->module_len);
3748  ptrW[data->module_len/sizeof(WCHAR)] = 0;
3749 
3750  /* versioned name */
3751  ptrW = (WCHAR*)((BYTE*)data + data->name_offset);
3752  if (entity->u.class.versioned)
3753  {
3755  strcatW(ptrW, exclW);
3756  strcatW(ptrW, entity->u.class.name);
3757  }
3758  else
3759  {
3760  memcpy(ptrW, entity->u.class.name, index->name_len);
3761  ptrW[index->name_len/sizeof(WCHAR)] = 0;
3762  }
3763 
3764  name_offset += sizeof(*data);
3765  name_offset += aligned_string_len(str.MaximumLength) + aligned_string_len(versioned_len + module_len + 2*sizeof(WCHAR));
3766 
3767  index++;
3768  }
3769  }
3770  }
3771  }
3772 
3773  *section = header;
3774 
3775  return STATUS_SUCCESS;
3776 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define TRUE
Definition: types.h:120
struct entity::@4758::@4762 class
Definition: parser.c:55
static HMODULE dll
Definition: str.c:188
Definition: actctx.c:387
const WCHAR * str
#define actctx
Definition: kernel32.h:8
GLuint index
Definition: glext.h:6031
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 GLint GLint j
Definition: glfuncs.h:250
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
__wchar_t WCHAR
Definition: xmlstorage.h:180
static int aligned_string_len(int len)
Definition: actctx.c:1958
static int get_assembly_version(struct assembly *assembly, WCHAR *ret)
Definition: actctx.c:1963
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define index(s, c)
Definition: various.h:29
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
unsigned char BYTE
Definition: xxhash.c:193
union entity::@4758 u
unsigned int num_dlls
Definition: actctx.c:473
struct dll_redirect * dlls
Definition: actctx.c:472
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
unsigned short USHORT
Definition: pedump.c:61
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
WINE_UNICODE_INLINE WCHAR * strcatW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:242
#define NULL
Definition: types.h:112
ULONG name_offset
Definition: actctx.c:1062
NTSYSAPI NTSTATUS NTAPI RtlHashUnicodeString(_In_ CONST UNICODE_STRING *String, _In_ BOOLEAN CaseInSensitive, _In_ ULONG HashAlgorithm, _Out_ PULONG HashValue)
unsigned int ULONG
Definition: retypes.h:1
#define STRSECTION_MAGIC
Definition: actctx.c:38
#define STATUS_SUCCESS
Definition: shellext.h:65
#define HASH_STRING_ALGORITHM_X65599
Definition: rtlstr.c:33
#define memset(x, y, z)
Definition: compat.h:39
int k
Definition: mpi.c:3369
struct CFHEADER header
Definition: