Click here to Skip to main content
15,895,746 members
Articles / Programming Languages / C++

The Ultimate Process/Thread spy for Windows 9x.

Rate me:
Please Sign up or sign in to vote.
4.44/5 (9 votes)
27 Mar 20033 min read 106.4K   1K   26  
Process/thread creation/destruction detector for Windows 9x .
.386p

include basedef.inc
include vmm.inc
include debug.inc
include vwin32.inc
include vdmad.inc
include shell.inc

.errndef	SEGNUM

IFE	SEGNUM-1

	SEGB	TEXTEQU	<VXD_LOCKED_CODE_SEG>
	SEGE	TEXTEQU	<VXD_LOCKED_CODE_ENDS>

ELSEIFE	SEGNUM-2

	SEGB	TEXTEQU	<VXD_ICODE_SEG>
	SEGE	TEXTEQU	<VXD_ICODE_ENDS>

ELSEIFE	SEGNUM-3

	SEGB	TEXTEQU	<VXD_PAGEABLE_CODE_SEG>
	SEGE	TEXTEQU	<VXD_PAGEABLE_CODE_ENDS>

ELSEIFE	SEGNUM-4

	SEGB	TEXTEQU	<VXD_STATIC_CODE_SEG>
	SEGE	TEXTEQU	<VXD_STATIC_CODE_ENDS>

ELSEIFE	SEGNUM-5

	SEGB	TEXTEQU	<VXD_DEBUG_ONLY_CODE_SEG>
	SEGE	TEXTEQU	<VXD_DEBUG_ONLY_CODE_ENDS>

ELSEIFE	SEGNUM-6

	SEGB	TEXTEQU	<VXD_PNP_CODE_SEG>
	SEGE	TEXTEQU	<VXD_PNP_CODE_ENDS>

ELSE
	%OUT	Wrong SEGNUM
	.err

ENDIF

BEGSEG			MACRO
SEGB
ENDM

ENDSEG			MACRO
SEGE
ENDM

@RETNAME		MACRO	Name
			LOCAL	txt
IFE	SEGNUM-1

	txt	TEXTEQU	@CATSTR(_LCODE_,Name)

ELSEIFE	SEGNUM-2

	txt	TEXTEQU @CATSTR(_ICODE_,Name)

ELSEIFE	SEGNUM-3

	txt	TEXTEQU @CATSTR(_PCODE_,Name)

ELSEIFE	SEGNUM-4

	txt	TEXTEQU @CATSTR(_SCODE_,Name)

ELSEIFE	SEGNUM-5

	txt	TEXTEQU @CATSTR(_DCODE_,Name)

ELSE

	txt	TEXTEQU @CATSTR(_CCODE_,Name)

ENDIF

			EXITM	txt
ENDM


StartCDecl		MACRO	Name
PUBLIC			@RETNAME(Name)
BEGSEG
@RETNAME(Name)		PROC	NEAR
ENDM

EndCDecl		MACRO	Name
@RETNAME(Name)		ENDP
ENDSEG
ENDM

MakeCDecl		MACRO	Name
StartCDecl		Name
			VxDJmp	Name
EndCDecl		Name
ENDM

MakeStdCall		MACRO	Name, Param
StartCDecl		Name&@&Param
	   		VxDJmp	Name
EndCDecl		Name&@&Param
ENDM

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions