hello again

how can i translate this line?

int __stdcall procname(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause)

this is how i made:
proc mWnd:HWND,aWnd:HWND,data:DWORD,parms:DWORD,show:DWORD,nopause:DWORD,boolean:DWORD
but it dont work

:confused:
Posted on 2003-11-21 06:50:49 by bj1500


proc [B]ProcName[/B] mWnd:HWND,aWnd:HWND,data:DWORD,parms:DWORD,show:DWORD,nopause:DWORD,boolean:DWORD

...
ProcName ENDP
Posted on 2003-11-21 07:27:01 by ENF
thx for the answer but i do have a name of my "proc":
my whole proc:


blo proc mWnd:HWND,aWnd:HWND,data:DWORD,parms:DWORD, show:DWORD, nopause:DWORD ,boolean:DWORD
invoke lstrcpy,ADDR data,ADDR ampClass
ret
blo endp


its for a DLL, and when i use it it says "couldnt write memory"
Posted on 2003-11-21 08:01:29 by bj1500
data and ampClass are pointers. Remove the "addr" when calling lstrcpy
Posted on 2003-11-21 08:08:13 by roticv
hello

well, ampClass is not a pointer?


.data
ampClass db "Winamp v1.x",0
blo proc mWnd:HWND,aWnd:HWND,data:DWORD, parms:DWORD, show:DWORD, nopause:DWORD, boolean:DWORD
invoke lstrcpy,data,ADDR ampClass
mov eax,3
ret
blo endp


i'm trying to make a DLL for mirc, i can do it in delphi but i cant in MASM...:(
Posted on 2003-11-21 08:25:09 by bj1500
what error do you get when you remove the addr from before data. Are you sure you are passing an address for the data paramater?
Posted on 2003-11-21 08:42:05 by ENF
well, its mirc who pass the data parameter...


The routine in the DLL being called must be of the form:

int __stdcall procname(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause)


like you see i must have these parametrar...

and i dont get any error when i'm compling my code.
its when i test the DLL in mirc
Posted on 2003-11-21 08:50:17 by bj1500
blo proc mWnd:HWND,aWnd:HWND,data:DWORD, parms:DWORD, show:DWORD, nopause:DWORD, boolean:DWORD


Well, boolean:DWORD is definitely wrong and probably the cause of your problem. The statement above ends at nopause, which is a true or false parameter (BOOLEAN). Leave out boolean:DWORD, it doesn't belong there. PS always count the commas ;)
Posted on 2003-11-21 08:55:24 by donkey
thank you very much. now it works!! ;D
Posted on 2003-11-21 09:00:10 by bj1500
May i ask what kind of plugin you are developing? I have made one too that's why i'm interested: http://board.flatassembler.net/viewtopic.php?t=401
Posted on 2003-11-21 09:14:30 by Aaro
nothing cool i think :D
just a dll that shows what song you are playing in winamp..
here my code if you want it:


winAmpTitle proc mWnd:HWND,aWnd:HWND,data:DWORD,parms:DWORD,show:DWORD,nopause:DWORD
LOCAL buf[2048]
invoke FindWindow,ADDR ampClass,NULL
mov ampHWND,eax
invoke GetWindowText,ampHWND,ADDR buf,SIZEOF buf
invoke lstrlen,ADDR buf
lea eax, [eax + buf - 8]
mov BYTE PTR [eax], 0
invoke lstrcpy,data,ADDR buf
mov eax,3
ret
winAmpTitle Endp
Posted on 2003-11-21 09:39:25 by bj1500
Nice, thanks
Posted on 2003-11-21 10:08:39 by Aaro