htscpp_internal.h
资源名称:ipfilter.zip [点击查看]
上传用户:nnxzhh
上传日期:2007-01-11
资源大小:742k
文件大小:3k
源码类别:
防火墙与安全工具
开发平台:
WINDOWS
- ///////////////////////////////////////////////////////////////////////////////
- //
- // Copyright (C) 1999 - 2000 Mark Roddy
- //
- // Hollis Technology Solutions
- // 94 Dow Road
- // Hollis, NH 03049
- // info@hollistech.com
- // www.hollistech.com
- //
- // This library is free software; you can redistribute it and/or
- // modify it under the terms of the GNU Lesser General Public
- // License as published by the Free Software Foundation; either
- // version 2 of the License, or (at your option) any later version.
- //
- // This library is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- // Lesser General Public License for more details.
- //
- // You should have received a copy of the GNU Lesser General Public
- // License along with this library; if not, write to the Free Software
- // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- //
- // www.fsf.org
- //
- //
- //
- // Synopsis:
- //
- //
- // Version Information:
- //
- // $Header: /cpprun/sys/cpplib/htscpp_internal.h 6 1/01/00 11:00p Markr $
- //
- ///////////////////////////////////////////////////////////////////////////////
- #pragma once
- #include "htscpp.h"
- /*
- * pointers to initialization sections
- */
- extern "C" {
- PVFV __crtXia[];
- PVFV __crtXiz[];
- PVFV __crtXca[]; // c++
- PVFV __crtXcz[];
- PVFV __crtXpa[];
- PVFV __crtXpz[];
- PVFV __crtXta[];
- PVFV __crtXtz[];
- }
- __inline void HtsBugCheckEx(PCHAR Message, ULONG FileId, BOOLEAN Internal)
- {
- DbgPrint("******************************************************n");
- //
- // Indicate if this is an INTERNAL problem, or a problem with the FSD
- //
- if (Internal) {
- DbgPrint("********** INTERNAL ASSERTION FAILURE ********n");
- } else {
- DbgPrint("********** ASSERTION FAILURE ********n");
- }
- //
- // Print the message passed in to us.
- //
- DbgPrint("** %s **n", Message);
- DbgPrint("********** Driver WILL NOW BUG CHECK ****************n");
- KeBugCheckEx(FILE_SYSTEM, FileId, Internal,
- // if possible include the threadid
- KeGetCurrentIrql() <= DISPATCH_LEVEL ? (ULONG) PsGetCurrentThread(): 0,
- // Might as well toss in the current irql
- KeGetCurrentIrql());
- }
- #ifndef HTS_UNIQUE_FILE_ID
- #error "source file must define HTS_UNIQUE_FILE_ID"
- #endif
- #define HtsFileId() HTS_UNIQUE_FILE_ID
- #define stringer(x) #x
- #define AssertAlways(x) if (!(x)) {
- HtsBugCheckEx("Internal Assertion Failure (" #x ") in " __FILE__ " at " stringer(__LINE__), HtsFileId(), TRUE);
- }
- ///////////////////////////////////////////////////////////////////////////////
- //
- // Change History Log
- //
- // $Log: /cpprun/sys/cpplib/htscpp_internal.h $
- //
- // 6 1/01/00 11:00p Markr
- //
- // 5 12/17/99 8:30a Markr
- //
- // 4 12/16/99 10:20p Markr
- //
- ///////////////////////////////////////////////////////////////////////////////