能力值:
( LV6,RANK:90 )
2 楼
可以创建事件,内核有数据了通知用户层,然后RING3向RING0请求数据。
能力值:
( LV2,RANK:10 )
3 楼
需要用IoCtrl 吗。我不能用这个东西。
如果有pepi的使用方法最好。
能力值:
( LV4,RANK:50 )
4 楼
NTSTATUS
NtCreateNamedPipeFile (
__out PHANDLE FileHandle,
__in ULONG DesiredAccess,
__in POBJECT_ATTRIBUTES ObjectAttributes,
__out PIO_STATUS_BLOCK IoStatusBlock,
__in ULONG ShareAccess,
__in ULONG CreateDisposition,
__in ULONG CreateOptions,
__in ULONG NamedPipeType,
__in ULONG ReadMode,
__in ULONG CompletionMode,
__in ULONG MaximumInstances,
__in ULONG InboundQuota,
__in ULONG OutboundQuota,
__in_opt PLARGE_INTEGER DefaultTimeout
)
/*++
Routine Description:
Creates and opens the server end handle of the first instance of a
specific named pipe or another instance of an existing named pipe.
Arguments:
FileHandle - Supplies a handle to the file on which the service is being
performed.
DesiredAccess - Supplies the types of access that the caller would like to
the file.
ObjectAttributes - Supplies the attributes to be used for file object
(name, SECURITY_DESCRIPTOR, etc.)
IoStatusBlock - Address of the caller's I/O status block.
ShareAccess - Supplies the types of share access that the caller would
like to the file.
CreateDisposition - Supplies the method for handling the create/open.
CreateOptions - Caller options for how to perform the create/open.
NamedPipeType - Type of named pipe to create (Bitstream or message).
ReadMode - Mode in which to read the pipe (Bitstream or message).
CompletionMode - Specifies how the operation is to be completed.
MaximumInstances - Maximum number of simultaneous instances of the named
pipe.
InboundQuota - Specifies the pool quota that is reserved for writes to the
inbound side of the named pipe.
OutboundQuota - Specifies the pool quota that is reserved for writes to
the inbound side of the named pipe.
DefaultTimeout - Optional pointer to a timeout value that is used if a
timeout value is not specified when waiting for an instance of a named
pipe.
Return Value:
The function value is the final status of the create/open operation.
--*/
{
NAMED_PIPE_CREATE_PARAMETERS namedPipeCreateParameters;
PAGED_CODE();
//
// Check whether or not the DefaultTimeout parameter was specified. If
// so, then capture it in the named pipe create parameter structure.
//
if (ARGUMENT_PRESENT( DefaultTimeout )) {
//
// Indicate that a default timeout period was specified.
//
namedPipeCreateParameters.TimeoutSpecified = TRUE;
//
// A default timeout parameter was specified. Check to see whether
// the caller's mode is kernel and if not capture the parameter inside
// of a try...except clause.
//
if (KeGetPreviousMode() != KernelMode) {
try {
ProbeForReadSmallStructure ( DefaultTimeout,
sizeof( LARGE_INTEGER ),
sizeof( ULONG ) );
namedPipeCreateParameters.DefaultTimeout = *DefaultTimeout;
} except(EXCEPTION_EXECUTE_HANDLER) {
//
// Something went awry attempting to access the parameter.
// Get the reason for the error and return it as the status
// value from this service.
//
return GetExceptionCode();
}
} else {
//
// The caller's mode was kernel so simply store the parameter.
//
namedPipeCreateParameters.DefaultTimeout = *DefaultTimeout;
}
} else {
//
// Indicate that no default timeout period was specified.
//
namedPipeCreateParameters.TimeoutSpecified = FALSE;
}
//
// Store the remainder of the named pipe-specific parameters in the
// structure for use in the call to the common create file routine.
//
namedPipeCreateParameters.NamedPipeType = NamedPipeType;
namedPipeCreateParameters.ReadMode = ReadMode;
namedPipeCreateParameters.CompletionMode = CompletionMode;
namedPipeCreateParameters.MaximumInstances = MaximumInstances;
namedPipeCreateParameters.InboundQuota = InboundQuota;
namedPipeCreateParameters.OutboundQuota = OutboundQuota;
//
// Simply perform the remainder of the service by allowing the common
// file creation code to do the work.
//
return IoCreateFile( FileHandle,
DesiredAccess,
ObjectAttributes,
IoStatusBlock,
(PLARGE_INTEGER) NULL,
0L,
ShareAccess,
CreateDisposition,
CreateOptions,
(PVOID) NULL,
0L,
CreateFileTypeNamedPipe,
&namedPipeCreateParameters,
0 );
}
能力值:
( LV2,RANK:10 )
5 楼
老大,您上面的这类资料,是如何取得的, 感谢中.......
能力值:
( LV12,RANK:210 )
6 楼
http://www.ntkernel.com/w&p.php?id=17
能力值:
( LV2,RANK:10 )
7 楼
我在驱动开发网问的同一个问题,一直没人回我。
这儿早就已经把问题解决了。
这又没开驱动版块。可是我看这里的人对驱动都比较熟悉啊~~~
牛牛
能力值:
( LV9,RANK:490 )
8 楼
去驱网找这些东西吧,呵呵