EnableExplicit

Procedure.i DeleteVolumeMountPoint(lpszVolumeMountPoint.s)
  Define.i xLong1

  If Mid(lpszVolumeMountPoint, 2, 1) = ":"
    If Not Right(lpszVolumeMountPoint, 1) = "\"
      lpszVolumeMountPoint + "\"
      EndIf
    xLong1 = GetModuleHandle_("kernel32.dll")
    If xLong1
      xLong1 = GetProcAddress(xLong1, "DeleteVolumeMountPointW")
      If xLong1
        CompilerIf #PB_Compiler_Unicode
          xLong1 = CallFunctionFast(xLong1, @lpszVolumeMountPoint)
          CompilerElse
          PokeS(*ptrTemp, lpszVolumeMountPoint, -1, #PB_Unicode)
          xLong1 = CallFunctionFast(xLong1, *ptrTemp)
;PrintN(Str(GetLastError_()))
          CompilerEndIf
        EndIf
      EndIf
    EndIf
  ProcedureReturn xLong1
  EndProcedure

; IDE Options = PureBasic 5.31 (Windows - x86)
; CursorPosition = 18
; Folding = -
; EnableAsm
; EnableXP
; CompileSourceDirectory
; EnablePurifier