While dredging through some old code I ran across the below snippet that uses () around a STRING variable
to force the transformation to the required ASCIIZ.
I had a remembering flash that I once used this quite extensively in early PBDLL days but it somehow faded
into the dark recesses.
Recently if I needed this functionality I've used BYVAL STRPTR(S1)
Is this computer 101,PB 101 ....?
James
to force the transformation to the required ASCIIZ.
I had a remembering flash that I once used this quite extensively in early PBDLL days but it somehow faded
into the dark recesses.
Recently if I needed this functionality I've used BYVAL STRPTR(S1)
Is this computer 101,PB 101 ....?
James
Code:
#COMPILE EXE #DIM ALL DECLARE FUNCTION MessageBox LIB "USER32.DLL" ALIAS "MessageBoxA" (BYVAL hWnd AS DWORD, lpText AS ASCIIZ, lpCaption AS ASCIIZ, BYVAL dwType AS DWORD) AS LONG FUNCTION PBMAIN () AS LONG LOCAL S1 AS STRING LOCAL hDlg AS LONG S1 = "James" MessageBox hDlg,(S1),"Title",IIF&(hDlg, 0, %MB_TOPMOST OR %MB_SETFOREGROUND) END FUNCTION
Comment