Path: news.mitre.org!blanket.mitre.org!philabs!newsjunkie.ans.net!newsfeeds.ans.net!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!Supernews60!supernews.com!Supernews69!not-for-mail From: "Gary G. Little" Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode Subject: Re: Need help on NT's TDI-client! Date: Sun, 4 Jan 1998 09:37:08 -0800 Organization: All USENET -- http://www.Supernews.com Lines: 57 Message-ID: <68ohdf$t8e$1@usenet76.supernews.com> References: <01bd18e2$a7879cc0$5699bfcc@tom> NNTP-Posting-Host: 29966@207.155.60.56 X-Newsreader: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 It looks like you failed to increase the number of stack locations. After getting the pointer to the lower object using something like this: status = IoGetDeviceObjectPointer(&uniCodeParameter, FILE_ALL_ACCESS, &fileObject, &peac->physicalDevice); you then have to increment the StackSize field of the DEVICE_OBJECT by doing the following. deviceObject->StackSize = peac->physicalDevice->StackSize + 1; // Increase the stack size deviceObject points to the device object you created. peac->physicalDevice points to the device object you just layered onto. So, you take the stack size of the lower and add one to it and save that as your devices stack size. -- Unauthorized use of this email address for solicitation, will result in a fee charge of $250.00 per hour, with a 2 hour minimum. *** US Code Title 47 *** - Sec.227(a)(2)(B), a computer/modem/printer meets the definition of a telephone fax machine. - Sec.227(b)(1)(C), it is unlawful to send any unsolicited advertisement to such equipment. - Sec.227(b)(3)(C), a violation of the aforementioned section is punishable by action to recover actual monetary loss, or $500, whichever is greater, for each violation. Tom Lai wrote in message <01bd18e2$a7879cc0$5699bfcc@tom>... >Hi, > >Can anybody tell me why I'm consistently getting NO_MORE_IRP_STACK_LOCATION >exception when calling IoCallDriver() after I've successfully opened >"\\Device\\Udp" with ZwCreateFile() with the correct Ea field, got the >device object pointer with ObReferenceObjectByHandle(), got the IRP as DDK >say I should with TdiBuildInternalDeviceControlRequest(), and set the IRP >up with TdiBuildSetEventHandler()? All the steps leading to IoCallDriver() >returns NT_SUCCESS, and I thought that I've followed closely to the DDK >document about TDI-client. Should I create an IRP from scratch? And all >the calls are made at IRQL PASSIVE_LEVEL, so it should be OK, right? What >could be wrong with it? > >I'll greatly appreciate your help. Thank you. (This problem has caused me >so much headache after I have so successfully developed a really cool >kernel-mode TDI-client driver for Windows 95. And I was really confident >before I start porting it to NT, then all hell broke lose...) > > >Tom Lai >tomlai@istar.ca