Hofi Posted November 13, 2008 Posted November 13, 2008 now you see what i mean, i tried to tell you this since yesterday and thats reason i think its maybe a bug in Autoit
BrettF Posted November 13, 2008 Author Posted November 13, 2008 As valik said, it's not AutoIt's fault. Its probably how we are using it Or a bug in my lame ass coding. You don't hammer nails into windows do they... Thats misusing the tools... Exactly what where doing... Hahahahaha. I think we might need to see how eukalyptus goes with maybe making another dll to handle the callback like he did with the recording functions? I will sleep on it, and see what I can come up with later, but for now I need to do assignments. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
ProgAndy Posted November 13, 2008 Posted November 13, 2008 (edited) Here i have a DLL with Callback-Procs (written in freebasic) #Include "windows.bi" Function StreamProc ALIAS "StreamProc"(BYVAL handle As Dword, ByVal buffer As PCVOID, ByVal length As Dword,ByVal user As PCVOID) As Boolean Export Return True End Function Function DownloadProc ALIAS "DownloadProc"(ByVal buffer As PCVOID, ByVal length As Dword,ByVal user As PCVOID) As Boolean Export Return True End Function function StreamProcWriteFile ALIAS "StreamProcWriteFile"(BYVAL handle As Dword, ByVal buffer As PCVOID, ByVal length As Dword,ByVal user As PCVOID) As Boolean EXPORT Dim As Integer written If Not WriteFile(user,buffer,length,@written,NULL) Then Return FALSE If written < length Then Return False RETURN True End Function get the Pointers: ; #FUNCTION# ==================================================================================================================== ; Name...........: __BASS_LoadLibrary ; Author ........: Paul Campbell (PaulIA) ; =============================================================================================================================== Func __BASS_LoadLibrary($sFileName) Local $aResult = DllCall("Kernel32.dll", "hwnd", "LoadLibraryA", "str", $sFileName) If @error Then Return SetError(1,0,0) Return $aResult[0] EndFunc ;==>_WinAPI_LoadLibrary ; #FUNCTION# ==================================================================================================================== ; Name...........: __BASS_LoadLibrary ; Author ........: Prog@ndy ; =============================================================================================================================== Func __BASS_GetProcAddress($hModule,$sFunctionName) Local $aResult = DllCall("Kernel32.dll", "hwnd", "GetProcAddress","hwnd",$hModule, "str", $sFunctionName) If @error Then Return SetError(1,0,0) Return $aResult[0] EndFunc ;==>_WinAPI_LoadLibrary Global Const $hLibBassCB = __BASS_LoadLibrary("BassCB.dll") Global Const $DownloadProc = __BASS_GetProcAddress($hLibBassCB,"DownloadProc@12") Global Const $StreamProc = __BASS_GetProcAddress($hLibBassCB,"StreamProc@16") Global Const $StreamProcWriteFile = __BASS_GetProcAddress($hLibBassCB,"StreamProcWriteFile@16") Then just use the pointers in place of the Callback parameter. Example as attachmentBassCB.dllBass_Ext.au3 Edited November 13, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
BrettF Posted November 13, 2008 Author Posted November 13, 2008 Very nice. I wonder if this will resolve any issues? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Valik Posted November 13, 2008 Posted November 13, 2008 I'm telling you, double check your calling conventions on the DllCallback stuff. Stack corruption due to using the wrong calling convention is exactly the sort of thing that can lead to unexpected crashes much later.
BrettF Posted November 13, 2008 Author Posted November 13, 2008 I will bump my original topic in Support... I'm not too good with the callbacks, so it is very possible that it isn't working... I hope someone there has an answer. Thanks, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
monoceres Posted November 13, 2008 Posted November 13, 2008 I'm telling you, double check your calling conventions on the DllCallback stuff. Stack corruption due to using the wrong calling convention is exactly the sort of thing that can lead to unexpected crashes much later.It's nothing wrong with the calling convention. Here's how the StreamProc callback is defined:typedef DWORD (CALLBACK STREAMPROC)(HSTREAM handle, void *buffer, DWORD length, void *user);And CALLBACK == __stdcall so... Broken link? PM me and I'll send you the file!
Hofi Posted November 14, 2008 Posted November 14, 2008 Here i have a DLL with Callback-Procs (written in freebasic) #Include "windows.bi" Function StreamProc ALIAS "StreamProc"(BYVAL handle As Dword, ByVal buffer As PCVOID, ByVal length As Dword,ByVal user As PCVOID) As Boolean Export Return True End Function Function DownloadProc ALIAS "DownloadProc"(ByVal buffer As PCVOID, ByVal length As Dword,ByVal user As PCVOID) As Boolean Export Return True End Function function StreamProcWriteFile ALIAS "StreamProcWriteFile"(BYVAL handle As Dword, ByVal buffer As PCVOID, ByVal length As Dword,ByVal user As PCVOID) As Boolean EXPORT Dim As Integer written If Not WriteFile(user,buffer,length,@written,NULL) Then Return FALSE If written < length Then Return False RETURN True End Function get the Pointers: ; #FUNCTION# ==================================================================================================================== ; Name...........: __BASS_LoadLibrary ; Author ........: Paul Campbell (PaulIA) ; =============================================================================================================================== Func __BASS_LoadLibrary($sFileName) Local $aResult = DllCall("Kernel32.dll", "hwnd", "LoadLibraryA", "str", $sFileName) If @error Then Return SetError(1,0,0) Return $aResult[0] EndFunc ;==>_WinAPI_LoadLibrary ; #FUNCTION# ==================================================================================================================== ; Name...........: __BASS_LoadLibrary ; Author ........: Prog@ndy ; =============================================================================================================================== Func __BASS_GetProcAddress($hModule,$sFunctionName) Local $aResult = DllCall("Kernel32.dll", "hwnd", "GetProcAddress","hwnd",$hModule, "str", $sFunctionName) If @error Then Return SetError(1,0,0) Return $aResult[0] EndFunc ;==>_WinAPI_LoadLibrary Global Const $hLibBassCB = __BASS_LoadLibrary("BassCB.dll") Global Const $DownloadProc = __BASS_GetProcAddress($hLibBassCB,"DownloadProc@12") Global Const $StreamProc = __BASS_GetProcAddress($hLibBassCB,"StreamProc@16") Global Const $StreamProcWriteFile = __BASS_GetProcAddress($hLibBassCB,"StreamProcWriteFile@16") Then just use the pointers in place of the Callback parameter. Example as attachment hmm i get this error: Bass.au3 (2363) : ==> Badly formatted "Func" statement.: $dcProc = DllCallbackRegister ($proc, "ptr", "ptr;dword;ptr") ?????????????????????????????????????[..] >Exit code: 1 Time: 4.792
ProgAndy Posted November 14, 2008 Posted November 14, 2008 (edited) _BASS_StreamCreateURL has to be changed, too Func _BASS_StreamCreateURL($bass_dll, $url, $offset, $flags, $proc = 0, $user = "") Local $dsURL = DllStructCreate("char[255]") DllStructSetData($dsURL, 1, $url) Local $dsUser = DllStructCreate("char[255]") DllStructSetData($dsUser, 1, $user) Local $BASS_ret_ = DllCall($bass_dll, "dword", "BASS_StreamCreateURL", "ptr", DllStructGetPtr($dsURL), "DWORD", $offset, "DWORD", $flags, "ptr", $Proc, "ptr", DllStructGetPtr($dsUser)) Local $error = _BASS_ErrorGetCode($bass_dll) If $error <> 0 Then Return SetError($error, "", 0) Else Return SetError(0, "", $BASS_ret_[0]) EndIf EndFunc ;==>_BASS_StreamCreateURL Edited November 14, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
BrettF Posted November 16, 2008 Author Posted November 16, 2008 Will update today or tomorow... before or after i've slept... hahahaha Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
gseller Posted November 18, 2008 Posted November 18, 2008 Can someone post the bass.au3 ? The download on post one is dead.. It just downloads to a zero bite file.. Thanks
BrettF Posted November 18, 2008 Author Posted November 18, 2008 Well every time i download it (on different computers too), it works correctly.Direct link:http://signa5.com/projects/BASS/downloads/BASS.zip Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
footswitch Posted November 23, 2008 Posted November 23, 2008 Hey there, just a minor observation:In _BASS_GetVersion(), you probably want to return the hex value of the version. Else, the returned decimal value doesn't make much sense:For example, 0x02040103 (hex), would be version 2.4.1.3Still working on BASSmix Keep it up!
BrettF Posted November 23, 2008 Author Posted November 23, 2008 Yer... Hahahahahhaha well fix Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
flxfxp Posted December 3, 2008 Posted December 3, 2008 Hey, I'm new to Autoit and especially to BASS. I would like to create a gui with a xm music file playing in the background, is this possible? In the BASS website it says it can play xm. Would anybody be so kind to provide a coding example? Thank you in advance! FLX
BrettF Posted December 3, 2008 Author Posted December 3, 2008 Hi, See the examples contained in the zip. You should be able to modify them to suit your needs. Once you've done that post your code so we can help you more. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
flxfxp Posted December 4, 2008 Posted December 4, 2008 Hi Brett, I see your hosting is up again, it was down yesterday which rendered me unable to see the examples. I'll let you know when I got some results. Thanks, Dennis
BrettF Posted December 4, 2008 Author Posted December 4, 2008 Yeah I know. They had to upgrade everything. Happened while I was asleep Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now