The information in this article applies to:
SUMMARY
UNC names specify network-wide distinct locations that are useful to
provide configuration information for applications. However, when the UNC
name refers to the local computer, it introduces some overhead because the
requests are passed down the Redirector, looped back by the transport, and
sent to the server service instead of going directly to the local disk.
MORE INFORMATIONThe following file is available for download from the Microsoft
Download Center. Click the file name below to download the file: CheckLCL.exeFor more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. Limitations or Caveats
The GlpGetLocalPathName Function
To successfully execute the GlpGetLocalPathName function, you need to have
administrative or server operator privileges on Windows NT. Also, the
network should be running. The GlpGetLocalPathName function supports file,
pipe, and mailslot share names. It also supports the use of path names
longer than 260 characters (syntax \\?\ in CreateFile). For more
information, please see the header file.
PszInputName: The GlpGetLocalPathName function scans the name passed in pszInputName and tries to convert it to a local file path, if it's a UNC name referencing the local computer name. PpszOutputName: ppszOutputName contains the local path name if the return code is ERROR_GLP_SUCCESS. In any other case, the contents should be ignored. The GlpGetLocalPathName function will allocate memory if you pass a pointer to NULL. You should free the pointer using GlpFreeBuffer. PdwOutputNameLength: When you pass a pointer to memory in ppszOutputName, this parameter specifies the number of characters that can be stored there including the terminating NULL character. When the GlpGetLocalPathName function returns ERROR_GLP_SUCCESS, this pdwOutputNameLength variable contains the number of characters copied into the buffer. If the function returns ERROR_GLP_INSUFFICIENT_BUFFER or ERROR_GLP_INSUFFICIENT_MEMORY, the pdwOutputNameLength variable contains the number of characters needed to store the converted name. PdwLanManError: This optional parameter points to a DWORD that receives the error code returned by NetShareEnum if the return code is ERROR_GLP_LANMAN_ERROR. The value is not changed when NetShareEnum returns successfully. If you're not interested in this value, pass NULL to the function. GlpNetShareGetInfoPtr: If not NULL, this function pointer will be called instead of NetShareEnum. This gives the caller the possibility to provide the local name or to call some other API. The parameters passed are for a call to NetShareEnum with information level 2. Remember that this function is UNICODE only. The GlpFreeBuffer FunctionGlpFreeBuffer (PVOID *ppszBuffer);This function frees a pointer returned from GlpGetLocalPathName in the parameter ppszOutputName. The function sets the pointer to NULL after the memory is freed. The GlpGetBuffer FunctionGlpGetBuffer (PVOID *ppszBuffer, DWORD dwSizeNeeded);Use this function if you pass a pointer to your custom NetShareGetInfo function to GlpGetLocalPathNameW to allocate memory for the bufptr output parameter of NetShareGetInfo. GlpGetLocalPathNameW uses its GlpFreeBuffer function to free the memory. This function returns ERROR_GLP_SUCCESS on success and ERROR_GLP_INSUFFICIENT_MEMORY if there is not enough memory. Additional query words:
Keywords : kbfile kbnetwork kbsample kbAPI kbNTOS350 kbNTOS351 kbWinOS2000 kbSDKPlatform kbWinOS95 kbNetAPI kbGrpNet |
Last Reviewed: January 31, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |