This may be a case of "ICS" (Insufficient Code Shown), but I thought I would ask just in case until I can figure it out myself.
Under Vista with PB 8.04 I have tracked down a bug that in debug shows that I tried to "access a invalid memory address" while creating my toolbar. I added some messageboxes to narrow it down.
Now according to the messagboxes, I get values for HwndToolbar and VARPTR(tbb(0)) for the 1st two messageboxes but can not get to the 3rd because the crash occurs on my line for the SendMessage (as far as I know, but we all know, where the problem occurs may not be where it happened, so I am only guessing at the moment)
So my question (unless I have to break down to demo) is, if there is something I am obviously doing wrong? or does the line
Do something wrong? or am I accessing a location in the midst of change? or some other concept if my next line is
Again, I will go back and try to post example code if need be, but guessing code, I think something to do with the heap, and the next line is where debug catches it?
Under Vista with PB 8.04 I have tracked down a bug that in debug shows that I tried to "access a invalid memory address" while creating my toolbar. I added some messageboxes to narrow it down.
Code:
MSGBOX FUNCNAME$ + $CR + STR$(HwndToolbar) + $CR + STR$(VARPTR(tbb(0))) HeapFree GetProcessHeap(), 0, BYVAL VARPTR(tbb(0)) MSGBOX FUNCNAME$ + $CR + STR$(HwndToolbar) + $CR + STR$(VARPTR(tbb(0))) SendMessage hWndToolbar, %TB_ADDBUTTONS, %NUM_TBBUTTONS, BYVAL VARPTR(tbb(0)) MSGBOX FUNCNAME$ + $CR + STR$(HwndToolbar) + $CR + STR$(VARPTR(tbb(0)))
So my question (unless I have to break down to demo) is, if there is something I am obviously doing wrong? or does the line
Code:
HeapFree GetProcessHeap(), 0, BYVAL VARPTR(tbb(0))
Code:
SendMessage hWndToolbar, %TB_ADDBUTTONS, %NUM_TBBUTTONS,
Comment