I had some dead hours this morning so I whipped up this, it's a program that allows you to lookup system errors and see their description (FormatMessage API). You can enter both the equate name and the number itself, in decimal or hexadecimal (preceded by "0x"). There's an EXE version (for any IDE) and a RadASM specific DLL version.
If you found it useful please let me know, it's my first attempt at a RadASM addin. :)
Posted on 2003-08-20 16:58:26 by QvasiModo
QvasiModo,

I like your idea and I would be very happy to have such an Add-In for WinAsm. If you are kind enough to implement it (I mean a true Add-In, not a dll that will call your EXE) I would highly appreciate it.

Regards,

akyprian
Posted on 2003-08-21 05:38:54 by akyprian
Hi QvasiModo

Nice addin. Should be very useful.
One thing. OS'es with other nationalities has different text formatting. Maybe make the edit box a little wider.

KetilO
Posted on 2003-08-21 06:09:34 by KetilO
Before You create font for the error message field, You should do something like this:


.data?
tm TEXTMETRIC <>
hDC dd ?
hWnd dd ?

.code
invoke GetDesktopWindow
mov hWnd,eax
invoke GetDC,eax
mov hDC,eax
invoke GetTextMetrics,eax,offset tm
invoke ReleaseDC,hWnd,hDC


and then copy tm.tmCharSet to the appropriate field in your LOGFONT structure. This will hopefully fix the problem with national characters in error messages. Well, at least it helped me when I manually edited WinErr.exe entering 0xEE as the charset (I'm using Polish Win98 now, so EASTEUROPE_CHARSET is my local preference :) )
Posted on 2003-08-21 15:18:53 by Morris
Glad you guys liked it :)

akyprian: It is a real add-in... I made the EXE version first, then the DLL once I found out how to make an addin. I kept the EXE in case you wanted to use it in a different IDE, but it is not necessary for Radasm. Just install the DLL as a regular addin (option 0 for disabled, 1 for enabled).

KetilO:/B] Good suggestion, in fact it is a little small for any language... so next version will be resizable, and will save the last used position.

Morris: Noted, will do in next version too.

Thank you all for your support :alright:
Posted on 2003-08-21 17:42:49 by QvasiModo
Hi,

I am not sure whether You understood very well what I meant. I would like to have a TRUE Add-In for the WinAsm IDE, if you want to do it of course.

Regards,

akyprian
Posted on 2003-08-22 00:00:48 by akyprian
Sorry, silly me, I didn't catch the "WinAsm" part :o :grin:
Sure, will do. Do I need something else apart from WinAsm help files?
Posted on 2003-08-22 09:41:38 by QvasiModo
Hi,

I am glad you will do! If you start with sample "Add-In One" as your basis, you will find no difficulties(I hope!). You can ask for any information or halp you might need.

Regards,

akyprian
Posted on 2003-08-22 11:33:29 by akyprian
Fresh from the oven, the updated version :).
Now the dialog is resizable, and the charset problem should be solved (thanks, Morris!). Still needs some work, though... the error messages are still formatted to 30 chars wide, and it doesn't save the last position and size.
Posted on 2003-08-22 19:11:42 by QvasiModo
akyprian, I could not manage to make it work for WinAsm... I'm posting part of the code here, tell me what I'm doing wrong.
I tried placing the compiled version in the addins folder, but it doesn't show up in the addin maganer. Editing the ini file did not help either. :confused:
Posted on 2003-08-22 19:13:30 by QvasiModo
Hi,

I do not see anything wrong with the code. Is everything the way it should be in your *.def file ?

Regards,

akyprian
Posted on 2003-08-22 23:15:51 by akyprian
Sorry I didn't reply before, I was at home with the flu until today... :P
Anyway, you are right, the problem was in the .def file. I had accidentally replaced donkey's MakeDef addin with an old version (the one with that infamous bug that silently deleted the contents of the def file).
So, here's the final version. They are 3 files, each one is independent from the others: the RadAsm version, the WinAsm version, and a standalone version to integrate into anything else.
Posted on 2003-08-29 14:54:33 by QvasiModo
Thanks QvasiModo,

Small suggestion,

When you append your menu item, could you please use MF_OWNERDRAW instead of MF_STRING ?

Can you please upload WinAsm Add-In to the WinAsm subforum so that we may get some feedback? If not, we can upload to the WinAsm site immediately (depends on Masmer ...) after you do the small change I requested.

Regards,

akyprian
Posted on 2003-08-29 15:19:33 by akyprian

Thanks QvasiModo,

Small suggestion,

When you append your menu item, could you please use MF_OWNERDRAW instead of MF_STRING ?

Sure. :)

Can you please upload WinAsm Add-In to the WinAsm subforum so that we may get some feedback? If not, we can upload to the WinAsm site immediately (depends on Masmer ...) after you do the small change I requested.

No problem, I'll update it and post it there. You can also upload it to the WinAsm site.
Posted on 2003-08-29 15:41:44 by QvasiModo
Thanks,

akyprian
Posted on 2003-08-29 15:46:56 by akyprian
New upload. All ready but the MF_OWNERDRAW style. Also RadAsm version now fully supports Addin Manager.

EDIT: Added the MF_OWNERDRAW. All ready now :)
Posted on 2003-09-01 14:16:15 by QvasiModo
Hi,

MF_OWNERDRAW ok now.

We have a couple of problems:

From the Add-Ins manager load the Add-In. Press Ok.

Use the new menuitem to show your dialog. Close the dialog. Try to use the menuitem to see the dialog again. You will not see it.

Now go to Add-Ins Manager and unload the add-in. Go to Add-Ins menu. Select Add-Ins manager. WinAsm GPF's. To help a little here, I would suggest you preserve EBX, ESI and EDI in any of your Add-Ins procedures you use them. (Required by WinAsm)

Regards,

akyprian
Posted on 2003-09-01 14:57:16 by akyprian
Hi QvasiModo,

I'm running W2k and I've some problem with the "Error Code" font of your plugin (all versions).

See attachment...
Posted on 2003-09-02 17:15:57 by Cip
akyprian: I'll look into this problem back home... it's strange because I usually don't forget to do something like preserving registers... (perhaps the problem is somewhere else?)

Cip: Mhm... weird... seems like the font isn't being set correctly (although the dialog template specifies MS Sans Serif). Maybe I should set it "by hand"...

I actually had made a new version that uses a rich edit control instead... but I forgot to copy it in a diskette :o so it will have to wait until tomorrow :( . Sorry!
Posted on 2003-09-03 20:31:02 by QvasiModo
I'll wait to see the new version ;)

Except for the font issue, I've found it really nice and usefull!

:alright: Great job...
Posted on 2003-09-04 08:04:01 by Cip