home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
sherlock.zip
/
EXCEPT
/
EXCEPT.ZIP
/
SOURCE.ZIP
/
SAMPLE.C
< prev
next >
Wrap
Text File
|
1993-10-19
|
2KB
|
59 lines
/**********************************************************************/
/* IBM DAPTOOLS UseOnly */
/**********************************************************************/
/* */
/* SAMPLE */
/* */
/* SAMPLE 32 bit program to access EXCEPTQ.DLL exception handler */
/* SAMPLE generates a TRAP to demonstrate information gathering */
/* C-SET/2 compiler complies that code */
/**********************************************************************/
/* Version: 2.2 | Marc Fiammante */
/* | La Gaude FRANCE */
/**********************************************************************/
/* */
/**********************************************************************/
/* History: */
/* -------- */
/* */
/* created: Marc Fiammante December 1992 */
/**********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <direct.h>
#include <process.h>
#include <conio.h>
#define INCL_DOSSEMAPHORES
#define INCL_NOCOMMON
#define INCL_DOSPROCESS
#define INCL_DOSSEMAPHORES
#define INCL_DOSERRORS
#define INCL_DOSMODULEMGR /* handlers for DLLs */
#define INCL_DOSFILEMGR /* handlers for the dos file functions */
#define INCL_DOSMEMMGR /* get the memory management stuff in here */
#define INCL_DOSPROCESS
#define INCL_DOSDATETIME
#define INCL_BASE
#include <os2.h>
#include <bse.h>
USHORT APIENTRY16 SETEXCEPT(_Seg16 PEXCEPTIONREGISTRATIONRECORD);
main()
{
PCHAR Test;
EXCEPTIONREGISTRATIONRECORD ExceptReg;
printf("Setting exception handler\n");
SETEXCEPT(&ExceptReg);
printf("Generating the TRAP from thread\n");
Test=NULL;
*Test=0;
}