Hi All,

This is WinAsm V1.0.1.5 (Now available at WinAsm site)

Add-Ins (Thanks eko, TBD and many others)

A)The best way to start building Add-Ins for WinAsm is by choosing File-
New Project-Bare Bone-AddIn. A new project containing the following procedures
will be created:

a)DllEntry
----------
Leave this as it is (a WinAsm Add-In is a Dll after all)
THIS FUNCTION IS REQUIRED BY ALL VALID WinAsm ADDINS.

b)GetWAAddInData
----------------
This procedure must fill in Add-In friendly name and description of what
this Add-In does.
THIS FUNCTION IS REQUIRED BY ALL VALID WinAsm ADDINS.

c)WAAddInLoad
-------------
Place all one-time initializations here. If all resources are
successfully allocated, function must return 0. On error, it must free
partially allocated resources and return -1, in this case Add-In will not be loaded.
pWinAsmHandles is a pointer to the HANDLES structure (see WAAddIn.inc),
you will most probably need to keep it. Parameter 'features' is reserved
for future extentions, do not use it.
THIS FUNCTION IS REQUIRED BY ALL VALID WinAsm ADDINS.

d)WAAddInUnload
---------------
It is called when WinAsm closes and when user selectes to unload the
Add-In from the WinAsm Add-In Manager. Free all internally allocated
resources, like window classes, files, memory and so on here.
THIS FUNCTION IS REQUIRED BY ALL VALID WinAsm ADDINS.

e)FrameWindowProc
-----------------
This Procedure receives ALL messages of the Main window. You should
return 0 if you want WinAsm AND ALL OTHER POSSIBLY LOADED ADDINS to
process the message otherwise WinAsm AND OTHER POSSIBLY LOADED ADDINS
will NOT process it.
If you want to use this procedure you must uncomment it from the WAAddIn.inc

f)ChildWindowProc
-----------------
This Procedure receives ALL messages of ALL MDI child windows.
You should return 0 if you want WinAsm AND ALL OTHER POSSIBLY LOADED
ADDINS to process the message otherwise WinAsm AND OTHER POSSIBLY LOADED
ADDINS will NOT process it.
If you want to use this procedure you must uncomment it from the WAAddIn.inc

g)ProjectExplorerProc
---------------------
This Procedure receives ALL messages of the Project Explorer window.
You should return 0 if you want WinAsm AND ALL OTHER POSSIBLY LOADED ADDINS
to process the message otherwise WinAsm AND OTHER POSSIBLY LOADED ADDINS
will NOT process it.
If you want to use this procedure you must uncomment it from the WAAddIn.inc

h)OutWindowProc
---------------
This Procedure receives ALL messages of the Out window. You should return 0
if you want WinAsm AND ALL OTHER POSSIBLY LOADED ADDINS to process the
message otherwise WinAsm AND OTHER POSSIBLY LOADED ADDINS will NOT process it.
If you want to use this procedure you must uncomment it from the WAAddIn.inc

B)Note the new "Inc" folder in the WinAsm Directory. It includes WAAddIn.inc
(in which you will find all constants, structures etc ). I already know that
more information can be added in this file so I expect suggestions here.

C)AFTER creating a new Add-In I suggest you go Project-Properties-/OUT and
set the name of your Dll and where it should be created.e.g If your WinAsm
directory is C:\WinAsm you set C:\WinAsm\AddIns\nameofaddin.dll

D)In AddIn.def you change
LIBRARY AddIn -----to-------->LIBRARY nameofaddin.dll

AND uncomment procedure names you will use in your addin:

EXPORTS GetWAAddInData <------Do not comment this
WAAddInLoad <------Do not comment this
WAAddInUnload <------Do not comment this
;FrameWindowProc <------Uncomment this if you are going to use it in your Add-In
;ChildWindowProc <------Uncomment this if you are going to use it in your Add-In
;ProjectExplorerProc<-------Uncomment this if you are going to use it in your Add-In
;OutWindowProc <-------Uncomment this if you are going to use it in your Add-In


Other
2.Small behaviour change: WinAsm help file was application topmost(Thanks Masmer).

3.A MesageBox popping up asking if the user really wants to remove a
file (Yes\No)(Thanks Masmer).

4.Splash takes a little longer (Thanks FunkyMeister)

5.Some optimizations for Intellisense.

