Archived

This topic is now archived and is closed to further replies.

Jaggy

directdraw erroring and asking for "STRLEN.ASM"

Recommended Posts

hey there. Does anyone have experience in using ddutil.cpp/h, the direct draw wrappers that come with DirectX8? I''ve been using them the last couple of weeks and things have been going great, and then I came round to this function to display text on the screen: HRESULT CDisplay::CreateSurfaceFromText ( CSurface** ppSurface,HFONT hFont, TCHAR* strText,COLORREF crBackground, COLORREF crForeground ) Now this works fine for displaying words, but I now want to display an integer. I''ve tried casting it with (char*) and (TCHAR*) but everytime my program crashes. I ran it through the debugger and I get a strange error, I get dumped into some assembly and my compiler program asks me to locate a file: "STRLEN.ASM". I''ve ran a search for it on my machine and I don''t have it. I don''t really get what''s going on, I''ve never had an error like this before. If anyone could shed any light on this I would be very grateful. Jaggy

Share this post


Link to post
Share on other sites
When you try to step into a function, the compiler wants to show the code for that function (since that''s kind of the point). The code for the strlen function is STRLEN.ASM. You haven''t got the source to the MS C runtime library, so you can''t find that file.

It has *nothing* to do with DDraw crashing.


In terms of displaying numbers, try sprintf or itoa.

Share this post


Link to post
Share on other sites
oh! Thanks for explaining that.

And I converted my number using sprintf(...). And it worked! So thanks for that too.

Share this post


Link to post
Share on other sites