Freigeben über


FirewallGetRules (Windows CE 5.0)

Send Feedback

This function retrieves information about firewall rules. The function stores the information in memory that is provided by the caller and pointed to by the pRules parameter.

DWORD FirewallGetRules(  PFW RULE pRules,   DWORD* pdwSize,   DWORD* pdwCount);

Parameters

  • pRules
    [in] Pointer to the array of FW_RULE structures that describe firewall rules. This parameter is optional and can be set to NULL.
  • pdwSize
    [in, out] On input, a pointer to a DWORD that indicates the size of the memory block indicated by pRules. On output, this parameter contains the number of bytes written to the buffer or, if the supplied memory buffer is too small, the required buffer size, in bytes.
  • pdwCount
    [out] Pointer to a value that indicates the number of rules that have been retrieved. This parameter is optional and can be set to NULL.

Return Values

This function returns ERROR_SUCCESS when operation succeeds. If the provided memory buffer is too small, it returns ERROR_INSUFFICIENT_BUFFER.

Remarks

You can obtain the required size of memory to be passed to this function by calling this function with pRules set to NULL and pdwSize set to zero (0). The function will fail, returning the value ERROR_INSUFFICIENT_BUFFER. The parameter pdwSize will contain the required memory size, in bytes.

Requirements

OS Versions: Windows CE .NET 4.2 and later.
Header: Fwapi.h.
Link Library: Fwapi.lib.

See Also

IP Firewall Functions | System Errors - Alphabetical Order

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.