![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
BSOD KeBugCheckEx как??? [D7, WinXP]
timotei © (2005-10-18 14:56:00)Простой вопрос. Как намеренно вызвать BSOD с указанием кода ошибки? Я так понял это выполняет функция KeBugCheckEx? Маленький пример приветствуется :)
Idx (2005-10-19 11:06:00) [1]И мне если можно MS-MEN@yandex.ru
_silver (2005-10-19 08:25:00) [2]Игорь Шевченко © (18.10.05 22:18) [11]
Спасибо.
Игорь Шевченко (2005-10-18 22:18:00) [3]_silver © (18.10.05 19:38) [10]
<offtopic>
Отослал
</offtopic>
_silver (2005-10-18 19:38:00) [4]<offtop>
Игорь, если у вас ddk для w2k или xp, не могли бы мне выслать содержимое 3х папок?
src\video\displays\mirror\disp
src\video\miniport\mirror\mini
src\video\displays\mirror\app
Заранее спасибо.
</offtop>
umbra (2005-10-18 17:16:00) [5]
> procedure KeBugCheck(err: integer); external 'ntoskrnl.exe';
Я не специалист по апи, но только что здесь
http://www.delphimaster.ru/cgi-bin/forum.pl?id=1129629760&n=0
читал про экспортирование функций. Там проблема была в соглашении о вызове.
Игорь Шевченко (2005-10-18 17:11:00) [6]timotei (18.10.05 17:05) [7]
> а из обычного приложения?
А из обычного нельзя.
timotei (2005-10-18 17:05:00) [7]Ну вот, это драйвер. а из обычного приложения?
Игорь Шевченко (2005-10-18 16:54:00) [8]
> У меня нет DDK можно copypaste'ом?
Можно.
VOID
ClasspReleaseQueue(
IN PDEVICE_OBJECT Fdo,
IN PIRP ReleaseQueueIrp OPTIONAL
)
{
PIO_STACK_LOCATION irpStack;
PIRP irp;
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = Fdo->DeviceExtension;
PDEVICE_OBJECT lowerDevice;
PSCSI_REQUEST_BLOCK srb;
KIRQL currentIrql;
lowerDevice = fdoExtension->CommonExtension.LowerDeviceObject;
//
// we raise irql seperately so we're not swapped out or suspended
// while holding the release queue irp in this routine. this lets
// us release the spin lock before lowering irql.
//
KeRaiseIrql(DISPATCH_LEVEL, ¤tIrql);
KeAcquireSpinLockAtDpcLevel(&(fdoExtension->ReleaseQueueSpinLock));
//
// make sure that if they passed us an irp, it matches our allocated irp.
//
ASSERT((ReleaseQueueIrp == NULL) ||
(ReleaseQueueIrp == fdoExtension->PrivateFdoData->ReleaseQueueIrp));
//
// ASSERT that we've already allocated this. (should not occur)
// try to allocate it anyways, then finally bugcheck if
// there's still no memory...
//
ASSERT(fdoExtension->PrivateFdoData->ReleaseQueueIrpAllocated);
if (!fdoExtension->PrivateFdoData->ReleaseQueueIrpAllocated) {
ClasspAllocateReleaseQueueIrp(fdoExtension);
}
if (!fdoExtension->PrivateFdoData->ReleaseQueueIrpAllocated) {
KeBugCheckEx(SCSI_DISK_DRIVER_INTERNAL, 0x12, (ULONG_PTR)Fdo, 0x0, 0x0);
}
timotei (2005-10-18 16:50:00) [9]главной формы нет.
umbra (2005-10-18 16:37:00) [10]
> begin
> Application.Initialize;
> Application.Run;
> KeBugCheck(11);
> exit;
> end.
>
А что, синий экран нужен после закрытия главной формы?
timotei (2005-10-18 16:21:00) [11]Делаю так, вываливается с EAccessViolation:
program Project1;
uses
Forms,
Windows, Messages, SysUtils, Variants, Classes, Dialogs;
procedure KeBugCheck(err: integer); external 'ntoskrnl.exe';
begin
Application.Initialize;
Application.Run;
KeBugCheck(11);
exit;
end.
timotei (2005-10-18 16:12:00) [12]А эту процедуру вообще из регулярного приложения delphi вызвать можно?
У меня нет DDK можно copypaste'ом?
Игорь Шевченко (2005-10-18 15:52:00) [13]
> Маленький пример приветствуется :)
В DDK в примерах есть.