NTSTATUS
IoGetDeviceInterfaces(
IN CONST GUID *InterfaceClassGuid,
IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL,
IN ULONG Flags,
OUT PWSTR *SymbolicLinkList
);
Must WE allocate memory at (*SymbolicLinkList) ( with ExAllocatePool… for
example ), Or does IoGetDeviceInterfaces allocate memory at
(*SymbolicLinkList) for us ?
Thank
If you read the DDK documentation you will see:
The newly allocated buffer contains a list of symbolic link names. Each
Unicode string in the list is null-terminated; the end of the whole list is
marked by an additional NULL. The caller is responsible for freeing the
buffer (ExFreePool) when it is no longer needed.
So yes the OS allocates it for you.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
“Sedki Boughattas” wrote in message
news:xxxxx@ntdev…
>
> NTSTATUS
> IoGetDeviceInterfaces(
> IN CONST GUID *InterfaceClassGuid,
> IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL,
> IN ULONG Flags,
> OUT PWSTR *SymbolicLinkList
> );
>
> Must WE allocate memory at (*SymbolicLinkList) ( with ExAllocatePool…
> for
> example ), Or does IoGetDeviceInterfaces allocate memory at
> (*SymbolicLinkList) for us ?
>
> Thank
>