Hello, I have this code:

xd db "jjjj",0

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

LibMain proc instance:DWORD,reason:DWORD,unused:DWORD 

    .if reason == DLL_PROCESS_ATTACH

push dword ptr ds:[ xd]
call Teste
      mov eax, TRUE                 ; return TRUE so DLL will start

    .elseif reason == DLL_PROCESS_DETACH

    .elseif reason == DLL_THREAD_ATTACH

    .elseif reason == DLL_THREAD_DETACH



LibMain endp

Teste proc T
        invoke MessageBox, NULL, addr T, addr T, MB_OK

Teste endp

But, the messagebox, after the "jjj" text, there is some weird characters.
How to fix it?

What your doing is passing the address of the proceedure to MesssageBox instead of xd

invoke  MessageBox, NULL, addr xd, addr xd, MB_OK.

It will look kid of odd those, your caption being exactly the same as text

Also, since the address of xd is known at assembly time you can do:

invoke	MessageBox, NULL, offset xd, offset xd, MB_OK


push	MB_OK
	push	offset xd
	push	offset xd
	push	NULL
	call	MessageBox