Maurizio Lotauro wrote: > Scrive Arno Garrels <[EMAIL PROTECTED]>: > >> Maurizio Lotauro wrote: >>> Scrive Arno Garrels <[EMAIL PROTECTED]>: > > [...] > >>> Revising the code I noticed this in the API description. For the >>> InternetGetProxyInfo function for the lplpszProxyHostName say: >>> "[out] A pointer to the address of a buffer that receives the URL of >>> the proxy to use in an HTTP request for the specified resource. The >>> application is responsible for freeing this string." >>> How I should free the string? >> >> Don't you allocate the memory before passing the pointer? > > No, should I? The docs don't seems very clear to me. Have look at
I think you should, like with most DLL calls that return a variable amount of data. There's also lpdwProxyHostNameLength. Mostly when you call such functions with a nil pointer and/or zero length the function will return the length of the buffer that the caller has to allocate before calling it a second time with a non-nil pointer to an allocated piece of memory. Is this not working you? -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html > http://msdn2.microsoft.com/en-us/library/aa384726.aspx > > > Bye, Maurizio. > > > ---------------------------------------------------- > This mail has been sent using Alpikom webmail system > http://www.alpikom.it -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be