flat assembler
Message board for the users of flat assembler.
Index
> Windows > Calling DLL from C |
Author |
|
r22 04 Jan 2006, 02:30
you pass a ptr to a string to your dll function
so asm dll Code: TestFunc: ;;esp+4 = pString ;;esp+8 = SomethingElse mov eax, [esp+4] ;; now the ptr in is eax ;; make the first character of the string '1' mov byte[eax],'1' xor eax,eax ;;0 return value for success ret 8 ;; return 8 because we passed 2 dword(4bytes each) params hope that helps you I don't like using the proc macro just a preference. |
|||
04 Jan 2006, 02:30 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.