winnt-dont-display-ibm-legal-message-20040326
[openafs.git] / src / WINNT / afsreg / test / dupkey.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /* Test of RegDupKeyAlt() */
11
12 #include <afs/param.h>
13 #include <afs/stds.h>
14
15 #include <windows.h>
16 #include <stddef.h>
17 #include <stdlib.h>
18 #include <stdio.h>
19
20 #include <WINNT/afsreg.h>
21
22 int main(int argc, char *argv[])
23 {
24     long status;
25
26     if (argc != 3) {
27         printf("Usage: %s key1 key2\n", argv[0]);
28         return 1;
29     }
30
31     status = RegDupKeyAlt(argv[1], argv[2]);
32
33     if (status == ERROR_SUCCESS) {
34         printf("Registry key duplication succeeded\n");
35     } else {
36         printf("Registry key duplication failed (%d)\n", status);
37     }
38 }