On 5/9/06, Vitaliy Margolen <[EMAIL PROTECTED]> wrote:
Monday, May 8, 2006, 11:35:46 PM, James Hawkins wrote: > Hi,> Changelog: > * Add initial tests for the NT port functions. > dlls/ntdll/tests/Makefile.in | 1 > dlls/ntdll/tests/port.c | 314 > ++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 315 insertions(+), 0 deletions(-) > create mode 100644 dlls/ntdll/tests/port.c > -- > James Hawkins > +typedef struct _LPC_SECTION_READ > +{ > + ULONG Length; > + ULONG ViewSize; > + PVOID ViewBase; > +} LPC_SECTION_READ, *PLPC_SECTION_READ; > + This should go as a separate patch to include/ddk I think.
These structures are already in include/winternl.h. I've enclosed them around an #ifdef __WINE_WINTERNL_H so that the tests compile on windows.
> + HRESULT hr; > + > + ok(LpcMessage->>MessageType == LPC_CONNECTION_REQUEST, > + "Expected LPC_CONNECTION_REQUEST, got %d\n", LpcMessage->MessageType); > + ok(!*LpcMessage->Data, "Expected empty string!\n"); > + > + hr = pNtAcceptConnectPort(pAcceptPortHandle, 0, LpcMessage, 1, 0, NULL); > + ok(hr == S_OK, "Expected S_OK, got %ld\n", hr); HRESULT and NTSATUS are not the same things. You should not use HRESULT here at all.
Oops I meant to change these already :) -- James Hawkins
