INFO: ??? ??????? ?????? ?????????? ???????

?????? ????????? ?????? ?????????
???? ???????: 235128 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

???? ??????? ??? ??????? ??????? ??????? ????????? ???????? ????????? ????? ??? ??? ???? Windows NT ????? ? ?? ???? ??????? ??? ??? ???? MS-DOS. ??? ??? ??????? ?? ????? ????? ????? ???????? Windows NT. ????? ??????? Windows NT ???? ????? ????? ??? kernel ????? ??????? NT, ??? ?? ?????? ??????? Win32 ????? ??????? MS-DOS. ??? ???? MS-DOS ?????? ???? ??? ??? ???? NT ???????. ???? ??? ??????? ????? ??????? ?????????? ??????? ? ??? ???? ??????? Win32 ????? ?????????? ??????? ????????.

??????? ????

????? ??????? NT ?????

??? ????? ?????? ???? kernel-??? ??????? ?? ????? ????? ??? ???? ?? ????? ???????? Windows NT. ???? ??? ??? ????? ??? ???? Windows NT. ???? ?????? ??? kernel ?? Windows NT ?????? ????? ??? kernel ??????? ?????? ????? ????? Windows NT ?????? ???. ???? ????? ??? \Device\CDRom0 \Device\Serial0 ??? ??????? ?? ????? ?????? ?? ???? \device ?? ????? ??? ????? ????????.

?? ???? ??????? ??????? Win32 ??? ????? ????? Windows NT ????? ??? ??????? ?????? ??? ?????? ?????? Win32 ? Win32 API ????? ???? ?????? ??????? ???????? ? ????? ??????? MS-DOS ??? COM1 A: C: ?: ? ? LPT1:. ??? ????? ?? ?? ??????? Win32 ?? ???? ??????? ????? ????? Windows NT ? ?????? ??? ???? ????? ??? ?????? ????? ??????? MS-DOS ?????? ??? ???????. ???? ?? ????? ??? ?????? Windows NT ????? ???????? ??? ??? ???? MS-DOS. ???? ???????? ???????? ?????? ?? ???? "?????????? ???????" ?? ??? ??????? ????? ?????? ????.

?????? ??? ???? ??? ?? ????? ????? ???????? ????? ????? ??? ?????? ?????? ???????? ? ????? ??? ????? ????? ????? ???????? ???????? ???? WinObj.exe ?? Platform SDK.

????? ??????? MS-DOS

?????? ??????? Win32 ??? ??????? ????????? ???? ????? ???? MS-DOS ??????? ????????? ??????? ???????. ?????? ??????? ??? ???? ?????? ??????? ??? A: C:. ??? ????? ??? COM1 ?????? ???????? ?????????: ? COM2: ? ? LPT1:. ??? ????? ????? Windows NT ? ??? ??????? ???????? ?? ????? ??? "????? ????????" ? ???? ?? \ ?? ?????? ???? ???? ?????? ??????? Win32 ??? ????????.

?? ???? ????? ??????? MS-DOS ?????? ?? ????? ????? Windows NT ?? ??? ????????? ?????? ????? ????? Windows NT kernel ?? ????? kernel. ????? ????? ??? ??????? ??? ????? ????? Windows NT ???? ???? ??????? ????? Win32 ???? ?????? ??????? ?????? ?????? ??????; ??? ???? ??????? COM1: ??? ?????? ??? ????? Windows NT. ????? ????? ??????? MS-DOS ???? "?????????? ???????" ??? ????? ????? Windows NT. ??? ????? ??? ???? MS-DOS ?? ???? ????? ????? \ ?? ???? ??? ??? ???? Windows NT ?? ?????? \device ????? ???????? ???????.

???? ??????? ?? ??? ???? MS-DOS ??? ?????? ????? Windows NT ???? ????. ??? ???? ???? ??? ????? ??????? MS-DOS ?????? ??? ???? ????. ??? ???? ??????? ????? ???? ??????? C: ??? ??? ??? ????, ??? ?????? ?? ???? ???? ???? ????? ?? ???? ?? ?????? ???????? ??? D: ? E: Z: ? ??? ??? ??? ?????.

?????????? ???????

????? ?????????? ??????? ???? ?? ??????? ?? ??? ?????? ???? ????? ????? ????????? ???? ?? ??????? ?? ???????. ????? ?? ??????? ????? ?????????? ??????? ?? API DefineDosDevice(). ???? ??? ?????????? ??? ??? ??? ????? ????? ????????? ?? ????? ????? ??? ??? ????? ?????? ??????? ???? ????? ??? ??????? ??? ??????????.

