本文整理汇总了C++中GetExceptionInformation函数的典型用法代码示例。如果您正苦于以下问题:C++ GetExceptionInformation函数的具体用法?C++ GetExceptionInformation怎么用?C++ GetExceptionInformation使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetExceptionInformation函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: render
int render(winampVisModule* pVisModule){
if(!running)
return -1;
# ifdef USE_STACK_WALKER
__try {
return MyRender(pVisModule);
}
__except(ExpFilter(GetExceptionInformation(), GetExceptionCode()))
{
MessageBoxA(NULL, "Fatal error in render. see alienfx_vis_crashlog for details", "Error", MB_OK | MB_ICONERROR);
return -1;
}
}
开发者ID:Ingrater,项目名称:Winamp-AlienFX-Plugin,代码行数:13,代码来源:main.cpp
示例2: _snprintf
UINT CNetManager::executePacket_Gen_Exception(Packet* pPacket)
{
CHAR szTitle[MAX_PATH];
_snprintf(szTitle, MAX_PATH, "Packet: %d", pPacket->GetPacketID());
__try
{
return executePacket_CPP_Exception(pPacket);
}
__except (tProcessInnerException(GetExceptionInformation(), g_hMainWnd, szTitle), EXCEPTION_EXECUTE_HANDLER) {}
return PACKET_EXE_CONTINUE;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:13,代码来源:NetManager.cpp
示例3: DumpMiniDump
void DumpMiniDump(PEXCEPTION_POINTERS excpInfo)
{
if (excpInfo == NULL)
{
// Generate exception to get proper context in dump
__try
{
RaiseException(EXCEPTION_BREAKPOINT, 0, 0, NULL);
}
__except(DumpMiniDump(GetExceptionInformation()),EXCEPTION_EXECUTE_HANDLER)
{
}
}
开发者ID:Caboose1543,项目名称:LUNIServerProject,代码行数:13,代码来源:CrashReporter.cpp
示例4: AFSFSControl
NTSTATUS
AFSFSControl( IN PDEVICE_OBJECT LibDeviceObject,
IN PIRP Irp)
{
NTSTATUS ntStatus = STATUS_SUCCESS;
IO_STACK_LOCATION *pIrpSp;
pIrpSp = IoGetCurrentIrpStackLocation( Irp);
__try
{
switch( pIrpSp->MinorFunction)
{
case IRP_MN_USER_FS_REQUEST:
ntStatus = AFSProcessUserFsRequest( Irp);
break;
case IRP_MN_MOUNT_VOLUME:
break;
case IRP_MN_VERIFY_VOLUME:
break;
default:
break;
}
AFSCompleteRequest( Irp,
ntStatus);
}
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSFSControl\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;
}
开发者ID:sanchit-matta,项目名称:openafs,代码行数:51,代码来源:AFSFSControl.cpp
示例5: openprinter_ps
static int openprinter_ps (void)
{
TCHAR *gsargv[] = {
L"-dNOPAUSE", L"-dBATCH", L"-dNOPAGEPROMPT", L"-dNOPROMPT", L"-dQUIET", L"-dNoCancel",
L"-sDEVICE=mswinpr2", NULL
};
int gsargc, gsargc2, i;
TCHAR *tmpparms[100];
TCHAR tmp[MAX_DPATH];
char *gsparms[100];
if (ptr_gsapi_new_instance (&gsinstance, NULL) < 0)
return 0;
cmdlineparser (currprefs.ghostscript_parameters, tmpparms, 100 - 10);
gsargc2 = 0;
gsparms[gsargc2++] = ua (L"WinUAE");
for (gsargc = 0; gsargv[gsargc]; gsargc++) {
gsparms[gsargc2++] = ua (gsargv[gsargc]);
}
for (i = 0; tmpparms[i]; i++)
gsparms[gsargc2++] = ua (tmpparms[i]);
if (currprefs.prtname[0]) {
_stprintf (tmp, L"-sOutputFile=%%printer%%%s", currprefs.prtname);
gsparms[gsargc2++] = ua (tmp);
}
if (postscript_print_debugging) {
for (i = 0; i < gsargc2; i++) {
TCHAR *parm = au (gsparms[i]);
write_log (L"GSPARM%d: '%s'\n", i, parm);
xfree (parm);
}
}
__try {
int rc = ptr_gsapi_init_with_args (gsinstance, gsargc2, gsparms);
for (i = 0; i < gsargc2; i++) {
xfree (gsparms[i]);
}
if (rc != 0) {
write_log (L"GS failed, returncode %d\n", rc);
return 0;
}
ptr_gsapi_run_string_begin (gsinstance, 0, &gs_exitcode);
} __except (ExceptionFilter (GetExceptionInformation (), GetExceptionCode ())) {
write_log (L"GS crashed\n");
return 0;
}
psmode = 1;
return 1;
}
开发者ID:kingguppy,项目名称:WinUAE,代码行数:50,代码来源:parser.cpp
示例6: HandleCrash
int __cdecl HandleCrash(PEXCEPTION_POINTERS pExceptPtrs)
{
if(pExceptPtrs == 0)
{
// Raise an exception :P
__try
{
RaiseException(EXCEPTION_BREAKPOINT, 0, 0, 0);
}
__except(HandleCrash(GetExceptionInformation()), EXCEPTION_CONTINUE_EXECUTION)
{
}
}
开发者ID:satanail,项目名称:ArcTic-d,代码行数:14,代码来源:CrashHandler.cpp
示例7: FindDlgAddTypes
/*
* FindDlgAddTypes
*
* Purpose:
*
* Enumerate object types and fill combobox with them.
*
*/
VOID FindDlgAddTypes(
HWND hwnd
)
{
ULONG i;
HWND hComboBox;
SIZE_T sz;
LPWSTR lpType;
POBJECT_TYPE_INFORMATION pObject;
hComboBox = GetDlgItem(hwnd, ID_SEARCH_TYPE);
if (hComboBox == NULL) {
return;
}
SendMessage(hComboBox, CB_RESETCONTENT, (WPARAM)0, (LPARAM)0);
if (g_pObjectTypesInfo == NULL) {
SendMessage(hComboBox, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"*");
SendMessage(hComboBox, CB_SETCURSEL, (WPARAM)0, (LPARAM)0);
return;
}
//
// Warning: not all object types are listed.
//
__try {
//type collection available, list it
pObject = (POBJECT_TYPE_INFORMATION)&g_pObjectTypesInfo->TypeInformation;
for (i = 0; i < g_pObjectTypesInfo->NumberOfTypes; i++) {
sz = pObject->TypeName.MaximumLength + sizeof(UNICODE_NULL);
lpType = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sz);
if (lpType) {
_strncpy(lpType, sz / sizeof(WCHAR),
pObject->TypeName.Buffer, pObject->TypeName.Length / sizeof(WCHAR));
SendMessage(hComboBox, CB_ADDSTRING, (WPARAM)0, (LPARAM)lpType);
HeapFree(GetProcessHeap(), 0, lpType);
}
pObject = (POBJECT_TYPE_INFORMATION)((PCHAR)(pObject + 1) +
ALIGN_UP(pObject->TypeName.MaximumLength, sizeof(ULONG_PTR)));
}
SendMessage(hComboBox, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"*");
SendMessage(hComboBox, CB_SETCURSEL, (WPARAM)0, (LPARAM)0);
}
__except (exceptFilter(GetExceptionCode(), GetExceptionInformation())) {
return;
}
}
开发者ID:samghub,项目名称:WinObjEx64,代码行数:57,代码来源:findDlg.c
示例8: _tmain
int _tmain(int argc, _TCHAR* argv[])
{
::SetUnhandledExceptionFilter(ExceptionFilter);
__try
{
RaiseException();
}
__except(filter(GetExceptionCode(), GetExceptionInformation()))
{
std::wcout << L"in handler" << std::endl;
}
return 0;
}
开发者ID:rickerliang,项目名称:testgit,代码行数:15,代码来源:dumpee.cpp
示例9: executeShell
static int executeShell(int argc, char *argv[])
{
int code = 0;
__try
{
code = avmthane::Shell::run(argc, argv);
}
__except(avmthane::CrashFilter(GetExceptionInformation(), GetExceptionCode()))
{
code = -1;
}
return code;
}
开发者ID:FlowShift,项目名称:thane,代码行数:15,代码来源:avmthaneWin.cpp
示例10: DumpMiniDump
//����Ҫ�ĺ���, ����Dump
static void DumpMiniDump(HANDLE hFile, PEXCEPTION_POINTERS excpInfo)
{
if (excpInfo == NULL) //����û�д����쳣, �������ڳ����������õ�, ����һ���쳣
{
// Generate exception to get proper context in dump
__try
{
OutputDebugString(_T("raising exception\r\n"));
RaiseException(EXCEPTION_BREAKPOINT, 0, 0, NULL);
}
__except (DumpMiniDump(hFile, GetExceptionInformation()),
EXCEPTION_CONTINUE_EXECUTION)
{
}
}
开发者ID:w13315071023,项目名称:MaidVisionCamera_300,代码行数:16,代码来源:main.cpp
示例11: WINE_EXCEPTION_FILTER
/**********************************************************************
* dpmi_exception_handler
*
* Handle EXCEPTION_VM86_STI exceptions generated
* when there are pending asynchronous events.
*/
static WINE_EXCEPTION_FILTER(dpmi_exception_handler)
{
#ifdef __i386__
EXCEPTION_RECORD *rec = GetExceptionInformation()->ExceptionRecord;
CONTEXT *context = GetExceptionInformation()->ContextRecord;
if (rec->ExceptionCode == EXCEPTION_VM86_STI)
{
if (ISV86(context))
ERR( "Real mode STI caught by protected mode handler!\n" );
DOSVM_SendQueuedEvents(context);
return EXCEPTION_CONTINUE_EXECUTION;
}
else if (rec->ExceptionCode == EXCEPTION_VM86_INTx)
{
if (ISV86(context))
ERR( "Real mode INTx caught by protected mode handler!\n" );
DPMI_retval = (BYTE)rec->ExceptionInformation[0];
return EXCEPTION_EXECUTE_HANDLER;
}
#endif
return EXCEPTION_CONTINUE_SEARCH;
}
开发者ID:howard5888,项目名称:wineT,代码行数:30,代码来源:int31.c
示例12: FakeLuaPcall
int FakeLuaPcall(lua_State *L, int nargs, int nresults, int errfunc)
{
EXCEPTION_POINTERS* xp = nullptr;
int results = 0;
__try
{
results = aero::c_call<int>(RealLuaPcall, L, nargs, nresults, errfunc);
}
__except(xp = GetExceptionInformation(), EXCEPTION_EXECUTE_HANDLER)
{
char buf[256];
sprintf(buf, "SEH exception: '0x%08X'", xp->ExceptionRecord->ExceptionCode);
lua_pushstring(L, buf);
return LUA_ERRRUN;
}
开发者ID:9tong,项目名称:YDWE,代码行数:15,代码来源:LuaEngineImpl.cpp
示例13: do_run_machine
/*
* Run emulator
*/
static void do_run_machine (void)
{
#if defined (NATMEM_OFFSET) && defined( _WIN32 ) && !defined( NO_WIN32_EXCEPTION_HANDLER )
extern int EvalException ( LPEXCEPTION_POINTERS blah, int n_except );
__try
#endif
{
m68k_go (1);
}
#if defined (NATMEM_OFFSET) && defined( _WIN32 ) && !defined( NO_WIN32_EXCEPTION_HANDLER )
__except( EvalException( GetExceptionInformation(), GetExceptionCode() ) )
{
// EvalException does the good stuff...
}
#endif
}
开发者ID:BackupTheBerlios,项目名称:arp2-svn,代码行数:19,代码来源:main.c
示例14: pProc
//
// Calls hostfxr_main with the hostfxr and application as arguments.
// Method should be called with only
// Need to have __try / __except in methods that require unwinding.
// Note, this will not
//
HRESULT
IN_PROCESS_APPLICATION::RunDotnetApplication(DWORD argc, CONST PCWSTR* argv, hostfxr_main_fn pProc)
{
HRESULT hr = S_OK;
__try
{
m_ProcessExitCode = pProc(argc, argv);
}
__except (FilterException(GetExceptionCode(), GetExceptionInformation()))
{
// TODO Log error message here.
hr = E_APPLICATION_ACTIVATION_EXEC_FAILURE;
}
return hr;
}
开发者ID:akrisiun,项目名称:IISIntegration,代码行数:22,代码来源:inprocessapplication.cpp
示例15: RaiseException
/* static */
bool wxCrashReport::GenerateNow(int flags)
{
bool rc = false;
__try
{
RaiseException(0x1976, 0, 0, NULL);
}
__except( rc = Generate(flags, (EXCEPTION_POINTERS *)GetExceptionInformation()),
EXCEPTION_CONTINUE_EXECUTION )
{
// never executed because of EXCEPTION_CONTINUE_EXECUTION above
}
return rc;
}
开发者ID:BloodRedd,项目名称:gamekit,代码行数:17,代码来源:crashrpt.cpp
示例16: fopen
bool FileManager::loadFileData(Document doc, const char * filename, Utf8_16_Read * UnicodeConvertor, LangType language) {
const int blockSize = 128 * 1024; //128 kB
char data[blockSize];
__try {
FILE *fp = fopen(filename, "rb");
if (!fp)
return false;
//Setup scratchtilla for new filedata
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, doc);
bool ro = _pscratchTilla->execute(SCI_GETREADONLY) != 0;
if (ro) {
_pscratchTilla->execute(SCI_SETREADONLY, false);
}
_pscratchTilla->execute(SCI_CLEARALL);
if (language < L_EXTERNAL) {
_pscratchTilla->execute(SCI_SETLEXER, ScintillaEditView::langNames[language].lexerID);
} else {
int id = language - L_EXTERNAL;
char * name = NppParameters::getInstance()->getELCFromIndex(id)._name;
_pscratchTilla->execute(SCI_SETLEXERLANGUAGE, 0, (LPARAM)name);
}
size_t lenFile = 0;
size_t lenConvert = 0; //just in case conversion results in 0, but file not empty
do {
lenFile = fread(data, 1, blockSize, fp);
lenConvert = UnicodeConvertor->convert(data, lenFile);
_pscratchTilla->execute(SCI_APPENDTEXT, lenConvert, (LPARAM)(UnicodeConvertor->getNewBuf()));
} while (lenFile > 0);
fclose(fp);
_pscratchTilla->execute(SCI_EMPTYUNDOBUFFER);
_pscratchTilla->execute(SCI_SETSAVEPOINT);
if (ro) {
_pscratchTilla->execute(SCI_SETREADONLY, true);
}
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, _scratchDocDefault);
return true;
}__except(filter(GetExceptionCode(), GetExceptionInformation())) {
printStr("File is too big to be opened by Notepad++");
return false;
}
}
开发者ID:amelfraisse,项目名称:npp_locainsitu,代码行数:47,代码来源:Buffer.cpp
示例17: main
int main(int argc, char* argv[])
#endif
{
if( !Begin() )
return -1;
DWORD time = 0;
while(true)
{
#if !defined(_DEBUG) && defined(WIN32)
__try
{
#endif
if (MainServer.getServerState() == EStateStopping) {
break;
}
Logic();
if( timeGetTime() - time > 2000 )
{
time = timeGetTime();
Output();
}
#if !defined(_DEBUG) && defined(WIN32)
}
__except (HandleException(GetExceptionInformation(), "CentralServers"))
{
// We don't actually do anything inside the handler. All of the
// work is done by HandleException()
}
#endif
#ifdef _WIN32
Sleep(1);
#else
#ifdef __linux__
usleep(1000);
#endif
#endif
}
End();
return 0;
}
开发者ID:songjundev,项目名称:odinKitServer,代码行数:47,代码来源:PaymentServer.cpp
示例18: executeShell
static int executeShell(int argc, char *argv[])
{
int code = 0;
__try
{
code = avmshell::Shell::run(argc, argv);
if (code == avmshell::OUT_OF_MEMORY)
::OutputDebugStringA("OUT OF MEMORY\n");
}
__except(avmshell::CrashFilter(GetExceptionInformation(), GetExceptionCode()))
{
code = -1;
}
return code;
}
开发者ID:bsdf,项目名称:AVMPLUS_MAC,代码行数:17,代码来源:avmshellWin.cpp
示例19: bpdi
unsigned int bpdi(unsigned short _bp, unsigned short _di)
{
volatile unsigned int res = 0;
_try {
_asm {
mov di, _di
mov bp, _bp
_emit 0x67
mov ax, [ebx] // [bp+di]
}
}
_except(res = (GetExceptionInformation())->ExceptionRecord->ExceptionInformation[1], 1) {
}
return res;
}
开发者ID:sf2team,项目名称:samples,代码行数:17,代码来源:AddressSizePrefix1.cpp
示例20: DokanBuildRequest
NTSTATUS
DokanBuildRequest(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
BOOLEAN AtIrqlPassiveLevel = FALSE;
BOOLEAN IsTopLevelIrp = FALSE;
NTSTATUS Status = STATUS_UNSUCCESSFUL;
__try {
__try {
AtIrqlPassiveLevel = (KeGetCurrentIrql() == PASSIVE_LEVEL);
if (AtIrqlPassiveLevel) {
FsRtlEnterFileSystem();
}
if (!IoGetTopLevelIrp()) {
IsTopLevelIrp = TRUE;
IoSetTopLevelIrp(Irp);
}
Status = DokanDispatchRequest(DeviceObject, Irp);
}
__except (DokanExceptionFilter(Irp, GetExceptionInformation()))
{
Status = DokanExceptionHandler(DeviceObject, Irp, GetExceptionCode());
}
}
__finally {
if (IsTopLevelIrp) {
IoSetTopLevelIrp(NULL);
}
if (AtIrqlPassiveLevel) {
FsRtlExitFileSystem();
}
}
return Status;
}
开发者ID:nmlgc,项目名称:dokany,代码行数:45,代码来源:dispatch.c
注:本文中的GetExceptionInformation函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论