Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions

ven78.cpp File Reference

Detailed Description

DCOM Registry on UNIX: Registry Functions.


See also:

Definition in file ven78.cpp.

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "heo01.h"
#include "heo78.h"
#include "geo47.h"
#include "geo60.h"

Go to the source code of this file.


struct  reg_slot
struct  register_object_arg
struct  search_clsid_arg
struct  search_progid_arg
struct  unregister_object_arg


#define DCOM_REGISTRY_FILE   "Registry.dcom"
#define ERR_REGISTRY_CREATE_FAILED   11509, ERR_TYPE,_T("REGISTRY"),_T("Creating registery file %s failed")
#define ERR_REGISTRY_FILE_PATH   11502, ERR_TYPE,_T("REGISTRY"),_T("Failed to get path to register file:%s")
#define ERR_REGISTRY_LOCK   11518, ERR_TYPE,_T("REGISTRY"),_T("Locking registry file failed! (mounted via NFS ?)")
#define ERR_REGISTRY_NULL_PARAMETER   11507, ERR_TYPE,_T("REGISTRY"),_T("Illegal output parameter type (NULL pointer)")
#define ERR_REGISTRY_OPEN_FAILED   11508, ERR_TYPE,_T("REGISTRY"),_T("Opening registery file %s failed")
#define ERR_REGISTRY_PARAMETER_CHECK_CLSID   11504, ERR_TYPE,_T("REGISTRY"),_T("Illegal class id parameter len %ld != size %ld")
#define ERR_REGISTRY_PARAMETER_CHECK_ILLEGAL   11505, ERR_TYPE,_T("REGISTRY"),_T("Illegal input parameter type %d")
#define ERR_REGISTRY_PARAMETER_CHECK_SIZE   11503, ERR_TYPE,_T("REGISTRY"),_T("Illegal input parameter size type %d len %ld size %ld")
#define ERR_REGISTRY_READ_MAGIC   11515, ERR_TYPE,_T("REGISTRY"),_T("Reading registery header failed")
#define ERR_REGISTRY_READ_NO_HEADER   11513, ERR_TYPE,_T("REGISTRY"),_T("Registry size %ld to small even for header")
#define ERR_REGISTRY_READ_SLOT   11517, ERR_TYPE,_T("REGISTRY"),_T("Reading slot %ld failed")
#define ERR_REGISTRY_SEEK_BEGIN   11514, ERR_TYPE,_T("REGISTRY"),_T("Seeking to begin of registry failed")
#define ERR_REGISTRY_SEEK_END   11512, ERR_TYPE,_T("REGISTRY"),_T("Seeking to end of registry failed")
#define ERR_REGISTRY_SEEK_TO_SLOT   11500, ERR_TYPE,_T("REGISTRY"),_T("Seek to offset %ld failed")
#define ERR_REGISTRY_WRITE_FIRST_SLOT_FAILED   11511, ERR_TYPE,_T("REGISTRY"),_T("Writing first slot to %s failed")
#define ERR_REGISTRY_WRITE_MAGIC_FAILED   11510, ERR_TYPE,_T("REGISTRY"),_T("Writing header to %s failed")
#define ERR_REGISTRY_WRITE_SLOT   11501, ERR_TYPE,_T("REGISTRY"),_T("Write at offset %ld failed")
#define ERR_REGISTRY_WRONG_MAGIC   11516, ERR_TYPE,_T("REGISTRY"),_T("Header information show file is no registry file")
#define ERR_REGISTRY_ZERO_LENGTH_PARAMETER   11506, ERR_TYPE,_T("REGISTRY"),_T("Illegal output parameter (zero length)")
#define ERR_TYPE   1
#define INFO_REGISTRY_CREATED   11500,INFO_TYPE,_T("REGISTRY"),_T("Created registry file %s")
#define INFO_TYPE   3


typedef teo78_Result(* parse_func )(reg_slot &, unsigned int idx, void *arg)
typedef char teo78_ProgProject [PROG_ID_PFX_MXEO78+PROJECT_MXEO78]


enum  param_type {
  param_ProgIDPfx, param_Project, param_Version, param_ClsID,
  param_ModuleName, param_ProgID


static reg_slot * alloc_registry (unsigned int file_size)
static void close_registry (FILE *f)
static FILE * create_registry ()
static unsigned int fill_prog_project (char *, const char *, const char *)
static void free_registry (reg_slot *buffer)
static teo78_Result in_param_check (const teo78_Result, const enum param_type, const char *, const size_t)
static int lock_registry (FILE *f)
static FILE * open_registry ()
static teo78_Result out_param_check (const teo78_Result, const char *, const size_t)
static teo78_Result parse_registry (reg_slot *buffer, unsigned int slot_cnt, parse_func func, void *arg)
static reg_slot * read_registry (FILE *f, unsigned int *pCnt)
static teo78_Result register_Object (reg_slot &current, unsigned int idx, void *arg)
static char * registry_file (tsp00_Pathc &path)
static teo78_Result search_ClsID (reg_slot &current, unsigned int idx, void *arg)
static teo78_Result search_ProgID (reg_slot &current, unsigned int idx, void *arg)
teo78_Result sqlComObjectGet (teo78_ProgID ProgID, teo78_ClsID ClsID, teo78_ModuleName ModuleName)
 This call retrieves a module name and ClsID usign given programmatic ID.
teo78_Result sqlComObjectGetByClsID (teo78_ClsID ClsID, teo78_ModuleName ModuleName)
 This call retrieves a module name using given ClsID.
teo78_Result sqlComObjectRegister (teo78_ProgIDPfx ProgIDPfx, teo78_Project Project, teo78_Version Version, teo78_ClsID ClsID, teo78_ModuleName ModuleName)
 This call registers a specified Com Object.
teo78_Result sqlComObjectUnregister (teo78_ProgIDPfx ProgIDPfx, teo78_Project Project, teo78_Version Version, teo78_ClsID ClsID)
 This call unregisters a specified Com Object.
static void unlock_registry (FILE *f)
static teo78_Result unregister_Object (reg_slot &current, unsigned int idx, void *arg)
static int update_registry (FILE *f, reg_slot *buffer, unsigned int slot_index)

Generated by  Doxygen 1.6.0   Back to index