???? ?? ???? ???? ??? ?????????? ??????? ??? ??? ???? Windows NT. ??? ???? ????? ????? ??? ???? MS-DOS ???? ???? ?????? ????? ????? ??? ?????? Windows NT ???????? ??? ???. ????? ???? ????? ?????????? ??????? ?????? ????? ???? ?????? ??????? ?????? ???? ????? ?????? ???? ???? ???? ???? ?????? ??????? ???????? ??? ??? ??? ????? ????? ?????? ?? ????? ?????.

???? ??????? ??????? Win32 ??? ?????? Windows NT ???? ????? ??? ???? MS-DOS ????? ?????? QueryDosDevice() ????????? ?? ??? ???? MS-DOS. ?????? ?? ??? ???? ???? ????? ?????? ????:
char szNtDeviceName[MAX_PATH];

if (QueryDosDevice ("C:", szNtDeviceName, MAX_PATH))
{
   printf ("C: is linked to %s\n", szNtDeviceName);
}
				
??????? Win32 ????? ???? ?????????? ??????? ?? ???? ??????? DefineDosDevice(). ?????? ?????? ???? ??????? DefineDosDevice ????? DDD_RAW_TARGET_PATH. ?????? ?????? ???? ??????? ?? ???????? DDD_REMOVE_DEFINITION ? DDD_RAW_TARGET_PATH. ???? ????? ???????? ?????? ?? ?? ??? ????????:
/*
   DDD

      This sample shows how to associate an MS-DOS device name with a 
      Windows NT device name. The association is a symbolic link between
      device names stored in the Object Manager's namespace. Applications
      use the MS-DOS device name, but Windows NT and kernel-mode drivers
      use the Windows NT device name.  

   Usage:
      ddd <MS-DOS Device Name> <NT Device Name>
      ddd -r <MS-DOS Device Name>

   NOTE: If the MS-DOS device name is a driver letter, the trailing 
   backlash is not accepted by DefineDosDevice or QueryDosDevice.

   NOTE: The MS-DOS device name is defined only until the computer is 
   restarted.

   To make the drive letter associations permanent on Window NT 4.0, you
   have to update HKEY_LOCAL_MACHINE\SYSTEM\DISK\Information. However, 
   the contents of the value are undocumented. 

   On Windows 2000, you have to use the Volume Mount Point APIs.
*/ 

#define WIN32_LEAN_AND_MEAN /* Reduce number of system headers parsed */ 
                            /* during build. */ 

#include <windows.h>
#include <stdio.h>

void main (int argc, char **argv)
{
   char * pszDosDeviceName,
        * pszNtDeviceName;

   bool  fRemoveDeviceName = false;
   bool  fResult;

   /*
      Command-line parsing.
        1) Make sure correct number of arguments are supplied.
        2) See if you should add or remove the MS-DOS Device Name.
   */ 
   if (argc != 3)
   {
      printf("\nusage: %s <DOS device name> <NT device name>    to add\n",
             argv[0]);
      printf("usage: %s [-r] <DOS device name>                to remove\n",
             argv[0]);
      printf("\n\texample: %s d: \\device\\cdrom0\n", argv[0]);
      return;
   }

   fRemoveDeviceName = !lstrcmpi (argv[1], "-r");


   /* Now, add/remove the DOS device name. */ 
   if (fRemoveDeviceName)
   {
      /*
         Remove the MS-DOS device name. First, get the name of the Windows
         NT device from the symbolic link, then delete the symbolic link.
         
      */ 
      pszDosDeviceName = argv[2];

      pszNtDeviceName = (char *)LocalAlloc (LPTR, MAX_PATH);

      fResult = QueryDosDevice (pszDosDeviceName, pszNtDeviceName,
                                MAX_PATH);
      if (fResult)
      {
         fResult = DefineDosDevice (DDD_RAW_TARGET_PATH|
                                    DDD_REMOVE_DEFINITION|
                                    DDD_EXACT_MATCH_ON_REMOVE,
                                    pszDosDeviceName, pszNtDeviceName);
      }
      if (!fResult)
         printf("error %lu: could not remove %s\n",
                GetLastError(), pszDosDeviceName);

      LocalFree (pszNtDeviceName);
   }
   else
   {
      /* Add the DOS device name */ 

      pszDosDeviceName = argv[1];
      pszNtDeviceName  = argv[2];

      fResult = DefineDosDevice (DDD_RAW_TARGET_PATH, pszDosDeviceName,
                                 pszNtDeviceName);
      if (!fResult)
         printf("error %lu: could not link %s to %s\n",
                GetLastError(), pszDosDeviceName, pszNtDeviceName);
   }

}
				

???????

???? ???????: 235128 - ????? ??? ??????: 30/????/1427 - ??????: 4.1
????? ???
  • Microsoft Win32 ????? ????? ???????, ????? ?????? ??:
    • Microsoft Windows NT 4.0
    • the operating system: Microsoft Windows 2000
    • the operating system: Microsoft Windows XP
????? ??????: 
kbmt kbinfo kbkernbase KB235128 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????235128

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com