~ubuntu-branches/debian/squeeze/ntp/squeeze-201010051545

« back to all changes in this revision

Viewing changes to libntp/log.c

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2004-10-11 16:10:27 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041011161027-icyjbji8ujym633o
Tags: 1:4.2.0a-10ubuntu2
Use ntp.ubuntulinux.org instead of pool.ntp.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Microsoft Developer Support Copyright (c) 1993 Microsoft Corporation. */
2
2
 
 
3
/* Skip asynch rpc inclusion */
 
4
#ifndef __RPCASYNC_H__
 
5
#define __RPCASYNC_H__
 
6
#endif
 
7
 
 
8
#include <windows.h>
3
9
#include <stdio.h>
4
10
#include <stdlib.h>
5
11
#include <string.h>
6
 
#include <windows.h>
7
12
 
8
13
#include "messages.h"
9
14
#include "log.h"
13
18
 
14
19
 
15
20
/*********************************************************************
16
 
* FUNCTION: addSourceToRegistry(void)                                *
 
21
* FUNCTION: addSourceToRegistry(LPSTR pszAppname, LPSTR pszMsgDLL)   *
17
22
*                                                                    *
18
23
* PURPOSE: Add a source name key, message DLL name value, and        *
19
24
*          message type supported value to the registry              *
28
33
  HKEY hk;                      /* registry key handle */
29
34
  DWORD dwData;
30
35
  BOOL bSuccess;
 
36
  char   regarray[200];
 
37
  char *lpregarray = regarray;
31
38
 
32
39
  /* When an application uses the RegisterEventSource or OpenEventLog
33
40
     function to get a handle of an event log, the event loggging service
36
43
     under the Application key and adding registry values to the new
37
44
     subkey. */
38
45
 
 
46
  strcpy(lpregarray, "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\");
 
47
  strcat(lpregarray, pszAppname);
 
48
 
39
49
  /* Create a new key for our application */
40
 
  bSuccess = RegCreateKey(HKEY_LOCAL_MACHINE,
41
 
      "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\NTP", &hk);
 
50
  bSuccess = RegCreateKey(HKEY_LOCAL_MACHINE,lpregarray, &hk);
42
51
  PERR(bSuccess == ERROR_SUCCESS, "RegCreateKey");
43
52
 
44
53
  /* Add the Event-ID message-file name to the subkey. */