Home > other >  Bosses help have a look at what the problem
Bosses help have a look at what the problem

Time:10-01

//a_head. H
# pragma once
#include
#include
#include

CHAR Password [50];
CHAR word [50];
BOOLEAN is_crypt;
BOOLEAN is_crypt_2=FALSE;
Void cin_ ()
{
While (1)
{
Scanf_s (word);
if (! STRCMP (word, Password))
{
Printf_s (decryption keys are correct, "success");
break;
}
The else printf_s (" key error ");
}
}


C
//judge.#include
#include
#include
# include "a_head. H"
//filter read
NTSTATUS SfRead (PDEVICE_OBJECT DeviceObject, points IN the IN PIRP Irp)
{
PIO_STACK_LOCATION irp_stack;
NTSTATUS status;
PSFILTER_DEVICE_EXTENSION devExt;
PAGED_CODE ();
ASSERT (! IS_MY_CONTROL_DEVICE_OBJECT DeviceObject ());
ASSERT (IS_MY_DEVICE_OBJECT DeviceObject ());
DevExt=(PSFILTER_DEVICE_EXTENSION) (DeviceObject - & gt; DeviceExtension);
If (Irp - & gt; Flags & amp; (IRP_NOCACHE | IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO))
{
Irp_stack=IoGetCurrentIrpStackLocation (Irp);
Is_crypt=IsMyCryptFile (irp_stack - & gt; FileObject);
If (is_crypt)//is my encrypted file
{
//set up complete routines
IoCopyCurrentIrpStackLocationToNext (Irp);
Cin_ ();

/* IoSetCompletionRoutine (Irp, SfReadCompletion, 0, TRUE, FALSE, FALSE); */

//call the original driver
Return IoCallDriver (devExt - & gt; AttachedToDeviceObject, Irp);
}
}
//the encrypted file
IoSkipCurrentIrpStackLocation (Irp);
Return IoCallDriver (devExt - & gt; AttachedToDeviceObject, Irp);
}


C
//encryption.#include
#include
# include "a_head. H"

//encryption
VOID jiami ()
{
Printf_s (" enter key ");
Scanf_s (Password);
Is_crypt_2=TRUE;
Printf_s (" encryption success ");
}
//decryption
VOID jiemi ()
{
Printf_s (" enter key ");
While (1)
{
Scanf_s (word);
if (! STRCMP (word, Password))
{
Printf_s (" key right ");
Is_crypt_2=FALSE;
Printf_s (" decryption success ");
break;
}
The else printf_s (" key error ");
}
}


Why is PSFILTER_DEVICE_EXTENSION undefined identifiers?
How to change this to run?
  • Related