4.1 Opening a Policy Store
Before a client application can perform most of the operations, it opens a policy store handle. The protocol sequence that opens a policy store is as follows.
Figure 2: Opening a policy store
To open a policy store, the client first gets an rpcBinding to this interface in the server. Then the client simply calls the RPC method to open the required store. In this case, the client chooses the local store.
-
FW_POLICY_STORE_HANDLE hStore = NULL; DWORD RRPC_FWOpenPolicyStore( [in] FW_CONN_HANDLE rpcConnHandle = rpcBinding, [in] WORD BinaryVersion = 0x0200, [in] FW_STORE_TYPE StoreType = FW_STORE_TYPE_LOCAL, [in] FW_POLICY_ACCESS_RIGHT AccessRight = FW_POLICY_ACCESS_RIGHT_READ_WRITE, [in] DWORD dwFlags = 0, [out] PFW_POLICY_STORE_HANDLE phPolicyStore = &hStore );