[pso] KeAdd....
Cibu Cristian
pso@cursuri.cs.pub.ro
Wed, 24 Mar 2004 18:46:10 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0013_01C411D0.462C61C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Cum nu e documentata in mod oficial, am cautat pe net...
=20
nBOOLEAN
STDCALL
KeAddSystemServiceTable (
PSSDT SSDT,
PULONG ServiceCounterTable,
ULONG NumberOfServices,
PSSPT SSPT,
ULONG TableIndex
);
typedef struct t_SSPT {
unsigned char ParamBytes;
} SSPT, *PSSPT; //adica un simplu BYTE
in alte variante serviceCounterTable este pus intotdeauna pe FALSE (?!?)
ce e defapt SCT sau CT sau cum s-o mai fi abreviand?
Din cate am inteles eu, pentru functia asta ne trebuie asa:
1. un vector de void* =3D pointeri catre rutinele de tratare =
a diferitelor apeluri sistem
2. o .... chestie care e in orice caz de dimensiunea unui int sau =
poate e un vector de longuri care ce fac? tin minte numarul de aparitii =
ale acelui apel de sistem ?
3. numarul de apeluri din noua tabela. aici iar am mai gasit =
variante cu indexul ultimei rutine valide (e o diferenta de 1 intre =
valori)
4. vector de BYTEs care da pentru fiecare apel sistem numarul de =
parametrii cu care se apeleaza rutina
5. indexul unde adaugam noua "tabela" =3D impus 3
Iar din cate imi dau eu seama, vectorii de mai sus trebuie alocati si =
(pentru ca nu s-a pomenit nicaieri de un deleteSystemServiceTable) raman =
alocati.
Deci
-al doilea parametru, ce e? vector sau "0".
-la iesirea din modul trebuie sa dealocam ceva ce am alocat aici sau =
sa apelam altceva?
------=_NextPart_000_0013_01C411D0.462C61C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Cum nu e documentata in mod oficial, am =
cautat pe=20
net...</FONT></DIV>
<DIV>
<DIV class=3DO v:shape=3D"_x0000_s1026"><SPAN=20
style=3D"FONT-SIZE: 111%; FONT-FAMILY: 'Times New Roman'">
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><SPAN=20
style=3D"FONT-SIZE: 80%; LEFT: -3.65%; COLOR: #0099cc; FONT-FAMILY: =
Wingdings; POSITION: absolute; TOP: 0.22em; mso-special-format: bullet; =
mso-color-index: =
4">n</SPAN>BOOLEAN<BR>STDCALL<BR>KeAddSystemServiceTable=20
(<BR> PSSDT SSDT,<BR> PULONG ServiceCounterTable,<BR> =
ULONG =20
=20
NumberOfServices,<BR> PSSPT SSPT,<BR> ULONG TableIndex<BR> =
);<BR><BR>typedef=20
struct t_SSPT =20
{<BR> &n=
bsp; =20
unsigned char ParamBytes;<BR>} SSPT, =
*PSSPT; =20
//adica un simplu BYTE<BR></DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2></FONT> </DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2>in alte variante serviceCounterTable este pus =
intotdeauna pe=20
FALSE (?!?)</FONT></DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2></FONT> </DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2>ce e defapt SCT sau CT sau cum s-o mai fi=20
abreviand?</FONT></DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2></FONT> </DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2>Din cate am inteles eu, pentru functia asta ne =
trebuie=20
asa:</FONT></DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2> 1. un vector de void* =
=20
=3D pointeri catre rutinele de tratare a diferitelor =
apeluri=20
sistem</FONT></DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2> 2. o .... chestie care e in =
orice caz de=20
dimensiunea unui int sau poate e un vector de longuri care ce fac? tin =
minte=20
numarul de aparitii ale acelui apel de sistem ?</FONT></DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2> 3. numarul de apeluri din noua =
tabela. aici=20
iar am mai gasit variante cu indexul ultimei rutine valide (e o =
diferenta de 1=20
intre valori)</FONT></DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2> 4. vector de BYTEs care da =
pentru fiecare=20
apel sistem numarul de parametrii cu care se apeleaza =
rutina</FONT></DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2> 5. indexul unde adaugam noua =
"tabela" =3D=20
impus 3</FONT></DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2></FONT> </DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2>Iar din cate imi dau eu seama, vectorii de mai sus =
trebuie=20
alocati si (pentru ca nu s-a pomenit nicaieri de un =
deleteSystemServiceTable)=20
raman alocati.</FONT></DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2></FONT> </DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2>Deci</FONT></DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2> -al doilea parametru, ce e? =
vector sau=20
"0".</FONT></DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial size=3D2> -la iesirea din modul trebuie =
sa dealocam=20
ceva ce am alocat aici sau sa apelam altceva?</FONT></DIV>
<DIV=20
style=3D"mso-line-spacing: '100 20 0'; mso-margin-left-alt: 216; =
mso-char-wrap: 1; mso-kinsoku-overflow: 1"><FONT=20
face=3DArial =
size=3D2></FONT> </DIV></SPAN></DIV></DIV></BODY></HTML>
------=_NextPart_000_0013_01C411D0.462C61C0--