Regards,

akyprian
Posted on 2003-08-05 08:14:55 by akyprian
Thank you for implementing my suggestions. Looks like my work is cut out for me with this release. ;)

BTW: You have "Open Last Project" enabled which opens the Addin project (in case you didn't know).

Note to all: That AddInOne addin can be disabled from Add-ins menu => Add-in Manager. :grin:

Found this amusing ...
Posted on 2003-08-05 09:51:34 by Masmer
Hi Masmer,

You have "Open Last Project" enabled which opens the Addin project (in case you didn't know).

Yes I DID know. I did it on purpose :tongue:

Regards,

akyprian
Posted on 2003-08-05 11:41:39 by akyprian
Hi Akyprian,
I was wondering how we go about inserting a text string into an open document (.asm file). I am assuming we send some sort of message to the open child window. ie.

Invoke SendMessage, hClient, WM_MDIGETACTIVE, 0, 0
; Test to see if valid value returned...
...
mov hChild, eax
Invoke SendMessage, hChild, ????message????, offset stringToInsert, 0

I had a good look through the addin files but couldn't find what I was looking for message-wise. Any ideas?

Thanks
Posted on 2003-08-05 21:25:11 by andrew_k
Hi Akyprian,
Winasm just keeps getting cooler! I noticed it re-opens the most recently used project on startup a lot quicker now. Excellent! However I noticed the background in the new version of Winasm changed to green when I opened one of your addin projects and stayed that colour afterwards when I opened one of my own (located in a different directory). Is this intentional? I don't know if I really liked the green....

Also (while I'm complaining about something you've slaved over and give away for free...!), Winasm 1.0.1.5 minimises to a tray icon. In my opinion (and this is just my opinion, I'm not saying I'm correct) this can be a little frustrating. I always expect to be able to restore a minimised window from the task bar and the new Winasm of course simply doesn't minimise there. Unless you have a particularly good reason for doing this I feel that by stepping out of established convention you are violating usability principles: the application simply doesn't behave as the user expects. Sure I could get used to it maybe, but why? Please note that this is not meant as a criticism. As you know I appreciate your work immensely, I was just curious as to why you have done this. Maybe other users could offer some comments here?

Thanks hugely once again, the addin feature rocks!!!
Posted on 2003-08-05 21:50:05 by andrew_k

Hi Akyprian,
I was wondering how we go about inserting a text string into an open document (.asm file). I am assuming we send some sort of message to the open child window. ie.

Invoke SendMessage, hClient, WM_MDIGETACTIVE, 0, 0
; Test to see if valid value returned...
...
mov hChild, eax
Invoke SendMessage, hChild, ????message????, offset stringToInsert, 0

I had a good look through the addin files but couldn't find what I was looking for message-wise. Any ideas?

Thanks


andrew_k,

The messages you can send to the editor are in the WAAddin.inc plus these:

EM_EXLINEFROMCHAR
wParam=0
lParam=cp

EM_EXSETSEL
wParam=0
lParam=lpCHARRANGE

EM_EXGETSEL
wParam=0
lParam=lpCHARRANGE

EM_FINDTEXTEX
wParam=Flags
lParam=lpFINDTEXTEX

EM_GETTEXTRANGE
wParam=0
lParam=lpTEXTRANGE

EM_FINDWORDBREAK
wParam=uFlags
lParam=cp

EM_CANREDO
wParam=0
lParam=0

EM_REDO
wParam=0
lParam=0

EM_HIDESELECTION
wParam=TRUE/FALSE
lParam=0

EM_GETSELTEXT
wParam=0
lParam=lpBuff

EM_CANPASTE
wParam=CF_TEXT
lParam=0

EM_STREAMIN
wParam=SF_TEXT
lParam=lpStream

EM_STREAMOUT
wParam=SF_TEXT
lParam=lpStream

EM_CHARFROMPOS
wParam=0
lParam=lpPoint

EM_POSFROMCHAR
wParam=lpPoint
lParam=cp

EM_LINEFROMCHAR
wParam=cp
lParam=0

EM_LINEINDEX
wParam=line
lParam=0

EM_LINELENGTH
wParam=cp
lParam=0

EM_GETLINE
wParam=Line
lParam=lpBuff

EM_GETFIRSTVISIBLELINE
wParam=0
lParam=0

EM_LINESCROLL
wParam=cxScroll
lParam=cyScroll

EM_SCROLLCARET
wParam=0
lParam=0

EM_SETSEL
wParam=cpMin
lParam=cpMax

EM_GETSEL
wParam=lpcpMin
lParam=lpcpMax

EM_GETMODIFY
wParam=0
lParam=0

EM_SETMODIFY
wParam=TRUE/FALSE
lParam=0

EM_REPLACESEL
wParam=TRUE/FALSE
lParam=lpText

EM_GETLINECOUNT
wParam=0
lParam=0

EM_GETRECT
wParam=0
lParam=lpRECT

EM_CANUNDO
wParam=0
lParam=0

EM_UNDO
wParam=0
lParam=0

EM_EMPTYUNDOBUFFER
wParam=0
lParam=0

WM_COPY
wParam=0
lParam=0

WM_CUT
wParam=0
lParam=0

WM_PASTE
wParam=0
lParam=0

WM_CLEAR
wParam=0
lParam=0

WM_SETTEXT
wParam=0
lParam=lpszText

WM_GETTEXT
wParam=cbBuff
lParam=lpBuff

WM_GETTEXTLENGTH
wParam=0
lParam=0

Regards,

akyprian
Posted on 2003-08-05 23:50:14 by akyprian

Hi Akyprian,
Winasm just keeps getting cooler! I noticed it re-opens the most recently used project on startup a lot quicker now. Excellent! However I noticed the background in the new version of Winasm changed to green when I opened one of your addin projects and stayed that colour afterwards when I opened one of my own (located in a different directory). Is this intentional? I don't know if I really liked the green....

Also (while I'm complaining about something you've slaved over and give away for free...!), Winasm 1.0.1.5 minimises to a tray icon. In my opinion (and this is just my opinion, I'm not saying I'm correct) this can be a little frustrating. I always expect to be able to restore a minimised window from the task bar and the new Winasm of course simply doesn't minimise there. Unless you have a particularly good reason for doing this I feel that by stepping out of established convention you are violating usability principles: the application simply doesn't behave as the user expects. Sure I could get used to it maybe, but why? Please note that this is not meant as a criticism. As you know I appreciate your work immensely, I was just curious as to why you have done this. Maybe other users could offer some comments here?

Thanks hugely once again, the addin feature rocks!!!


Hi again,

Most probably you loaded Client Color Add-In ? Go to Add-Ins --> Add-Ins Manager and unload it or from the new menu item "Client Color Add-In" you can choose a different color.

Tray Icon is optional. Go to Tools-Options-General and disable it. Satisfied ?

Regards,

akyprian
Posted on 2003-08-05 23:59:50 by akyprian
akyprian: just wow :tongue:
i didnt expect that you will implement the add-ins so quick and so well.
excelent work. I like that you can load/unload on demand.

suggestion: create on the homepage a section for add-ins. i think
some nice addins will appear and a home for them would be nice :)
Posted on 2003-08-06 00:43:23 by TBD

akyprian: just wow :tongue:
i didnt expect that you will implement the add-ins so quick and so well.
excelent work. I like that you can load/unload on demand.

suggestion: create on the homepage a section for add-ins. i think
some nice addins will appear and a home for them would be nice :)


Hi TBD,

First of all, thanks for your kindness to provide those OllyDbg Plugin samples. As you can see I got some ideas from those although I 've chosen a rather different approach.

As far as the Add-Ins section in the WinAsm site is concerned, YES, I have already thought of it. Thanks. Masmer, are you reading ?

Regards,

akyprian
Posted on 2003-08-06 00:51:57 by akyprian
I was just about to update the website when TBD posted. Check out the downloads page and see if that is good enough. (Do people want a new page for add-ins?)
Posted on 2003-08-06 01:07:26 by Masmer
Masmer: i think it is ok on the download page.
... when a lot of add-ins exists maybe than a new page would be nice ;)

now the ball is in our playground ... to enhance WinASM using AddIns :grin:
Posted on 2003-08-06 02:50:41 by TBD

now the ball is in our playground ... to enhance WinASM using AddIns :grin:


TBD,

100% correct ;)


Masmer,

Check out the downloads page and see if that is good enough.
Very nice, please leave it as it is for now :alright:
Regards,

akyprian
Posted on 2003-08-06 03:18:40 by akyprian