You are not passing the link handle to ZwQuerySymbolicLinkObject. You are
passing the address or the handle.
You need to read and understand the documentation for this call.
You have all the information that you need to get started. Read the
documentation and do some experimenting.
Bill Wandel
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of xxxxx@gmail.com
Sent: Tuesday, November 18, 2008 8:30 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] DOS device names to NT Device Names
void DostoDeviceNames()
{
OBJECT_ATTRIBUTES Attributes;
UNICODE_STRING NameUnicodeString ;
UNICODE_STRING *TargetString;
HANDLE LinkHandle;
ULONG len;
RtlInitUnicodeString( &NameUnicodeString, L"C" ) ;
InitializeObjectAttributes( &Attributes,&NameUnicodeString,
OBJ_CASE_INSENSITIVE, NULL, NULL ) ;
TargetString=ExAllocatePool(NonPagedPool,sizeof(UNICODE_STRING));
ZwOpenSymbolicLinkObject(&LinkHandle,GENERIC_READ,&Attributes);
ZwQuerySymbolicLinkObject(&LinkHandle,TargetString,&len);
DbgPrint(“The symbolic link is %wZ”,TargetString); }
Is this code right?? I see no output from this yet.
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer