Esempio n. 1
0
        public KphSsRuleSetEntryHandle SsCreateRuleSetEntry(
            KphSsClientEntryHandle clientEntryHandle,
            KphSsFilterType defaultFilterType,
            KphSsRuleSetAction action
            )
        {
            byte *inData  = stackalloc byte[0xc];
            byte *outData = stackalloc byte[4];

            *(int *)inData         = clientEntryHandle.Handle.ToInt32();
            *(int *)(inData + 0x4) = (int)defaultFilterType;
            *(int *)(inData + 0x8) = (int)action;

            _fileHandle.IoControl(CtlCode(Control.SsCreateRuleSetEntry), inData, 0xc, outData, 4);

            return(new KphSsRuleSetEntryHandle((*(int *)outData).ToIntPtr()));
        }
Esempio n. 2
0
        public KphSsRuleSetEntryHandle SsCreateRuleSetEntry(
            KphSsClientEntryHandle clientEntryHandle,
            KphSsFilterType defaultFilterType,
            KphSsRuleSetAction action
            )
        {
            byte* inData = stackalloc byte[0xc];
            byte* outData = stackalloc byte[4];

            *(int*)inData = clientEntryHandle.Handle.ToInt32();
            *(int*)(inData + 0x4) = (int)defaultFilterType;
            *(int*)(inData + 0x8) = (int)action;

            _fileHandle.IoControl(CtlCode(Control.SsCreateRuleSetEntry), inData, 0xc, outData, 4);

            return new KphSsRuleSetEntryHandle((*(int*)outData).ToIntPtr());
        }