Click here to Skip to main content
16,008,075 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How do i pass a function to a function that need a DWORD? Pin
Tomasz Sowinski12-Sep-02 9:49
Tomasz Sowinski12-Sep-02 9:49 
AnswerRe: How do i pass a function to a function that need a DWORD? Pin
Stephane Rodriguez.12-Sep-02 9:38
Stephane Rodriguez.12-Sep-02 9:38 
Generalindex of selected item in listctrl Pin
danag12-Sep-02 8:56
danag12-Sep-02 8:56 
GeneralRe: index of selected item in listctrl Pin
Tomasz Sowinski12-Sep-02 9:05
Tomasz Sowinski12-Sep-02 9:05 
GeneralRe: index of selected item in listctrl Pin
danag12-Sep-02 9:17
danag12-Sep-02 9:17 
GeneralRe: index of selected item in listctrl Pin
Tomasz Sowinski12-Sep-02 9:23
Tomasz Sowinski12-Sep-02 9:23 
GeneralRe: index of selected item in listctrl Pin
danag12-Sep-02 9:24
danag12-Sep-02 9:24 
GeneralUnhandled exception when writing to allocated memory. Pin
12-Sep-02 8:26
suss12-Sep-02 8:26 
BYTE *sSourceBuffer;
DWORD dwSourceBufferSize = 176400;

sSourceBuffer = (BYTE *)LocalAlloc(LMEM_MOVEABLE | LMEM_ZEROINIT, dwSourceBufferSize);
memset(sSourceBuffer, 0, dwSourceBufferSize);


When i get to the memset line i get an unhandled exception message;
Unhandled exception at 0x00414085 in MP3.exe: 0xC0000005: Access violation writing location 0x00911000.
And i jumps to some asm code:
; Set dword-sized blocks
        mov     ecx,edx         ; move original count to ecx
        and     edx,3           ; prepare in edx byte count (for tail loop)
        shr     ecx,2           ; adjust ecx to be dword count
        jz      tail            ; jump if it was less then 4 bytes

        rep     stosd   <----- CURSOR IS HERE

Here's the values of the different variables:

ecx = 43079
edx = 0
tail = 0x0041408b tail

(From the command window)

Anyone know what could be wrong?

Thanks in advance.
GeneralRe: Unhandled exception when writing to allocated memory. Pin
Tomasz Sowinski12-Sep-02 8:43
Tomasz Sowinski12-Sep-02 8:43 
GeneralRe: Unhandled exception when writing to allocated memory. Pin
Redeemer-dk12-Sep-02 8:53
Redeemer-dk12-Sep-02 8:53 
GeneralRe: Unhandled exception when writing to allocated memory. Pin
TyMatthews12-Sep-02 8:52
TyMatthews12-Sep-02 8:52 
GeneralRe: Unhandled exception when writing to allocated memory. Pin
Joaquín M López Muñoz12-Sep-02 8:53
Joaquín M López Muñoz12-Sep-02 8:53 
GeneralThanks all, now i see :) Pin
Anonymous12-Sep-02 9:01
Anonymous12-Sep-02 9:01 
GeneralWin2K and Multilink Pin
Tili12-Sep-02 8:20
Tili12-Sep-02 8:20 
GeneralStill Dialog menu problems Pin
DarrollWalsh12-Sep-02 8:10
DarrollWalsh12-Sep-02 8:10 
GeneralRe: Still Dialog menu problems Pin
Tomasz Sowinski12-Sep-02 8:22
Tomasz Sowinski12-Sep-02 8:22 
GeneralRe: Still Dialog menu problems Pin
DarrollWalsh12-Sep-02 8:42
DarrollWalsh12-Sep-02 8:42 
GeneralRe: Still Dialog menu problems Pin
Tomasz Sowinski12-Sep-02 8:47
Tomasz Sowinski12-Sep-02 8:47 
GeneralRe: Still Dialog menu problems Pin
DarrollWalsh12-Sep-02 8:56
DarrollWalsh12-Sep-02 8:56 
GeneralRe: Still Dialog menu problems Pin
Tomasz Sowinski12-Sep-02 9:06
Tomasz Sowinski12-Sep-02 9:06 
GeneralRe: Still Dialog menu problems Pin
DarrollWalsh12-Sep-02 9:24
DarrollWalsh12-Sep-02 9:24 
GeneralRe: Still Dialog menu problems Pin
Tomasz Sowinski12-Sep-02 9:28
Tomasz Sowinski12-Sep-02 9:28 
Generalheight of title bar of modeless CDialog Pin
ns12-Sep-02 8:09
ns12-Sep-02 8:09 
GeneralRe: height of title bar of modeless CDialog Pin
Tomasz Sowinski12-Sep-02 8:19
Tomasz Sowinski12-Sep-02 8:19 
GeneralHandle WM in CDialog derived class Pin
Ludovic Balogh12-Sep-02 7:56
sussLudovic Balogh12-Sep-02 7:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.