News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

GetFileName

Started by Vortex, December 06, 2006, 07:40:50 PM

Previous topic - Next topic

Grincheux

Just a question, what does it become now of this function ?
Kenavo

Grincheux
_____________________________________________________
http://www.phrio.biz

PBrennick

Do you think I should add it to the library? It certainly is useful! Good work should not be allowed to go to waste.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

Grincheux

Oh Yes !

I don't know very well your project. I often have seen messages about it but I never tooke enougth time to see what it is. I would like to give my contributions to this project.

Thanks
Kenavo

Grincheux
_____________________________________________________
http://www.phrio.biz

PBrennick

Grincheux,
The project is still in its infancy but it works very well. I credit all contributions to the project. How would you like me to credit this? Shall I use Grincheux? Or an honorific?

I will also credit sinsi as he did some work on the algo, also.

By the way, like you, I am never satisfied. That is what it says below my user name.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

PBrennick

Grincheux,

How does this look?


;------------------------------------------------------------;
; This algorythm was developed by Grincheux with help from   ;
; sinsi. Grincheux has given permission to use this module   ;
; to the users of The GeneSys Development System and is for  ;
; educational or personal use only. Users are not allowed to ;
; use this module in commercial software. To use this module ;
; for any for profit purpose, the author must be contacted.  ;
;------------------------------------------------------------;
GetFileName proc uses edi lpszFilename:dword
;---------------------------------------
    mov     eax, lpszFilename
    mov     edi, eax
    test    eax, eax
    jz      done
    invoke  lstrlen, eax
    test    eax, eax
    jz      done
    lea     ecx, [eax+edi]
next:
    cmp     ecx, edi
    jb      son
    mov     al, [ecx]
    cmp     al, '\'
    jz      son
    cmp     al, ':'
    jz      son
    sub     ecx, 1
    jmp     next
son:
    lea     eax, [ecx+1]
done:
    ret
;---------------------------------------
GetFileName endp


Paul



[attachment deleted by admin]
The GeneSys Project is available from:
The Repository or My crappy website

Vortex

Grincheux,

We would be pleased for any effort. Please feel free to contribute our project, you are always welcomed to contibute.