DCE 1.2.2 released under LGPL license (strategically important for Wine)

Luke Kenneth Casson Leighton lkcl at lkcl.net
Mon Jan 17 20:19:13 CST 2005


On Sun, Jan 16, 2005 at 05:51:54PM -0600, Rob Shearman wrote:

> A DCOM implementation is more than a header file 
> containing a few comments and a few declarations of Win32 functions that 
> are randomly placed in there.
 
 perhaps it would be best for me to provide a reference to
 something i found on The Open Group's site.

 i assume that you (rob) are familiar with and aware of these
 documents, but for the benefit of those people who are not
 or might not be, i found these in some [accidental!] research
 last week and tonight.

  http://archive.opengroup.org/dce/meetings/july98/FrankHayes/index.htm
  http://www.opengroup.org/comsource/
  http://www.opengroup.org/pubs/catalog/ax01.htm

  in the latter, you may obtain access to the online docs by agreeing
  to TOG's access conditions.

  in the latter, you fill find full information sufficient to implement
  DCOM.

  description of MSRPC, use of NTLM, the works.

  note the heavy dependence on DCE/RPC.


  one of the services required is a "Registry" and there is full
  documentation on the registry API.

  it is possible to recreate the winreg.idl file from this
  documentation.

  alternatively, you will find one already recreated by matty chapman's
  "muddle" compiler, available from http://hands.com/~lkcl.

  i am attaching it here for your convenience.
  
  FreeDCE is capable of turning this into _useful_ NT-compatible code
  
  FreeDCE has the plugins required to perform NTLM authenticated
  registry management.

  ... registry service, anyone?  courtesy of wine's present code as a
  FreeDCE server?


  according to the TOG docs, another service required is the
  "secure service provider".

  wow.  


 l.
-------------- next part --------------
/* Reconstructed by Matt Chapman <matthewc at cse.unsw.edu.au> */

