Trying to learn my way around PowerBasic and BASS. This question is just a general question and something I don't quite understand yet in PowerBasic...
The header files provided on these forums for BASS have this:
DECLARE FUNCTION BASS_MusicLoad LIB "bass.dll" ALIAS "BASS_MusicLoad" ( _
BYVAL LONG _ ' BOOL mem
, BYREF ANY _ ' const void *file
, BYVAL QUAD _ ' QWORD offset
, BYVAL DWORD _ ' DWORD length
, BYVAL DWORD _ ' DWORD flags
, BYVAL DWORD _ ' DWORD freq
) AS DWORD ' HMUSIC
I've come across this situation multiple times with different functions and DLLs and I get stuck.
So lets say I wanted to pass a filename through the second argument of that function? How do I pass this through an ANY? I have a feeling this involves pointers, but idk.
From the BassBox project:
DECLARE FUNCTION BASS_MusicLoad LIB "bass.dll" ALIAS "BASS_MusicLoad" (BYVAL mem AS LONG, file AS ASCIIZ, BYVAL offset AS QUAD, BYVAL length AS DWORD, BYVAL flags AS DWORD, BYVAL freq AS DWORD) AS LONG
...
Quote
So lets say I wanted to pass a filename through the second argument of that function? How do I pass this through an ANY? I have a feeling this involves pointers, but idk.
If you use a variable dimmed as ASCIIZ, then just pass that variable, since ASCIIZ variables are passed by reference. If you use a variable dimmed as STRING, then use BYVAL STRPTR(<string variable>).