User forums > Help
Segmentation fault using Beep()
tom0769:
Hi,
on my notebook (win XP home edition sp2) I get always "Segmentation fault" when calling winapi function "Beep".
MessageBeep() works fine.
On my desktop PC (win XP prof. sp2) and my older notebook (win 2k sp4) the same projects run without any problems.
On all systems C::B svn3545 is installed.
I investigated the file versions/dates of comctl32.dll and they are (of course) different.
Could this be the problem, or is this a problem of the sound settings in the windows control panel?
thanx
Tom
Biplab:
Beep() is defined in Kernel32.dll (link lib Kernel32.lib) whereas MessageBeep() is defined in user32.dll (link lib user32.lib).
Beep() api description:
--- Quote ---http://msdn2.microsoft.com/en-us/library/ms679277.aspx
--- End quote ---
MessageBeep() api description:
--- Quote ---http://msdn2.microsoft.com/en-us/library/ms680356.aspx
--- End quote ---
So comctl32.dll is not the problem. :)
tom0769:
Thanx for reply,
so what could be the cause for the segmentation fault:
- the Kernel32.dll?
- the Kernel32.lib?
I do not have a clue! :?
Biplab:
Sorry tom0769, I am also not sure about this. :(
Just guessing, if your kernel32.dll version in both the system is same, then kernel32.lib may be the cause of problem. Are you using same compiler and SDK in both the PCs?
tom0769:
Hi Biplab, thanx for the hint!
Since I'm using the same MinGW compiler version on both PCs, the compiler libs are exactly the same.
I did a binary file compare of the versions of kernel32.dll and they are also equal.
Running the program in release mode, there is no program crash when calling "Beep(2000, 1000);" .
I measured the runtime of the function call with "GetTickCount" and it's almost exactly 1sec,
but there is nothing to hear.
Navigation
[0] Message Index
[#] Next page
Go to full version