[ uuid(338cd001-2244-31f1-aaaa-900038001003),
  version(1.0),
  implicit_handle(handle_t rpc_binding)
] interface winreg
{
  /* Function 0x00 */
  error_status_t RegOpenHKCR(
        [in] [unique] wchar_t *server,
        [in] long access,
       [out] [context_handle] void **hnd
  );

  /* Function 0x01 */
  error_status_t RegOpenHKCU(
        [in] [unique] wchar_t *server,
        [in] long access,
       [out] [context_handle] void **hnd
  );

  /* Function 0x02 */
  error_status_t RegOpenHKLM(
        [in] [unique] wchar_t *server,
        [in] long access,
       [out] [context_handle] void **hnd
  );

  /* Function 0x03 */
  error_status_t RegOpenHKPD(
        [in] [unique] wchar_t *server,
        [in] long access,
       [out] [context_handle] void **hnd
  );

  /* Function 0x04 */
  error_status_t RegOpenHKU(
        [in] [unique] wchar_t *server,
        [in] long access,
       [out] [context_handle] void **hnd
  );

  /* Function 0x05 */
  error_status_t RegClose(
    [in,out] [context_handle] void **hnd
  );

  typedef struct {
    short length;
    short size;
    [size_is(size/2)] [length_is(length/2)] [unique] short *string;
  } UNICODE_STRING;

  typedef struct {
    [size_is(size)] [length_is(length)] [unique] char *buffer;
    long size;
    long length;
  } BUFFER;

  typedef struct {
    long length;
    BUFFER sec_desc;
    char inherit;
  } SECURITY_ATTRIBUTES;

  /* Function 0x06 */
  error_status_t RegCreateKey(
        [in] [context_handle] void *hnd_parent,
        [in] [ref] UNICODE_STRING *name,
        [in] [ref] UNICODE_STRING *class,
        [in] long reserved,
        [in] long access,
        [in] [unique] SECURITY_ATTRIBUTES *sec_info,
       [out] [context_handle] void **hnd,
    [in,out] [unique] long *disposition
  );

  /* Function 0x07 */
  error_status_t RegDeleteKey(
        [in] [context_handle] void *hnd,
        [in] [ref] UNICODE_STRING *name
  );

  /* Function 0x08 */
  error_status_t RegDeleteValue(
        [in] [context_handle] void *hnd,
        [in] [ref] UNICODE_STRING *name
  );

  typedef struct {
    long low;
    long high;
  } NTTIME;

  /* Function 0x09 */
  error_status_t RegEnumKey(
        [in] [context_handle] void *hnd,
        [in] long index,
    [in,out] [ref] UNICODE_STRING *name,
    [in,out] [unique] UNICODE_STRING *class,
    [in,out] [unique] NTTIME *mtime
  );

  /* Function 0x0a */
  error_status_t RegEnumValue(
        [in] [context_handle] void *hnd,
        [in] long index,
    [in,out] [ref] UNICODE_STRING *name,
    [in,out] [unique] long *type,
    [in,out] [size_is(*size+1)] [length_is(*length+1)] [unique] char *value,
    [in,out] [unique] long *size,
    [in,out] [unique] long *length
  );

  /* Function 0x0b */
  error_status_t RegFlushKey(
        [in] [context_handle] void *hnd
  );

  /* Function 0x0c */
  error_status_t RegGetKeySecurity(
        [in] [context_handle] void *hnd,
        [in] long info_type,
    [in,out] [ref] BUFFER *sec_info
  );

  /* Function 0x0d */
  error_status_t RegLoadKey(
        [in] [context_handle] void *hnd,
        [in] [ref] UNICODE_STRING *subkey,
        [in] [ref] UNICODE_STRING *file
  );

  /* Function 0x0e */
  error_status_t RegNotifyChangeKeyValue(
        [in] [context_handle] void *hnd,
        [in] char subtree,
        [in] long filter,
        [in] long element_48,
        [in] [ref] UNICODE_STRING *element_49,
        [in] [ref] UNICODE_STRING *element_50,
        [in] [unique] SECURITY_ATTRIBUTES *sec_info
  );

  /* Function 0x0f */
  error_status_t RegOpenKey(
        [in] [context_handle] void *hnd_parent,
        [in] [ref] UNICODE_STRING *name,
        [in] long unknown,
        [in] long access,
       [out] [context_handle] void **hnd
  );

  /* Function 0x10 */
  error_status_t RegQueryInfoKey(
        [in] [context_handle] void *hnd,
    [in,out] [ref] UNICODE_STRING *class,
       [out] [ref] long *subkeys,
       [out] [ref] long *max_keynamelen,
       [out] [ref] long *max_keybufsize,
       [out] [ref] long *values,
       [out] [ref] long *max_valnamelen,
       [out] [ref] long *max_valbufsize,
       [out] [ref] long *len_secdesc,
       [out] [ref] NTTIME *mtime
  );

  /* Function 0x11 */
  error_status_t RegQueryValue(
        [in] [context_handle] void *hnd,
        [in] [ref] UNICODE_STRING *name,
    [in,out] [unique] long *type,
    [in,out] [size_is(*size+1)] [length_is(*length+1)] [unique] char *value,
    [in,out] [unique] long *size,
    [in,out] [unique] long *length
  );

  /* Function 0x12 */
  error_status_t RegReplaceKey(
        [in] [context_handle] void *hnd,
        [in] [ref] UNICODE_STRING *subkey,
        [in] [ref] UNICODE_STRING *file,
        [in] [ref] UNICODE_STRING *bakfile
  );

  /* Function 0x13 */
  error_status_t RegRestoreKey(
        [in] [context_handle] void *hnd,
        [in] [ref] UNICODE_STRING *file,
        [in] long options
  );

  /* Function 0x14 */
  error_status_t RegSaveKey(
        [in] [context_handle] void *hnd,
        [in] [ref] UNICODE_STRING *file,
        [in] [unique] SECURITY_ATTRIBUTES *file_sec
  );

  /* Function 0x15 */
  error_status_t RegSetKeySecurity(
        [in] [context_handle] void *hnd,
        [in] long info_type,
        [in] [ref] BUFFER *sec_info
  );

  /* Function 0x16 */
  error_status_t RegSetValue(
        [in] [context_handle] void *hnd,
        [in] [ref] UNICODE_STRING *name,
        [in] long type,
        [in] [size_is(size)] [ref] char *value,
        [in] long size
  );

  /* Function 0x17 */
  error_status_t RegUnLoadKey(
        [in] [context_handle] void *hnd,
        [in] [ref] UNICODE_STRING *name
  );

  /* Function 0x18 */
  long InitiateSystemShutdown(
        [in] [unique] wchar_t *server,
        [in] [unique] UNICODE_STRING *message,
        [in] long timeout,
        [in] char flags1,
        [in] char flags2
  );

  /* Function 0x19 */
  long AbortSystemShutdown(
        [in] [unique] wchar_t *server
  );

  /* Function 0x1a */
  error_status_t RegGetVersion(
        [in] [context_handle] void *hnd,
       [out] [ref] long *version
  );

  /* Function 0x1b */
  error_status_t RegOpenHKCC(
        [in] [unique] wchar_t *server,
        [in] long access,
       [out] [context_handle] void **hnd
  );

  /* Function 0x1c */
  error_status_t RegOpenHKDD(
        [in] [unique] wchar_t *server,
        [in] long access,
       [out] [context_handle] void **hnd
  );

  typedef struct {
    [unique] UNICODE_STRING *name;
    long datalen;
    long offset;
    long type;
  } VALENT;

  /* Function 0x1d */
  error_status_t RegQueryMultipleValues(
        [in] [context_handle] void *hnd,
    [in,out] [size_is(num_vals)] [ref] VALENT *vals,
        [in] long num_vals,
    [in,out] [size_is(*size)] [unique] char *data,
    [in,out] [ref] long *size
  );

}


More information about the wine-devel mailing list