Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than netapi32, prefix the name with the module name and a period.
NetApiBufferFree (netapi32)
.
C# Signature:
[DllImport("Netapi32.dll", SetLastError=true)]
static extern int NetApiBufferFree(IntPtr Buffer);
VB .NET Signature:
Declare Unicode Function NetApiBufferFree Lib "netapi32.dll"
(ByRef buffer As IntPtr) As Long
User-Defined Types:
None.
Notes:
[2004-06-11, Ray Ackley]
Added VB definition & sample.
[2004-05-20, Nicholas Paldino]
There is no indication that the NetApiBufferFree function sets the last error code, so SetLastError attribute should not be set (this removes extra calls in the interop layer to store the last error code). Also, the CharSet property on the attribute need not be applied either, as there is only one version of this function.
Tips & Tricks:
Please add some!
Sample Code:
VB.NET:
' Edited down code to only show usage of NetApiBufferFree()
Dim BufPtr As IntPtr 'in
retval = NetShareEnum(SvrNameBldr, 2, BufPtr, MAX_PREFERRED_LENGTH, dwEntriesread, dwTotalentries, dwResumehandle)
Call NetApiBufferFree(BufPtr)
Alternative Managed API:
TODO
Frees the memory allocated by network management functions.
6/21/2016 8:26:32 AM - -63.226.251.37
TODO - a short description
3/16/2007 8:04:39 AM - anonymous
Frees the memory allocated by network management functions.
6/21/2016 8:26:32 AM - -63.226.251.37
Frees the memory allocated by network management functions.
6/21/2016 8:26:32 AM - -63.226.251.37
The SetLastError API
1/26/2016 3:27:33 AM - -124.148.167.58
Click to read this page
4/6/2008 7:23:14 AM - anonymous
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).