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
));
332 DbgP(( L
"[aglo] GetNetCaps %d\n", nIndex
));
335 case WNNC_SPEC_VERSION
:
336 rc
= WNNC_SPEC_VERSION51
;
340 rc
= WNNC_NET_RDR2SAMPLE
;
343 case WNNC_DRIVER_VERSION
:
344 rc
= WNNC_DRIVER(1, 0);
347 case WNNC_CONNECTION
:
348 rc
= WNNC_CON_GETCONNECTIONS
|
349 WNNC_CON_CANCELCONNECTION
|
350 WNNC_CON_ADDCONNECTION
|
351 WNNC_CON_ADDCONNECTION3
;
354 case WNNC_ENUMERATION
:
355 rc
= WNNC_ENUM_LOCAL
;
375 __in PLUID lpLogonId
,
376 __in PCWSTR lpAuthentInfoType
,
377 __in PVOID lpAuthentInfo
,
378 __in PCWSTR lpPreviousAuthentInfoType
,
379 __in PVOID lpPreviousAuthentInfo
,
380 __in PWSTR lpStationName
,
381 __in PVOID StationHandle
,
382 __out PWSTR
*lpLogonScript
)
384 *lpLogonScript
= NULL
;
385 DbgP(( L
"[aglo] NPLogonNotify: returning WN_SUCCESS\n" ));
390 NPPasswordChangeNotify (
391 __in LPCWSTR lpAuthentInfoType
,
392 __in LPVOID lpAuthentInfo
,
393 __in LPCWSTR lpPreviousAuthentInfoType
,
394 __in LPVOID lpPreviousAuthentInfo
,
395 __in LPWSTR lpStationName
,
396 LPVOID StationHandle
,
399 DbgP(( L
"[aglo] NPPasswordChangeNotify: WN_NOT_SUPPORTED\n" ));
400 SetLastError( WN_NOT_SUPPORTED
);
401 return WN_NOT_SUPPORTED
;
408 __in LPNETRESOURCE lpNetResource
,
409 __in_opt LPWSTR lpPassword
,
410 __in_opt LPWSTR lpUserName
,
416 __in LPNETRESOURCE lpNetResource
,
417 __in_opt LPWSTR lpPassword
,
418 __in_opt LPWSTR lpUserName
)
420 return NPAddConnection3( NULL
, lpNetResource
, lpPassword
, lpUserName
, 0 );
426 __in LPNETRESOURCE lpNetResource
,
427 __in_opt LPWSTR lpPassword
,
428 __in_opt LPWSTR lpUserName
,
432 WCHAR wszScratch
[128];
435 CONNECTION_INFO Connection
;
436 LPWSTR ConnectionName
;
437 WCHAR ServerName
[MAX_PATH
];
441 DbgP(( L
"[aglo] NPAddConnection3('%s', '%s')\n",
442 lpNetResource
->lpLocalName
, lpNetResource
->lpRemoteName
));
443 DbgP(( L
"[aglo] username = '%s', passwd = '%s'\n", lpUserName
, lpPassword
));
445 Status
= InitializeConnectionInfo(&Connection
,
446 (PMOUNT_OPTION_BUFFER
)lpNetResource
->lpComment
,
449 DbgP(( L
"InitializeConnectionInfo failed with %d\n", Status
));
453 // \device\miniredirector\;<DriveLetter>:\Server\Share
455 // local name, must start with "X:"
456 if (lstrlen(lpNetResource
->lpLocalName
) < 2 ||
457 lpNetResource
->lpLocalName
[1] != L
':') {
458 Status
= WN_BAD_LOCALNAME
;
462 LocalName
[0] = (WCHAR
) toupper(lpNetResource
->lpLocalName
[0]);
464 LocalName
[2] = L
'\0';
465 StringCchCopyW( ConnectionName
, MAX_PATH
, NFS41_DEVICE_NAME
);
466 StringCchCatW( ConnectionName
, MAX_PATH
, L
"\\;" );
467 StringCchCatW( ConnectionName
, MAX_PATH
, LocalName
);
469 // remote name, must start with "\\"
470 if (lpNetResource
->lpRemoteName
[0] == L
'\0' ||
471 lpNetResource
->lpRemoteName
[0] != L
'\\' ||
472 lpNetResource
->lpRemoteName
[1] != L
'\\') {
473 Status
= WN_BAD_NETNAME
;
477 /* note: remotename comes as \\server but we need to add \server thus +1 pointer */
478 p
= lpNetResource
->lpRemoteName
+ 1;
479 ServerName
[0] = L
'\\';
482 /* convert servername ending unix slash to windows slash */
485 /* deal with servername ending with any slash */
488 ServerName
[i
] = p
[i
];
489 if (p
[i
] == L
'\\') break;
492 ServerName
[i
] = L
'\0';
493 StringCchCatW( ConnectionName
, MAX_PATH
, ServerName
);
494 /* insert the "nfs4" in between the server name and the path,
495 * just to make sure all calls to our driver come thru this */
496 StringCchCatW( ConnectionName
, MAX_PATH
, L
"\\nfs4" );
498 #ifdef CONVERT_2_UNIX_SLASHES
499 /* convert all windows slashes to unix slashes */
504 if(q
[j
] == L
'\0') break;
505 if (q
[j
] == L
'\\') q
[j
] = L
'/';
510 /* convert all unix slashes to windows slashes */
515 if(q
[j
] == L
'\0') break;
516 if (q
[j
] == L
'/') q
[j
] = L
'\\';
521 StringCchCatW( ConnectionName
, MAX_PATH
, &p
[i
]);
522 DbgP(( L
"[aglo] Full Connect Name: %s\n", ConnectionName
));
523 DbgP(( L
"[aglo] Full Connect Name Length: %d %d\n",
524 (wcslen(ConnectionName
) + 1) * sizeof(WCHAR
),
525 (lstrlen(ConnectionName
) + 1) * sizeof(WCHAR
)));
527 if ( QueryDosDevice( LocalName
, wszScratch
, 128 )
528 || GetLastError() != ERROR_FILE_NOT_FOUND
) {
529 Status
= WN_ALREADY_CONNECTED
;
533 MarshalConnectionInfo(&Connection
);
535 Status
= SendTo_NFS41Driver( IOCTL_NFS41_ADDCONN
,
536 Connection
.Buffer
, Connection
.BufferSize
,
539 DbgP(( L
"[aglo] SendTo_NFS41Driver failed with %d\n", Status
));
543 DbgP(( L
"[aglo] calling DefineDosDevice\n"));
544 if ( !DefineDosDevice( DDD_RAW_TARGET_PATH
|
545 DDD_NO_BROADCAST_SYSTEM
,
546 lpNetResource
->lpLocalName
,
548 Status
= GetLastError();
549 DbgP(( L
"[aglo] DefineDosDevice failed with %d\n", Status
));
553 // The connection was established and the local device mapping
554 // added. Include this in the list of mapped devices.
555 Status
= StoreConnectionInfo(LocalName
, ConnectionName
,
556 Connection
.Buffer
->NameLength
, lpNetResource
);
558 DbgP(( L
"[aglo] StoreConnectionInfo failed with %d\n", Status
));
563 FreeConnectionInfo(&Connection
);
564 DbgP(( L
"[aglo] NPAddConnection3: status %08X\n", Status
));
567 DefineDosDevice(DDD_REMOVE_DEFINITION
| DDD_RAW_TARGET_PATH
|
568 DDD_EXACT_MATCH_ON_REMOVE
, LocalName
, ConnectionName
);
570 SendTo_NFS41Driver(IOCTL_NFS41_DELCONN
, ConnectionName
,
571 Connection
.Buffer
->NameLength
, NULL
, &CopyBytes
);
582 HANDLE hMutex
, hMemory
;
583 PNFS41NP_SHARED_MEMORY pSharedMemory
;
585 DbgP((TEXT("NPCancelConnection\n")));
586 DbgP((TEXT("NPCancelConnection: ConnectionName: %S\n"), lpName
));
588 Status
= OpenSharedMemory( &hMutex
,
590 (PVOID
)&pSharedMemory
);
592 if (Status
== WN_SUCCESS
)
595 PNFS41NP_NETRESOURCE pNetResource
;
596 Status
= WN_NOT_CONNECTED
;
598 DbgP((TEXT("NPCancelConnection: NextIndex %d, NumResources %d\n"),
599 pSharedMemory
->NextAvailableIndex
,
600 pSharedMemory
->NumberOfResourcesInUse
));
602 for (Index
= 0; Index
< pSharedMemory
->NextAvailableIndex
; Index
++)
604 pNetResource
= &pSharedMemory
->NetResources
[Index
];
606 if (pNetResource
->InUse
)
608 if ( ( (wcslen(lpName
) + 1) * sizeof(WCHAR
) ==
609 pNetResource
->LocalNameLength
)
610 && ( !wcscmp(lpName
, pNetResource
->LocalName
) ))
614 DbgP((TEXT("NPCancelConnection: Connection Found:\n")));
618 Status
= SendTo_NFS41Driver( IOCTL_NFS41_DELCONN
,
619 pNetResource
->ConnectionName
,
620 pNetResource
->ConnectionNameLength
,
624 if (Status
!= WN_SUCCESS
)
626 DbgP((TEXT("NPCancelConnection: SendToMiniRdr returned Status %lx\n"),Status
));
630 if (DefineDosDevice(DDD_REMOVE_DEFINITION
| DDD_RAW_TARGET_PATH
| DDD_EXACT_MATCH_ON_REMOVE
,
632 pNetResource
->ConnectionName
) == FALSE
)
634 DbgP((TEXT("RemoveDosDevice: DefineDosDevice error: %d\n"), GetLastError()));
635 Status
= GetLastError();
639 pNetResource
->InUse
= FALSE
;
640 pSharedMemory
->NumberOfResourcesInUse
--;
642 if (Index
+1 == pSharedMemory
->NextAvailableIndex
)
643 pSharedMemory
->NextAvailableIndex
--;
648 DbgP((TEXT("NPCancelConnection: Name %S EntryName %S\n"),
649 lpName
,pNetResource
->LocalName
));
650 DbgP((TEXT("NPCancelConnection: Name Length %d Entry Name Length %d\n"),
651 pNetResource
->LocalNameLength
,pNetResource
->LocalName
));
656 CloseSharedMemory( &hMutex
,
658 (PVOID
)&pSharedMemory
);
666 __in LPWSTR lpLocalName
,
667 __out_bcount(*lpBufferSize
) LPWSTR lpRemoteName
,
668 __inout LPDWORD lpBufferSize
)
672 HANDLE hMutex
, hMemory
;
673 PNFS41NP_SHARED_MEMORY pSharedMemory
;
675 Status
= OpenSharedMemory( &hMutex
,
677 (PVOID
)&pSharedMemory
);
679 if (Status
== WN_SUCCESS
)
682 PNFS41NP_NETRESOURCE pNetResource
;
683 Status
= WN_NOT_CONNECTED
;
685 for (Index
= 0; Index
< pSharedMemory
->NextAvailableIndex
; Index
++)
687 pNetResource
= &pSharedMemory
->NetResources
[Index
];
689 if (pNetResource
->InUse
)
691 if ( ( (wcslen(lpLocalName
) + 1) * sizeof(WCHAR
) ==
692 pNetResource
->LocalNameLength
)
693 && ( !wcscmp(lpLocalName
, pNetResource
->LocalName
) ))
695 if (*lpBufferSize
< pNetResource
->RemoteNameLength
)
697 *lpBufferSize
= pNetResource
->RemoteNameLength
;
698 Status
= WN_MORE_DATA
;
702 *lpBufferSize
= pNetResource
->RemoteNameLength
;
703 CopyMemory( lpRemoteName
,
704 pNetResource
->RemoteName
,
705 pNetResource
->RemoteNameLength
);
713 CloseSharedMemory( &hMutex
, &hMemory
, (PVOID
)&pSharedMemory
);
724 LPNETRESOURCE lpNetResource
,
729 DbgP((L
"[aglo] NPOpenEnum\n"));
735 case RESOURCE_CONNECTED
:
737 *lphEnum
= HeapAlloc( GetProcessHeap( ), HEAP_ZERO_MEMORY
, sizeof( ULONG
) );
745 Status
= WN_OUT_OF_MEMORY
;
751 case RESOURCE_CONTEXT
:
753 Status
= WN_NOT_SUPPORTED
;
758 DbgP((L
"[aglo] NPOpenEnum returning Status %lx\n",Status
));
768 LPDWORD lpBufferSize
)
770 DWORD Status
= WN_SUCCESS
;
772 LPNETRESOURCE pNetResource
;
773 ULONG SpaceNeeded
= 0;
774 ULONG SpaceAvailable
;
776 HANDLE hMutex
, hMemory
;
777 PNFS41NP_SHARED_MEMORY pSharedMemory
;
778 PNFS41NP_NETRESOURCE pNfsNetResource
;
779 INT Index
= *(PULONG
)hEnum
;
782 DbgP((L
"[aglo] NPEnumResource\n"));
784 DbgP((L
"[aglo] NPEnumResource Count Requested %d\n", *lpcCount
));
786 pNetResource
= (LPNETRESOURCE
) lpBuffer
;
787 SpaceAvailable
= *lpBufferSize
;
789 StringZone
= (PWCHAR
) ((PBYTE
)lpBuffer
+ *lpBufferSize
);
791 Status
= OpenSharedMemory( &hMutex
,
793 (PVOID
)&pSharedMemory
);
795 if ( Status
== WN_SUCCESS
)
797 Status
= WN_NO_MORE_ENTRIES
;
798 for (Index
= *(PULONG
)hEnum
; EntriesCopied
< *lpcCount
&&
799 Index
< pSharedMemory
->NextAvailableIndex
; Index
++)
801 pNfsNetResource
= &pSharedMemory
->NetResources
[Index
];
803 if (pNfsNetResource
->InUse
)
805 SpaceNeeded
= sizeof( NETRESOURCE
);
806 SpaceNeeded
+= pNfsNetResource
->LocalNameLength
;
807 SpaceNeeded
+= pNfsNetResource
->RemoteNameLength
;
808 SpaceNeeded
+= 5 * sizeof(WCHAR
); // comment
809 SpaceNeeded
+= sizeof(NFS41_PROVIDER_NAME_U
); // provider name
810 if ( SpaceNeeded
> SpaceAvailable
)
812 Status
= WN_MORE_DATA
;
813 DbgP((L
"[aglo] NPEnumResource More Data Needed - %d\n", SpaceNeeded
));
814 *lpBufferSize
= SpaceNeeded
;
819 SpaceAvailable
-= SpaceNeeded
;
821 pNetResource
->dwScope
= pNfsNetResource
->dwScope
;
822 pNetResource
->dwType
= pNfsNetResource
->dwType
;
823 pNetResource
->dwDisplayType
= pNfsNetResource
->dwDisplayType
;
824 pNetResource
->dwUsage
= pNfsNetResource
->dwUsage
;
826 // setup string area at opposite end of buffer
827 SpaceNeeded
-= sizeof( NETRESOURCE
);
828 StringZone
= (PWCHAR
)( (PBYTE
) StringZone
- SpaceNeeded
);
830 StringCchCopy( StringZone
,
831 pNfsNetResource
->LocalNameLength
,
832 pNfsNetResource
->LocalName
);
833 pNetResource
->lpLocalName
= StringZone
;
834 StringZone
+= pNfsNetResource
->LocalNameLength
/sizeof(WCHAR
);
836 StringCchCopy( StringZone
,
837 pNfsNetResource
->RemoteNameLength
,
838 pNfsNetResource
->RemoteName
);
839 pNetResource
->lpRemoteName
= StringZone
;
840 StringZone
+= pNfsNetResource
->RemoteNameLength
/sizeof(WCHAR
);
842 pNetResource
->lpComment
= StringZone
;
843 *StringZone
++ = L
'A';
844 *StringZone
++ = L
'_';
845 *StringZone
++ = L
'O';
846 *StringZone
++ = L
'K';
847 *StringZone
++ = L
'\0';
848 // copy provider name
849 pNetResource
->lpProvider
= StringZone
;
850 StringCbCopyW( StringZone
, sizeof(NFS41_PROVIDER_NAME_U
), NFS41_PROVIDER_NAME_U
);
851 StringZone
+= sizeof(NFS41_PROVIDER_NAME_U
)/sizeof(WCHAR
);
853 // set new bottom of string zone
854 StringZone
= (PWCHAR
)( (PBYTE
) StringZone
- SpaceNeeded
);
860 CloseSharedMemory( &hMutex
, &hMemory
, (PVOID
*)&pSharedMemory
);
863 *lpcCount
= EntriesCopied
;
864 *(PULONG
) hEnum
= Index
;
866 DbgP((L
"[aglo] NPEnumResource entries returned: %d\n", EntriesCopied
));
875 DbgP((L
"[aglo] NPCloseEnum\n"));
876 HeapFree( GetProcessHeap( ), 0, (PVOID
) hEnum
);
882 LPNETRESOURCE lpNetResource
,
884 LPDWORD lpBufferSize
)
886 DbgP(( L
"[aglo] NPGetResourceParent: WN_NOT_SUPPORTED\n" ));
887 return WN_NOT_SUPPORTED
;
891 NPGetResourceInformation(
892 __in LPNETRESOURCE lpNetResource
,
893 __out_bcount(*lpBufferSize
) LPVOID lpBuffer
,
894 __inout LPDWORD lpBufferSize
,
895 __deref_out LPWSTR
*lplpSystem
)
897 DbgP(( L
"[aglo] NPGetResourceInformation: WN_NOT_SUPPORTED\n" ));
898 return WN_NOT_SUPPORTED
;
906 LPDWORD lpBufferSize
)
908 DbgP(( L
"[aglo] NPGetUniversalName: WN_NOT_SUPPORTED\n" ));
909 return WN_NOT_SUPPORTED
;