Scrive Gunnar <[EMAIL PROTECTED]>: > Hi,
Hi, > > The last two parameters of the function are declare as out, > > Parameters declared as OUT never need to be initialized when you call the > function. To make this clear is the only (but good) reason to use OUT > instead of VAR. Are you speaking about Delphi or C? > > and > > noticed that lplpszProxyHostName is a pointer of pointer, not a pointer as > > > usual. > > It is a pointer to a PChar. But PChar is a pointer, isn't it? :-) What I want to point out is that the parametera are different as usual when a pre-dimensioned buffer is passed. > > It is a quite unclear situation, isn't it? > > The only thing unclear to me is still how to release the memory. Is it not enough? :-) > GlobalFree? I don't know. For another function of the same library http://msdn2.microsoft.com/en-us/library/aa385101.aspx http://msdn2.microsoft.com/en-us/library/aa385384.aspx there is explicit mention that returned strings are globally allocated and that GlobalFree must be used. For InternetGetProxyInfo only a vague "... The application is responsible for freeing this string." The API say that the parameter are "out", but the sample (in a different chapter) prepare they as they are "var". My only hope is that the InternetDeInitializeAutoProxyDll or the unload of the dll take care for freeing these strings. Also notice that the InternetGetProxyInfo can be called a lot of times before these actions will happen. > Or is there some other memory manager involved, like with the > shell-functions? Since I'm not the developer of JSProxy.dll and the API docs doesn't say anything about that, I really don't know :-( 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