1 /* NFSv4.1 client for Windows
2 * Copyright © 2012 The Regents of the University of Michigan
4 * Olga Kornievskaia <aglo@umich.edu>
5 * Casey Bodley <cbodley@umich.edu>
7 * This library is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; either version 2.1 of the License, or (at
10 * your option) any later version.
12 * This library is distributed in the hope that it will be useful, but
13 * without any warranty; without even the implied warranty of merchantability
14 * or fitness for a particular purpose. See the GNU Lesser General Public
15 * License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA
27 #include "nfs41_driver.h"
32 #define DbgP(_x_) NFS41DbgPrint _x_
36 #define TRACE_TAG L"[NFS41_NP]"
37 #define WNNC_DRIVER( major, minor ) ( major * 0x00010000 + minor )
40 ULONG _cdecl
NFS41DbgPrint( __in LPTSTR Format
, ... )
46 va_start( marker
, Format
);
49 //StringCchVPrintfW( szbuffer, 127, Format, marker );
50 StringCchVPrintfW( szbuffer
, 256, Format
, marker
);
51 szbuffer
[255] = (TCHAR
)0;
52 OutputDebugString( TRACE_TAG
);
53 OutputDebugString( szbuffer
);
59 int filter(unsigned int code
)
61 DbgP((L
"####Got exception %u\n", code
));
62 return EXCEPTION_CONTINUE_SEARCH
;
74 This routine opens the shared memory for exclusive manipulation
78 phMutex - the mutex handle
80 phMemory - the memory handle
82 pMemory - a ptr. to the shared memory which is set if successful
86 WN_SUCCESS -- if successful
96 *phMutex
= CreateMutex(NULL
, FALSE
, TEXT(NFS41NP_MUTEX_NAME
));
99 dwStatus
= GetLastError();
100 DbgP((TEXT("OpenSharedMemory: OpenMutex failed\n")));
101 goto OpenSharedMemoryAbort1
;
104 WaitForSingleObject(*phMutex
, INFINITE
);
106 *phMemory
= OpenFileMapping(FILE_MAP_WRITE
,
108 TEXT(NFS41_USER_SHARED_MEMORY_NAME
));
109 if (*phMemory
== NULL
)
111 dwStatus
= GetLastError();
112 DbgP((TEXT("OpenSharedMemory: OpenFileMapping failed\n")));
113 goto OpenSharedMemoryAbort2
;
116 *pMemory
= MapViewOfFile(*phMemory
, FILE_MAP_WRITE
, 0, 0, 0);
117 if (*pMemory
== NULL
)
119 dwStatus
= GetLastError();
120 DbgP((TEXT("OpenSharedMemory: MapViewOfFile failed\n")));
121 goto OpenSharedMemoryAbort3
;
124 return ERROR_SUCCESS
;
126 OpenSharedMemoryAbort3
:
127 CloseHandle(*phMemory
);
129 OpenSharedMemoryAbort2
:
130 ReleaseMutex(*phMutex
);
131 CloseHandle(*phMutex
);
134 OpenSharedMemoryAbort1
:
135 DbgP((TEXT("OpenSharedMemory: return dwStatus: %d\n"), dwStatus
));
149 This routine relinquishes control of the shared memory after exclusive
154 hMutex - the mutex handle
156 hMemory - the memory handle
158 pMemory - a ptr. to the shared memory which is set if successful
166 UnmapViewOfFile(*pMemory
);
171 CloseHandle(*hMemory
);
176 if (ReleaseMutex(*hMutex
) == FALSE
)
178 DbgP((TEXT("CloseSharedMemory: ReleaseMutex error: %d\n"), GetLastError()));
180 CloseHandle(*hMutex
);
185 static DWORD
StoreConnectionInfo(
186 IN LPCWSTR LocalName
,
187 IN LPCWSTR ConnectionName
,
188 IN USHORT ConnectionNameLength
,
189 IN LPNETRESOURCE lpNetResource
)
192 HANDLE hMutex
, hMemory
;
193 PNFS41NP_SHARED_MEMORY pSharedMemory
;
194 PNFS41NP_NETRESOURCE pNfs41NetResource
;
196 BOOLEAN FreeEntryFound
= FALSE
;
199 status
= OpenSharedMemory(&hMutex
, &hMemory
, (PVOID
*)&pSharedMemory
);
201 status
= OpenSharedMemory(&hMutex
, &hMemory
, &(PVOID
)pSharedMemory
);
206 DbgP((TEXT("StoreConnectionInfo: NextIndex %d, NumResources %d\n"),
207 pSharedMemory
->NextAvailableIndex
,
208 pSharedMemory
->NumberOfResourcesInUse
));
210 for (Index
= 0; Index
< pSharedMemory
->NextAvailableIndex
; Index
++)
212 if (!pSharedMemory
->NetResources
[Index
].InUse
)
214 FreeEntryFound
= TRUE
;
215 DbgP((TEXT("Reusing existing index %d\n"), Index
));
222 if (pSharedMemory
->NextAvailableIndex
>= NFS41NP_MAX_DEVICES
) {
223 status
= WN_NO_MORE_DEVICES
;
226 Index
= pSharedMemory
->NextAvailableIndex
++;
227 DbgP((TEXT("Using new index %d\n"), Index
));
230 pSharedMemory
->NumberOfResourcesInUse
+= 1;
232 pNfs41NetResource
= &pSharedMemory
->NetResources
[Index
];
234 pNfs41NetResource
->InUse
= TRUE
;
235 pNfs41NetResource
->dwScope
= lpNetResource
->dwScope
;
236 pNfs41NetResource
->dwType
= lpNetResource
->dwType
;
237 pNfs41NetResource
->dwDisplayType
= lpNetResource
->dwDisplayType
;
238 pNfs41NetResource
->dwUsage
= RESOURCEUSAGE_CONNECTABLE
;
239 pNfs41NetResource
->LocalNameLength
= (USHORT
)(wcslen(LocalName
) + 1) * sizeof(WCHAR
);
240 pNfs41NetResource
->RemoteNameLength
= (USHORT
)(wcslen(lpNetResource
->lpRemoteName
) + 1) * sizeof(WCHAR
);
241 pNfs41NetResource
->ConnectionNameLength
= ConnectionNameLength
;
243 StringCchCopy(pNfs41NetResource
->LocalName
,
244 pNfs41NetResource
->LocalNameLength
,
246 StringCchCopy(pNfs41NetResource
->RemoteName
,
247 pNfs41NetResource
->RemoteNameLength
,
248 lpNetResource
->lpRemoteName
);
249 StringCchCopy(pNfs41NetResource
->ConnectionName
,
250 pNfs41NetResource
->ConnectionNameLength
,
253 // TODO: copy mount options -cbodley
257 CloseSharedMemory(&hMutex
, &hMemory
, (PVOID
*)&pSharedMemory
);
259 CloseSharedMemory(&hMutex
, &hMemory
, &(PVOID
)pSharedMemory
);
268 IN PVOID InputDataBuf
,
269 IN ULONG InputDataLen
,
270 IN PVOID OutputDataBuf
,
271 IN PULONG pOutputDataLen
)
273 HANDLE DeviceHandle
; // The mini rdr device handle
278 DbgP((L
"[aglo] calling CreateFile\n"));
279 DeviceHandle
= CreateFile(
280 NFS41_USER_DEVICE_NAME
,
281 GENERIC_READ
| GENERIC_WRITE
,
282 FILE_SHARE_READ
| FILE_SHARE_WRITE
,
283 (LPSECURITY_ATTRIBUTES
)NULL
,
288 DbgP((L
"[aglo] after CreateFile Device Handle\n"));
289 if ( INVALID_HANDLE_VALUE
!= DeviceHandle
)
292 DbgP((L
"[aglo] calling DeviceIoControl\n"));
293 rc
= DeviceIoControl(
302 } _SEH2_EXCEPT(_SEH2_GetExceptionCode()) {
303 DbgP((L
"#### In except\n"));
305 DbgP((L
"[aglo] returned from DeviceIoControl %08lx\n", rc
));
308 DbgP((L
"[aglo] SendTo_NFS41Driver: returning error from DeviceIoctl\n"));
309 Status
= GetLastError( );
313 DbgP((L
"[aglo] SendTo_NFS41Driver: The DeviceIoctl call succeded\n"));
315 CloseHandle(DeviceHandle
);
319 Status
= GetLastError( );
320 DbgP((L
"[aglo] SendTo_NFS41Driver: error %08lx opening device \n", Status
));
322 DbgP((L
"[aglo] returned from SendTo_NFS41Driver %08lx\n", Status
));
333 DbgP(( L
"[aglo] GetNetCaps %d\n", nIndex
));
337 case WNNC_SPEC_VERSION
:
338 rc
= WNNC_SPEC_VERSION51
;
342 rc
= WNNC_NET_RDR2SAMPLE
;
345 case WNNC_DRIVER_VERSION
:
346 rc
= WNNC_DRIVER(1, 0);
349 case WNNC_CONNECTION
:
350 rc
= WNNC_CON_GETCONNECTIONS
|
351 WNNC_CON_CANCELCONNECTION
|
352 WNNC_CON_ADDCONNECTION
|
353 WNNC_CON_ADDCONNECTION3
;
356 case WNNC_ENUMERATION
:
357 rc
= WNNC_ENUM_LOCAL
;
377 __in PLUID lpLogonId
,
378 __in PCWSTR lpAuthentInfoType
,
379 __in PVOID lpAuthentInfo
,
380 __in PCWSTR lpPreviousAuthentInfoType
,
381 __in PVOID lpPreviousAuthentInfo
,
382 __in PWSTR lpStationName
,
383 __in PVOID StationHandle
,
384 __out PWSTR
*lpLogonScript
)
386 *lpLogonScript
= NULL
;
387 DbgP(( L
"[aglo] NPLogonNotify: returning WN_SUCCESS\n" ));
392 NPPasswordChangeNotify (
393 __in LPCWSTR lpAuthentInfoType
,
394 __in LPVOID lpAuthentInfo
,
395 __in LPCWSTR lpPreviousAuthentInfoType
,
396 __in LPVOID lpPreviousAuthentInfo
,
397 __in LPWSTR lpStationName
,
398 LPVOID StationHandle
,
401 DbgP(( L
"[aglo] NPPasswordChangeNotify: WN_NOT_SUPPORTED\n" ));
402 SetLastError( WN_NOT_SUPPORTED
);
403 return WN_NOT_SUPPORTED
;
410 __in LPNETRESOURCE lpNetResource
,
411 __in_opt LPWSTR lpPassword
,
412 __in_opt LPWSTR lpUserName
,
418 __in LPNETRESOURCE lpNetResource
,
419 __in_opt LPWSTR lpPassword
,
420 __in_opt LPWSTR lpUserName
)
422 return NPAddConnection3( NULL
, lpNetResource
, lpPassword
, lpUserName
, 0 );
428 __in LPNETRESOURCE lpNetResource
,
429 __in_opt LPWSTR lpPassword
,
430 __in_opt LPWSTR lpUserName
,
434 WCHAR wszScratch
[128];
437 CONNECTION_INFO Connection
;
438 LPWSTR ConnectionName
;
439 WCHAR ServerName
[MAX_PATH
];
443 DbgP(( L
"[aglo] NPAddConnection3('%s', '%s')\n",
444 lpNetResource
->lpLocalName
, lpNetResource
->lpRemoteName
));
445 DbgP(( L
"[aglo] username = '%s', passwd = '%s'\n", lpUserName
, lpPassword
));
447 Status
= InitializeConnectionInfo(&Connection
,
448 (PMOUNT_OPTION_BUFFER
)lpNetResource
->lpComment
,
451 DbgP(( L
"InitializeConnectionInfo failed with %d\n", Status
));
455 // \device\miniredirector\;<DriveLetter>:\Server\Share
457 // local name, must start with "X:"
458 if (lstrlen(lpNetResource
->lpLocalName
) < 2 ||
459 lpNetResource
->lpLocalName
[1] != L
':') {
460 Status
= WN_BAD_LOCALNAME
;
464 LocalName
[0] = (WCHAR
) toupper(lpNetResource
->lpLocalName
[0]);
466 LocalName
[2] = L
'\0';
467 StringCchCopyW( ConnectionName
, MAX_PATH
, NFS41_DEVICE_NAME
);
468 StringCchCatW( ConnectionName
, MAX_PATH
, L
"\\;" );
469 StringCchCatW( ConnectionName
, MAX_PATH
, LocalName
);
471 // remote name, must start with "\\"
472 if (lpNetResource
->lpRemoteName
[0] == L
'\0' ||
473 lpNetResource
->lpRemoteName
[0] != L
'\\' ||
474 lpNetResource
->lpRemoteName
[1] != L
'\\') {
475 Status
= WN_BAD_NETNAME
;
479 /* note: remotename comes as \\server but we need to add \server thus +1 pointer */
480 p
= lpNetResource
->lpRemoteName
+ 1;
481 ServerName
[0] = L
'\\';
484 /* convert servername ending unix slash to windows slash */
487 /* deal with servername ending with any slash */
490 ServerName
[i
] = p
[i
];
491 if (p
[i
] == L
'\\') break;
494 ServerName
[i
] = L
'\0';
495 StringCchCatW( ConnectionName
, MAX_PATH
, ServerName
);
496 /* insert the "nfs4" in between the server name and the path,
497 * just to make sure all calls to our driver come thru this */
498 StringCchCatW( ConnectionName
, MAX_PATH
, L
"\\nfs4" );
500 #ifdef CONVERT_2_UNIX_SLASHES
501 /* convert all windows slashes to unix slashes */
506 if(q
[j
] == L
'\0') break;
507 if (q
[j
] == L
'\\') q
[j
] = L
'/';
512 /* convert all unix slashes to windows slashes */
517 if(q
[j
] == L
'\0') break;
518 if (q
[j
] == L
'/') q
[j
] = L
'\\';
523 StringCchCatW( ConnectionName
, MAX_PATH
, &p
[i
]);
524 DbgP(( L
"[aglo] Full Connect Name: %s\n", ConnectionName
));
525 DbgP(( L
"[aglo] Full Connect Name Length: %d %d\n",
526 (wcslen(ConnectionName
) + 1) * sizeof(WCHAR
),
527 (lstrlen(ConnectionName
) + 1) * sizeof(WCHAR
)));
529 if ( QueryDosDevice( LocalName
, wszScratch
, 128 )
530 || GetLastError() != ERROR_FILE_NOT_FOUND
) {
531 Status
= WN_ALREADY_CONNECTED
;
535 MarshalConnectionInfo(&Connection
);
537 Status
= SendTo_NFS41Driver( IOCTL_NFS41_ADDCONN
,
538 Connection
.Buffer
, Connection
.BufferSize
,
541 DbgP(( L
"[aglo] SendTo_NFS41Driver failed with %d\n", Status
));
545 DbgP(( L
"[aglo] calling DefineDosDevice\n"));
546 if ( !DefineDosDevice( DDD_RAW_TARGET_PATH
|
547 DDD_NO_BROADCAST_SYSTEM
,
548 lpNetResource
->lpLocalName
,
550 Status
= GetLastError();
551 DbgP(( L
"[aglo] DefineDosDevice failed with %d\n", Status
));
555 // The connection was established and the local device mapping
556 // added. Include this in the list of mapped devices.
557 Status
= StoreConnectionInfo(LocalName
, ConnectionName
,
558 Connection
.Buffer
->NameLength
, lpNetResource
);
560 DbgP(( L
"[aglo] StoreConnectionInfo failed with %d\n", Status
));
565 FreeConnectionInfo(&Connection
);
566 DbgP(( L
"[aglo] NPAddConnection3: status %08X\n", Status
));
569 DefineDosDevice(DDD_REMOVE_DEFINITION
| DDD_RAW_TARGET_PATH
|
570 DDD_EXACT_MATCH_ON_REMOVE
, LocalName
, ConnectionName
);
572 SendTo_NFS41Driver(IOCTL_NFS41_DELCONN
, ConnectionName
,
573 Connection
.Buffer
->NameLength
, NULL
, &CopyBytes
);
584 HANDLE hMutex
, hMemory
;
585 PNFS41NP_SHARED_MEMORY pSharedMemory
;
587 DbgP((TEXT("NPCancelConnection\n")));
588 DbgP((TEXT("NPCancelConnection: ConnectionName: %S\n"), lpName
));
590 Status
= OpenSharedMemory( &hMutex
,
592 (PVOID
)&pSharedMemory
);
594 if (Status
== WN_SUCCESS
)
597 PNFS41NP_NETRESOURCE pNetResource
;
598 Status
= WN_NOT_CONNECTED
;
600 DbgP((TEXT("NPCancelConnection: NextIndex %d, NumResources %d\n"),
601 pSharedMemory
->NextAvailableIndex
,
602 pSharedMemory
->NumberOfResourcesInUse
));
604 for (Index
= 0; Index
< pSharedMemory
->NextAvailableIndex
; Index
++)
606 pNetResource
= &pSharedMemory
->NetResources
[Index
];
608 if (pNetResource
->InUse
)
610 if ( ( (wcslen(lpName
) + 1) * sizeof(WCHAR
) ==
611 pNetResource
->LocalNameLength
)
612 && ( !wcscmp(lpName
, pNetResource
->LocalName
) ))
616 DbgP((TEXT("NPCancelConnection: Connection Found:\n")));
620 Status
= SendTo_NFS41Driver( IOCTL_NFS41_DELCONN
,
621 pNetResource
->ConnectionName
,
622 pNetResource
->ConnectionNameLength
,
626 if (Status
!= WN_SUCCESS
)
628 DbgP((TEXT("NPCancelConnection: SendToMiniRdr returned Status %lx\n"),Status
));
632 if (DefineDosDevice(DDD_REMOVE_DEFINITION
| DDD_RAW_TARGET_PATH
| DDD_EXACT_MATCH_ON_REMOVE
,
634 pNetResource
->ConnectionName
) == FALSE
)
636 DbgP((TEXT("RemoveDosDevice: DefineDosDevice error: %d\n"), GetLastError()));
637 Status
= GetLastError();
641 pNetResource
->InUse
= FALSE
;
642 pSharedMemory
->NumberOfResourcesInUse
--;
644 if (Index
+1 == pSharedMemory
->NextAvailableIndex
)
645 pSharedMemory
->NextAvailableIndex
--;
650 DbgP((TEXT("NPCancelConnection: Name %S EntryName %S\n"),
651 lpName
,pNetResource
->LocalName
));
652 DbgP((TEXT("NPCancelConnection: Name Length %d Entry Name Length %d\n"),
654 pNetResource
->LocalNameLength
,pNetResource
->LocalName
));
656 (wcslen(lpName
) + 1) * sizeof(WCHAR
), pNetResource
->LocalNameLength
));
662 CloseSharedMemory( &hMutex
,
664 (PVOID
)&pSharedMemory
);
672 __in LPWSTR lpLocalName
,
673 __out_bcount(*lpBufferSize
) LPWSTR lpRemoteName
,
674 __inout LPDWORD lpBufferSize
)
678 HANDLE hMutex
, hMemory
;
679 PNFS41NP_SHARED_MEMORY pSharedMemory
;
681 Status
= OpenSharedMemory( &hMutex
,
683 (PVOID
)&pSharedMemory
);
685 if (Status
== WN_SUCCESS
)
688 PNFS41NP_NETRESOURCE pNetResource
;
689 Status
= WN_NOT_CONNECTED
;
691 for (Index
= 0; Index
< pSharedMemory
->NextAvailableIndex
; Index
++)
693 pNetResource
= &pSharedMemory
->NetResources
[Index
];
695 if (pNetResource
->InUse
)
697 if ( ( (wcslen(lpLocalName
) + 1) * sizeof(WCHAR
) ==
698 pNetResource
->LocalNameLength
)
699 && ( !wcscmp(lpLocalName
, pNetResource
->LocalName
) ))
701 if (*lpBufferSize
< pNetResource
->RemoteNameLength
)
703 *lpBufferSize
= pNetResource
->RemoteNameLength
;
704 Status
= WN_MORE_DATA
;
708 *lpBufferSize
= pNetResource
->RemoteNameLength
;
709 CopyMemory( lpRemoteName
,
710 pNetResource
->RemoteName
,
711 pNetResource
->RemoteNameLength
);
719 CloseSharedMemory( &hMutex
, &hMemory
, (PVOID
)&pSharedMemory
);
730 LPNETRESOURCE lpNetResource
,
735 DbgP((L
"[aglo] NPOpenEnum\n"));
741 case RESOURCE_CONNECTED
:
743 *lphEnum
= HeapAlloc( GetProcessHeap( ), HEAP_ZERO_MEMORY
, sizeof( ULONG
) );
751 Status
= WN_OUT_OF_MEMORY
;
757 case RESOURCE_CONTEXT
:
759 Status
= WN_NOT_SUPPORTED
;
764 DbgP((L
"[aglo] NPOpenEnum returning Status %lx\n",Status
));
774 LPDWORD lpBufferSize
)
776 DWORD Status
= WN_SUCCESS
;
778 LPNETRESOURCE pNetResource
;
779 ULONG SpaceNeeded
= 0;
780 ULONG SpaceAvailable
;
782 HANDLE hMutex
, hMemory
;
783 PNFS41NP_SHARED_MEMORY pSharedMemory
;
784 PNFS41NP_NETRESOURCE pNfsNetResource
;
785 INT Index
= *(PULONG
)hEnum
;
788 DbgP((L
"[aglo] NPEnumResource\n"));
790 DbgP((L
"[aglo] NPEnumResource Count Requested %d\n", *lpcCount
));
792 pNetResource
= (LPNETRESOURCE
) lpBuffer
;
793 SpaceAvailable
= *lpBufferSize
;
795 StringZone
= (PWCHAR
) ((PBYTE
)lpBuffer
+ *lpBufferSize
);
797 Status
= OpenSharedMemory( &hMutex
,
799 (PVOID
)&pSharedMemory
);
801 if ( Status
== WN_SUCCESS
)
803 Status
= WN_NO_MORE_ENTRIES
;
804 for (Index
= *(PULONG
)hEnum
; EntriesCopied
< *lpcCount
&&
805 Index
< pSharedMemory
->NextAvailableIndex
; Index
++)
807 pNfsNetResource
= &pSharedMemory
->NetResources
[Index
];
809 if (pNfsNetResource
->InUse
)
811 SpaceNeeded
= sizeof( NETRESOURCE
);
812 SpaceNeeded
+= pNfsNetResource
->LocalNameLength
;
813 SpaceNeeded
+= pNfsNetResource
->RemoteNameLength
;
814 SpaceNeeded
+= 5 * sizeof(WCHAR
); // comment
815 SpaceNeeded
+= sizeof(NFS41_PROVIDER_NAME_U
); // provider name
816 if ( SpaceNeeded
> SpaceAvailable
)
818 Status
= WN_MORE_DATA
;
819 DbgP((L
"[aglo] NPEnumResource More Data Needed - %d\n", SpaceNeeded
));
820 *lpBufferSize
= SpaceNeeded
;
825 SpaceAvailable
-= SpaceNeeded
;
827 pNetResource
->dwScope
= pNfsNetResource
->dwScope
;
828 pNetResource
->dwType
= pNfsNetResource
->dwType
;
829 pNetResource
->dwDisplayType
= pNfsNetResource
->dwDisplayType
;
830 pNetResource
->dwUsage
= pNfsNetResource
->dwUsage
;
832 // setup string area at opposite end of buffer
833 SpaceNeeded
-= sizeof( NETRESOURCE
);
834 StringZone
= (PWCHAR
)( (PBYTE
) StringZone
- SpaceNeeded
);
836 StringCchCopy( StringZone
,
837 pNfsNetResource
->LocalNameLength
,
838 pNfsNetResource
->LocalName
);
839 pNetResource
->lpLocalName
= StringZone
;
840 StringZone
+= pNfsNetResource
->LocalNameLength
/sizeof(WCHAR
);
842 StringCchCopy( StringZone
,
843 pNfsNetResource
->RemoteNameLength
,
844 pNfsNetResource
->RemoteName
);
845 pNetResource
->lpRemoteName
= StringZone
;
846 StringZone
+= pNfsNetResource
->RemoteNameLength
/sizeof(WCHAR
);
848 pNetResource
->lpComment
= StringZone
;
849 *StringZone
++ = L
'A';
850 *StringZone
++ = L
'_';
851 *StringZone
++ = L
'O';
852 *StringZone
++ = L
'K';
853 *StringZone
++ = L
'\0';
854 // copy provider name
855 pNetResource
->lpProvider
= StringZone
;
856 StringCbCopyW( StringZone
, sizeof(NFS41_PROVIDER_NAME_U
), NFS41_PROVIDER_NAME_U
);
857 StringZone
+= sizeof(NFS41_PROVIDER_NAME_U
)/sizeof(WCHAR
);
859 // set new bottom of string zone
860 StringZone
= (PWCHAR
)( (PBYTE
) StringZone
- SpaceNeeded
);
866 CloseSharedMemory( &hMutex
, &hMemory
, (PVOID
*)&pSharedMemory
);
869 *lpcCount
= EntriesCopied
;
870 *(PULONG
) hEnum
= Index
;
872 DbgP((L
"[aglo] NPEnumResource entries returned: %d\n", EntriesCopied
));
881 DbgP((L
"[aglo] NPCloseEnum\n"));
882 HeapFree( GetProcessHeap( ), 0, (PVOID
) hEnum
);
888 LPNETRESOURCE lpNetResource
,
890 LPDWORD lpBufferSize
)
892 DbgP(( L
"[aglo] NPGetResourceParent: WN_NOT_SUPPORTED\n" ));
893 return WN_NOT_SUPPORTED
;
897 NPGetResourceInformation(
898 __in LPNETRESOURCE lpNetResource
,
899 __out_bcount(*lpBufferSize
) LPVOID lpBuffer
,
900 __inout LPDWORD lpBufferSize
,
901 __deref_out LPWSTR
*lplpSystem
)
903 DbgP(( L
"[aglo] NPGetResourceInformation: WN_NOT_SUPPORTED\n" ));
904 return WN_NOT_SUPPORTED
;
912 LPDWORD lpBufferSize
)
914 DbgP(( L
"[aglo] NPGetUniversalName: WN_NOT_SUPPORTED\n" ));
915 return WN_NOT_SUPPORTED
;