Groups | Blog | Home
all groups > dotnet interop > january 2007 >

dotnet interop : DnsRecordListFree



Michael M.
1/14/2007 5:41:24 PM
Hi all,

I am using the API function DNS_Query(). I pass a null pointer to the
function, the function does it's magic and fills pointer with the address of
the first record.

I then read the data at this address into a structre

The structure has a member variable pNext that contains a pointer to the
next record, so I set my pointer to that address and agian read the data
(and repeat until this pNext is not a valid memory address).

So my question how am I supposed to use: DnsRecordListFree(ptr, 0)
Am I supposed to pass this function all of the pointers in pNext as I loop
through the records or do I pass it the address of the first record?

Thanks,

Mike.

Michael Phillips, Jr.
1/15/2007 9:31:52 AM
The DNS_Query() function returns a pointer to linked list. You pass that
pointer (i.e., the head of the list) to DnsRecordListFree.

[quoted text, click to view]

AddThis Social Bookmark Button