ExAllocatePool causes console app to crash!

device driver

    Sponsored Links

    Next

  • 1. PCI driver
    Hi everybody, I'm a young software engineer and I have no experience in the driver developement. I developped for my company a PCI board (it composed of a CPLD and FIFOs). I must now develop its driver. Thanks to the DDK and others documentations, I succeeded to detect it and to read its configuration space. My problem is to read and write data through this board. I don't know exactly how to make. I try to create an "AddDevice" routine to attach the device to the device stack but, when I'm running my driver, my computer reboot. I try to proceed in an other way but, when I run my WriteFile routine in my application, my computer reboot too. Is there someone who could help me to debug my problem? Regards, Christophe AMARY ACTA SAS Rue de la crte au coq 14150 Ouistreham - FRANCE XXXX@XXXXX.COM
  • 2. How to debug hang issue
    This is a multi-part message in MIME format. My system hanged when special application when my device driver is loaded. When the system is being hanged, I can't trace into my source code. How to debug it? Thank you! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2800.1476" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT size=2><FONT color=black size=2><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"><FONT face=Arial>My system hanged when special application when my device driver is loaded. When the system is being hanged, I can't trace into my source code. How to debug it? Thank you!</FONT></SPAN></FONT></DIV></FONT></BODY></HTML>
  • 3. NdisMSendComplete question.
    Is it normal for a nimiport driver to forget to call NdisMSendComplete for a pending packet once in a while? On a 100Mbps nic I am getting about 1 forgot packet every cople of seconds when receieving at about 80% of the bandwidth. The NIC and it's driver are not my own, it's a generic SMC card.
  • 4. NDIS - asymmetric link speed
    Dear NDIS gurus, Now I have adapter with asymmetric send/receive speed ( uplink speed about 1/3... 1/4 of downlink). The media type is ethernet (generic or, possibly, 802.11 emulated). How TCPIP relies on link speed value reported by driver? which link speed the driver should report? And same question, if the device does throttling and prioritizing - the actual link speed is different for different payload types. The marketing, sure enough, wants to display the biggest speed value... Thanks, Pavel
  • 5. Accessing and programming PCI EEPROM
    Hi, I'm new to PCI driver development. Is there any way to access and program EEPROM on the PCI card in XP/W2K? Like, to program or write data to the PCI configuration space. I would like to program a new PCI card coming out from the production line, then plug that card into XP, there will be no PnP events because no PCI config., Then I would like to program configuration data to that PCI cards. Is that possible to do it? Can I write a WDM driver to do that kind of things or is there tools doing that kind of things already exist? thank you very much, Bandu

ExAllocatePool causes console app to crash!

Postby SXJmYW4gSHVzc2Fpbg » Fri, 16 Apr 2004 21:51:03 GMT

Hi all, I'm very new to DDK. Is it possible to use the ExAllocatePool() in console application? in my simple console application, it causes the application to crash and gives this message: "The application failed to initialize properly (0xc0000005). Click on OK ...". Thank you.

Re: ExAllocatePool causes console app to crash!

Postby Bill McKenzie » Fri, 16 Apr 2004 22:29:10 GMT

You understand the difference between kernel-mode and user-mode right?  You
can't use kernel calls in a user-mode application.  Try malloc or some
variant thereof.

-- 
Bill McKenzie
Software Engineer - Prism 802.11 Wireless Solutions
Conexant Systems, Inc.






console application? in my simple console application, it causes the
application to crash and gives this message: "The application failed to
initialize properly (0xc0000005). Click on OK ...". Thank you.



Re: ExAllocatePool causes console app to crash!

Postby Don Burn » Fri, 16 Apr 2004 23:02:08 GMT

No the DDK API's are for drivers and kernel mode components only/

-- 
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply





console application? in my simple console application, it causes the
application to crash and gives this message: "The application failed to
initialize properly (0xc0000005). Click on OK ...". Thank you.



Re: ExAllocatePool causes console app to crash!

Postby James Antognini [MSFT] » Sun, 18 Apr 2004 05:20:03 GMT

It's not that simple. The DDK includes APIs intended for user space, for
example, SetupDiGetDeviceRegistryProperty.

-- 
James Antognini
Windows DDK Support

This posting is provided "AS IS" with no warranties, and confers no rights.








in



Similar Threads:

1.geforce graphics card driver causes run a dll as an app crash

after i installed the new nivida driver the graphics card 
settings panel keeps having to close and a error message 
saying run a dll as a app needs to close. cheers

2.Simple Block Driver (RAM DISK) - Console Crash (specific case)

3.Mysterious Crash in Printing App upon selecting printer

Ashwin,

Thanks for your reply.
I didn't call GlobalFree anywhere in my code.
I should have provided more than the first 3 lines in the stack trace.
Here is a full picture of it:

NTDLL!RtlpCoalesceFreeBlocks
NTDLL!RtlReAllocateHeap
KERNEL32!GlobalFree
COMDLG32!?MergeDevMode@CPrintBrowser
COMDLG32!?OnSelChange@CPrintBrowser
comdlg32!0x00000000763D60D7
USER32!xxxLBSetSel
USER32!MLMouseToIch
USER32!DT_BreakAWord
USER32!ChangeMenuA
USER32!_GetWIndowWord
USER32!RtlMBMessageWParamCharToWCS
USER32!RtlMBMessageWParamCharToWCS
USER32!SystemParametersInfoW
COMCTL32!ListView_HandleMouse
COMCTL32!ListView_OnButtonDown
COMCTL32!ListView_WndProc
USER32!xxxLBSetSel
USER32!_GetWindowWord
USER32!RtlMBMessageWParamCharToWCS
USER32!RtlMBMessageWParamCharToWCS
USER32!SystemParametersInfoW
COMCTL32!Prop_IsDialogMessage
COMCTL32!_RealPropertySheet
COMCTL32!_PropertySheet
COMDLG32!Print_InvokePropertySheets
COMDLG32!PrintDlgExX
COMDLG32!PrintDlgExW
notepad!0x00000000010059D8
notepad!0x0000000001006778
notepad!0x0000000001002C29
notepad!0x0000000001003630
USER32!xxxLBSetSel
USER32!_GetWindowWord
USER32!RtlMBMessageWParamCharToWCS
USER32!RtlMBMessageWParamCharToWCS
USER32!SystemParametersInfo
notepad!0x0000000001006C54
KERNEL32!BaseProcessStart

Still puzzled what caused it.
Any ideas ?

Many many thanks,
Michael.


""Ashwin [MS]"" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
> It sounds like you are calling GlobalFree on something that is no longer
> yours. I suggest that you review your code closely to determine what is
> causing the crash.
>
> - Ashwin
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>


4.MSSQL JDBC driver crashing Java app?

I am having a strange problem.  I am running a java app as a service 
through JNI and with no repeatable pattern the app is terminated after 
sending a query to SQL Server through the MS JDBC driver and waiting for 
results to come back.  But it doesn't do this consistently.  Nothing 
shows up in my logs but a Dr. Watson message dump shows up in the Event 
log.  I have not eliminated the possibility that it has to do with 
running as a service but I will say I have other java apps running as a 
service on the same box that do not use SQL and are not terminated.  Has 
anyone experienced any weird behavior with the MS JDBC driver, perhaps 
under heavy load?  Thanks in advance.

5.[2.4]drivers/char/console.c: check if caller is proprietary of the current console

6. USBAudio.sys causes blue screen crash under certain conditions

7. UMDF driver causing a Framework crash

8. driver_irql_less_or_equal - Driver causes crash



Return to device driver

 

Who is online

Users browsing this forum: No registered users and 94 guest