HiyaMicrosoft .NET Passport is a suite of Web-based services that help make using the Internet and p...
By eddie5659
GreetingsI'am assuming ZwQueryInformationFile(..FileAlignmentInformation..) to always return FILE_B...
By anonymous
Kurt,When deleting Rman objects on the TSM Server, TDP uses the deletefunction on objectsthe objects...
By neilrasmussen
Posted on behalf of Jacques Terken, Sriram Subramanian and Massimo ZancanaroCall for PapersUser-cent...
By silviarocchi
This post [1] looked interesting as it seems to avoid the Big Design UpFront syndrome. Any comme...
By ed_suominen, 5 Comments
Hi All, My ZwCreateFile does not succeed at all. I had this problem initially and i got this suddenl...
By anonymous, 1 Comments
I have downloaded swbuff from:http://sourceforge.net/projects/emhacks/I have put the file in my load...
By hbb, 3 Comments
Dear MS Project Expert, I am calculating the "planned % complete" with the next formula: Left(str(II...
By anonymous, 2 Comments
Hi,I need to read some rss from the internet; so am using the System.Net.WebRequest / System.Net.Web...
By computer_pet, 1 Comments
Alex
You did not specify how exactly did the ZwOpenFile failed, more details could be useful..
You cannot access files with this path, try \\'\\C:\\test.out
Also, why do you use KeRaiseIrql? PASSIVE_LEVEL is the lowest and if you aren't already ther
you should not try to use the ZwOpenFile
G
anonymous | Tues, 20 May 2008 08:05:00 GMT |
Thank you so much ! Gram !
In fact , I must Open COM port in my driver , but I tried to open a normal
file first, and have not openned it . So I do not understand why .
I have deleted the lines KeRaiseIrdl . And tried with path
\\'\\C:\\test.out . and always get errors. Maybe in
InitializeObjectAttrbutes'
If you have any idea about openning COM port , pls help me directly with COM
. I am now very confuse .
Waiting for help from you !
Thank you so much !
HANDLE fileOpen;
OBJECT_ATTRIBUTES objAttr;
UNICODE_STRING sLinkName;
#define COM_NAME L"\\'\\C:\\test.out"
RtlInitUnicodeString( &sLinkName, COM_NAME);
InitializeObjectAttributes(
&objAttr,
&sLinkName,
OBJ_EXCLUSIVE,
NULL,
NULL);
LARGE_INTEGER nSize;
IO_STATUS_BLOCK ioStat;
NTSTATUS statusOpen = ZwOpenFile(
OUT &fileOpen,
IN FILE_READ_DATA | FILE_WRITE_DATA,
IN &objAttr,
OUT &ioStat,
IN FILE_SHARE_READ,
IN FILE_NON_DIRECTORY_FILE
);
DbgPrint("statusOpen= %X.", statusOpen); // return statusOpen=C000000D.
"Gram" <anonymous...discussions.microsoft.com> wrote in message
news:FF8EF646-4089-4998-B330-E7F53392341E...microsoft.com...
> Alex,
> You did not specify how exactly did the ZwOpenFile failed, more details
could be useful...
> You cannot access files with this path, try \\'\\C:\\test.out.
> Also, why do you use KeRaiseIrql? PASSIVE_LEVEL is the lowest and if you
aren't already there
> you should not try to use the ZwOpenFile?
> G.
>
alex | Tues, 20 May 2008 08:06:00 GMT |
NTSTATUS 0x0C000000D is "STATUS_INVALID_PARAMETER"
So, double check your parameters, re-read the ddk documentation for
ZwOpenFile, and, don' use something you don't understand or didn't check out
in the DDK first, example, why did you used "OBJ_EXCLUSIVE"?
Did you looked in DDK what OBJ_EXCLUSIVE is used for?
"Alex" <Chipheo2k...hotmail.com> wrote in message
news:ujGwCnvREHA.3660...tk2msftngp13.phx.gbl...
> Thank you so much ! Gram !
> In fact , I must Open COM port in my driver , but I tried to open a
normal
> file first, and have not openned it . So I do not understand why .
> I have deleted the lines KeRaiseIrdl . And tried with path
> \\'\\C:\\test.out . and always get errors. Maybe in
> InitializeObjectAttrbutes'
> If you have any idea about openning COM port , pls help me directly with
COM
> . I am now very confuse .
> Waiting for help from you !
> Thank you so much !
> HANDLE fileOpen;
> OBJECT_ATTRIBUTES objAttr;
> UNICODE_STRING sLinkName;
> #define COM_NAME L"\\'\\C:\\test.out"
> RtlInitUnicodeString( &sLinkName, COM_NAME);
> InitializeObjectAttributes(
> &objAttr,
> &sLinkName,
> OBJ_EXCLUSIVE,
> NULL,
> NULL);
> LARGE_INTEGER nSize;
> IO_STATUS_BLOCK ioStat;
>
> NTSTATUS statusOpen = ZwOpenFile(
> OUT &fileOpen,
> IN FILE_READ_DATA | FILE_WRITE_DATA,
> IN &objAttr,
> OUT &ioStat,
> IN FILE_SHARE_READ,
> IN FILE_NON_DIRECTORY_FILE
> );
>
> DbgPrint("statusOpen= %X.", statusOpen); // return statusOpen=> C000000D.
>
>
>
> "Gram" <anonymous...discussions.microsoft.com> wrote in message
> news:FF8EF646-4089-4998-B330-E7F53392341E...microsoft.com...
> > Alex,
> > You did not specify how exactly did the ZwOpenFile failed, more details
> could be useful...
> > You cannot access files with this path, try \\'\\C:\\test.out.
> > Also, why do you use KeRaiseIrql? PASSIVE_LEVEL is the lowest and if you
> aren't already there
> > you should not try to use the ZwOpenFile?
> >
> > G.
> >
>
alex | Tues, 20 May 2008 08:07:00 GMT |
Thank Alex!
So which value must be used for it ?
For a normal file ( text file ) , and for a Device ( Comm Port ) . I only
tried to pass different values to get true result . In DDK wrote nothing
about it !
damm ..
"Alex the 1'ts" <AlX...a> wrote in message
news:OrgLnzxREHA.2496...TK2MSFTNGP11.phx.gbl...
> NTSTATUS 0x0C000000D is "STATUS_INVALID_PARAMETER"
> So, double check your parameters, re-read the ddk documentation for
> ZwOpenFile, and, don' use something you don't understand or didn't check
out
> in the DDK first, example, why did you used "OBJ_EXCLUSIVE"?
> Did you looked in DDK what OBJ_EXCLUSIVE is used for?
>
> "Alex" <Chipheo2k...hotmail.com> wrote in message
> news:ujGwCnvREHA.3660...tk2msftngp13.phx.gbl...
> > Thank you so much ! Gram !
> > In fact , I must Open COM port in my driver , but I tried to open a
> normal
> > file first, and have not openned it . So I do not understand why .
> > I have deleted the lines KeRaiseIrdl . And tried with path
> > \\'\\C:\\test.out . and always get errors. Maybe in
> > InitializeObjectAttrbutes'
> > If you have any idea about openning COM port , pls help me directly with
> COM
> > . I am now very confuse .
> > Waiting for help from you !
> > Thank you so much !
> >
> > HANDLE fileOpen;
> > OBJECT_ATTRIBUTES objAttr;
> > UNICODE_STRING sLinkName;
> > #define COM_NAME L"\\'\\C:\\test.out"
> > RtlInitUnicodeString( &sLinkName, COM_NAME);
> >
> > InitializeObjectAttributes(
> > &objAttr,
> > &sLinkName,
> > OBJ_EXCLUSIVE,
> > NULL,
> > NULL);
> >
> > LARGE_INTEGER nSize;
> > IO_STATUS_BLOCK ioStat;
> >
> >
> > NTSTATUS statusOpen = ZwOpenFile(
> > OUT &fileOpen,
> > IN FILE_READ_DATA | FILE_WRITE_DATA,
> > IN &objAttr,
> > OUT &ioStat,
> > IN FILE_SHARE_READ,
> > IN FILE_NON_DIRECTORY_FILE
> > );
> >
> >
> > DbgPrint("statusOpen= %X.", statusOpen); // return statusOpen=> > C000000D.
> >
> >
> >
> >
> >
> >
> > "Gram" <anonymous...discussions.microsoft.com> wrote in message
> > news:FF8EF646-4089-4998-B330-E7F53392341E...microsoft.com...
> > > Alex,
> > > You did not specify how exactly did the ZwOpenFile failed, more
details
> > could be useful...
> > > You cannot access files with this path, try \\'\\C:\\test.out.
> > > Also, why do you use KeRaiseIrql? PASSIVE_LEVEL is the lowest and if
you
> > aren't already there
> > > you should not try to use the ZwOpenFile?
> > >
> > > G.
> > >
> >
> >
>
alex | Tues, 20 May 2008 08:08:00 GMT |
> > > InitializeObjectAttributes(
> > > &objAttr,
> > > &sLinkName,
> > > OBJ_EXCLUSIVE,
> > > NULL,
> > > NULL);
Why do you use OBJ_EXCLUSIVE? This flas IS documented in the DDK, did you
look at it?
> > >
> > > LARGE_INTEGER nSize;
> > > IO_STATUS_BLOCK ioStat;
> > >
> > >
> > > NTSTATUS statusOpen = ZwOpenFile(
> > > OUT &fileOpen,
> > > IN FILE_READ_DATA | FILE_WRITE_DATA,
> > > IN &objAttr,
> > > OUT &ioStat,
> > > IN FILE_SHARE_READ,
> > > IN FILE_NON_DIRECTORY_FILE
> > > );
ZwOpenFile IS well documented in the DDK, did you read the documentation
carefully? Even at a glance I can see a wrong parameter.
If the OS tells you, you used same invalid parameters, you better belive it.
Now, why don't you look in the DDK and see for yourself?
> > >
> > >
> > > DbgPrint("statusOpen= %X.", statusOpen); // return statusOpen=> > > C000000D.
> > >
> > >
> > >
> > >
> > >
> > >
> > > "Gram" <anonymous...discussions.microsoft.com> wrote in message
> > > news:FF8EF646-4089-4998-B330-E7F53392341E...microsoft.com...
> > > > Alex,
> > > > You did not specify how exactly did the ZwOpenFile failed, more
> details
> > > could be useful...
> > > > You cannot access files with this path, try \\'\\C:\\test.out.
> > > > Also, why do you use KeRaiseIrql? PASSIVE_LEVEL is the lowest and if
> you
> > > aren't already there
> > > > you should not try to use the ZwOpenFile?
> > > >
> > > > G.
> > > >
> > >
> > >
> >
> >
>
alex | Tues, 20 May 2008 08:09:00 GMT |