IoCreateSymbolicLink(): +Debug dump parameters.
[captive.git] / src / libcaptive / io / symlink.c
1 /* $Id$
2  * reactos spinlock emulation of libcaptive
3  * Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
4  * 
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; exactly version 2 of June 1991 is required
8  * 
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  * 
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19
20 #include "config.h"
21
22 #include "reactos/ddk/iofuncs.h"        /* self */
23 #include <glib/gmessages.h>
24 #include "captive/unicode.h"
25
26
27 /**
28  * IoCreateSymbolicLink:
29  * @SymbolicLinkName: Target registry key name.
30  * @DeviceName: Existing source registry key.
31  *
32  * Creates registry symbolic name from @DeviceName to @SymbolicLinkName.
33  * It is being used for example for dos-device-name filesystem aliases.
34  *
35  * Returns: libcaptive always returns error %STATUS_NOT_IMPLEMENTED.
36  */
37 NTSTATUS IoCreateSymbolicLink(PUNICODE_STRING SymbolicLinkName,PUNICODE_STRING DeviceName)
38 {
39         g_return_val_if_fail(SymbolicLinkName!=NULL,STATUS_INVALID_PARAMETER);
40         g_return_val_if_fail(DeviceName!=NULL,STATUS_INVALID_PARAMETER);
41
42         g_log(G_LOG_DOMAIN,G_LOG_LEVEL_DEBUG,"%s: SymbolicLinkName=%s,DeviceName=%s",G_STRLOC,
43                         captive_UnicodeString_to_utf8_alloca(SymbolicLinkName),
44                         captive_UnicodeString_to_utf8_alloca(DeviceName));
45
46         if (!strcmp(captive_UnicodeString_to_utf8_alloca(SymbolicLinkName),"\\DosDevices\\AscKmd")
47                         && !strcmp(captive_UnicodeString_to_utf8_alloca(DeviceName),"\\Device\\AscKmd"))
48                 return STATUS_SUCCESS;
49         if (!strcmp(captive_UnicodeString_to_utf8_alloca(SymbolicLinkName),"\\DosDevices\\Secdrv")
50                         && !strcmp(captive_UnicodeString_to_utf8_alloca(DeviceName),"\\Device\\Secdrv"))
51                 return STATUS_SUCCESS;
52
53         return STATUS_NOT_IMPLEMENTED;
54 }