flat assembler
Message board for the users of flat assembler.

Index > Windows > Winamp PlugIn in Assenmbler !?

Author
Thread Post new topic Reply to topic
Kuemmel



Joined: 30 Jan 2006
Posts: 200
Location: Stuttgart, Germany
Kuemmel 30 Apr 2006, 23:04
Hi people,

has anybody ever attempted to write an plug in for winamp with FASM or other Assembler !? I would like to do some audio visualisation stuff, but they only got a developement code in C Sad
http://www.winamp.com/nsdn/winamp/sdk/
I think I'm kind of too unexperienced in converting that to FASM...
Post 30 Apr 2006, 23:04
View user's profile Send private message Visit poster's website Reply with quote
senolc_eht



Joined: 22 Mar 2004
Posts: 57
Location: Indonesia
senolc_eht 03 May 2006, 13:16
Try this:
this base on Torrey Betts examples, that he gave to me
Code:
; Simple General Purpose Winamp Plugin
; By Torrey Betts
;
; Use it, abuse it...

format PE GUI 4.0 DLL
entry DllEntryPoint

include 'win32a.inc'

section '.data' data readable writeable

struct winampGeneralPurposePlugin
        .version      dd 0x10
        .description  dd txtDescription
        .lpInit       dd init
        .lpConfig     dd config
        .lpQuit       dd quit
        .WinAmpHwnd   dd ?
        .hDllInstance dd ?
ends
winamptitle db 'Winamp v1.x',0
            text2 rb 46
            status rb 46

    ymwindow db 'YahooBuddyMain',0
    regHandle       dd  ?
    regKeySub       db  'Software\Yahoo\Pager',0
    regItem         db  'Yahoo! User ID',0
    textfloating db '\Custom Msgs',0
    regstatus db '5',0
    regItemValue:   times 30 db 0
    valueType dd ?
    bufferSize dd 30
    fixed db 'Software\Yahoo\Pager\profiles\'
    RegValue2 : times 256 db 0





txtDescription db 'Yahoo Messenger Status create by Senolc_eht base on Torray tutorial', 0
plugin winampGeneralPurposePlugin

txtInitialize   db      'The FASM Simple Plugin has initialized',0
txtConfigure    db      'This is where you would place code for the configuration dialog to be displayed and edited',0
txtTitle        db      'Simple Winamp Plugin',0
txtQuit         db      'Plugin uninitialized',0

section '.code' code readable executable


proc DllEntryPoint,hinstDLL,fdwReason,lpvReserved
        xor eax,eax
        inc eax
        ret
endp

proc winampGetGeneralPurposePlugin

     mov eax, plugin
     ret
endp

proc init

     invoke SetTimer, HWND_DESKTOP, 100, 1000, Timer_proc
     xor eax,eax
     ret
endp

proc config

     push 0
     push txtTitle
     push txtConfigure
     push 0
     call [MessageBox]
     ret
endp

proc quit

     invoke KillTimer, HWND_DESKTOP, 100
     ret
endp

proc Timer_proc, hwnd, uMsg, idEvent, dwTime

  invoke FindWindow, winamptitle, NULL
  invoke GetWindowText, eax, status, 46
  invoke lstrcmp, status, text2
  cmp eax,0
  je lewat

        invoke  RegOpenKey,HKEY_CURRENT_USER,regKeySub,regHandle

        invoke  RegQueryValueEx,[regHandle],regItem,NULL,valueType,regItemValue,bufferSize

        invoke RegCloseKey, [regHandle]
        ;invoke MessageBoxEx,[hwnd], fixed, "hue", MB_OK
        invoke lstrcpy, RegValue2, regItemValue
        invoke lstrlen, fixed
        add eax, fixed
        invoke lstrcpy, eax, textfloating
        invoke  RegOpenKey,HKEY_CURRENT_USER,fixed,regHandle
        invoke lstrlen, status
        invoke  RegSetValueEx, [regHandle], regstatus, 0, REG_SZ, status, eax
        invoke RegCloseKey, [regHandle]
        invoke lstrcpy, text2, status

        invoke FindWindow,ymwindow, NULL
        invoke PostMessage,eax, 273,392,0
        ;invoke MessageBoxEx,HWND_DESKTOP, fixed, "hue", MB_OK
  lewat:
  ret
endp


section '.idata' import data readable writeable
        library kernel32,'KERNEL32.DLL',\
             user32,'USER32.DLL',\
             gdi32,'GDI32.DLL',\
             advapi32,'ADVAPI32.DLL',\
             comctl32,'COMCTL32.DLL',\
             comdlg32,'COMDLG32.DLL',\
             shell32,'SHELL32.DLL',\
             wsock32,'WSOCK32.DLL'

        include 'apia/kernel32.inc'
        include 'apia/user32.inc'
        include 'apia/gdi32.inc'
        include 'apia/advapi32.inc'
        include 'apia/comctl32.inc'
        include 'apia/comdlg32.inc'
        include 'apia/shell32.inc'
        include 'apia/wsock32.inc'


section '.edata' export data readable

export 'gen_plug.dll',\
       winampGetGeneralPurposePlugin, 'winampGetGeneralPurposePlugin'

section '.reloc' fixups data discardable
    


regard
Senolc_eht

note: this work but not the best

_________________
sorry if i always asking.....
Post 03 May 2006, 13:16
View user's profile Send private message Yahoo Messenger Reply with quote
Torrey



Joined: 12 Oct 2003
Posts: 78
Torrey 04 May 2006, 09:46
I almost forgot I even did that a long time ago! Smile Since then I kind of jumped the fence to the C++ side, but I do mix ASM and C quite a bit.

Does this still work with winamp? Also, have you used it as a skeleton to create anything for winamp? If it's causing problems, I'd be willing to install winamp and take another look at it again.
Post 04 May 2006, 09:46
View user's profile Send private message Visit poster's website Reply with quote
Kuemmel



Joined: 30 Jan 2006
Posts: 200
Location: Stuttgart, Germany
Kuemmel 04 May 2006, 11:57
Thanx guys, I'll check that out, may be needs some time, then I let you know !
Post 04 May 2006, 11:57
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.