News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Parsing Text bug

Started by Ash_, January 08, 2005, 08:59:11 AM

Previous topic - Next topic

Ash_

ok i posted a thread recently about geting the text from winamp (thanks anon  :U)
now i've created a procedure that parses the text into dword's but it doesent work properly.
it's supposed to get the Title, Artist, SongIndex and the whole text and put them in variables.
but for some songs it only gets Title and Artist.
others it will only get Title Artist and SongIndex.
also if i play one song. click the parse text button, change song and click the button again nothing happens?
im only new to Assembly so it might probly something easy. thanks in advance anyway.

[attachment deleted by admin]

anon

I don't have winamp so I could not use your program, but I do
see a few problems. First you are using an uninitialized buffer to
build your string in. This is not bad, but the first thing you do is
call lstrlen on this buffer. This is bad. You have no idea what may
be in the buffer and lstrlen just looks for the first 0 (zero) and
reports that length, not the actual length of the buffer. Next,
lstrlen reports the length of the string WITHOUT including the
terminating zero. Most Windows string functions need the length
including the zero. Hope this helpsĀ  :UĀ 

Ash_

cheers anon works good now.