symlink-win.cpp revision b06e6c768b741a16534846e399da98ffc59693db
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * IPRT - Symbolic Links, Windows.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Copyright (C) 2010 Oracle Corporation
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * available from http://www.virtualbox.org. This file is free software;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * you can redistribute it and/or modify it under the terms of the GNU
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * General Public License (GPL) as published by the Free Software
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * The contents of this file may alternatively be used under the terms
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * of the Common Development and Distribution License Version 1.0
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * VirtualBox OSE distribution, in which case the provisions of the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * CDDL are applicable instead of those of the GPL.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * You may elect to license modified versions of this file under the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * terms and conditions of either the GPL or the CDDL or both.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/*******************************************************************************
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync* Header Files *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync*******************************************************************************/
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/*******************************************************************************
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync* Structures and Typedefs *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync*******************************************************************************/
#define MY_FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS)
bool fRc = false;
return fRc;
bool fRc = false;
if (fRc)
return fRc;
AssertReturn(enmType > RTSYMLINKTYPE_INVALID && enmType < RTSYMLINKTYPE_END, VERR_INVALID_PARAMETER);
if (!s_fTried)
if (hmod)
if (pfn)
s_fTried = true;
if (!s_pfnCreateSymbolicLinkW)
LogFlow(("RTSymlinkCreate(%p={%s}, %p={%s}, %d): returns VERR_NOT_SUPPORTED - Windows API not found\n",
return VERR_NOT_SUPPORTED;
offFromEnd++;
else if (cchVolSpecTarget)
LogFlow(("RTSymlinkCreate(%p={%s}, %p={%s}, %d): returns %Rrc\n", pszSymlink, pszSymlink, pszTarget, pszTarget, enmType, rc));
return rc;
if (fRc)
return rc;
char *pszMyTarget;
return rc;
NULL,
NULL);
&u.Buf,
sizeof(u) - sizeof(WCHAR),
LogFlow(("RTSymlinkReadA(%p={%s},%p): returns %Rrc *ppszTarget=%p:{%s}\n", pszSymlink, pszSymlink, ppszTarget, rc, *ppszTarget, *ppszTarget));
return rc;