What is the proper PowerBasic DLL v6-7 function export type
if the C construct is a return of LPLong.
Thank You.
Bruce
------------------
function getLongPointer alias "getLongPointer" (iLong as Long) export as Long function = varptr(iLong) end function
DIM px AS LONG PTR, x AS LONG px = RetLongPointer(param) x = @px ... FUNCTION RetLongPointer() AS DWORD STATIC result AS LONG ' the returned pointer target must be persistent ' so returning a pointer to a LOCAL is BAD, BAD, BAD!... code here that generates the value stored in 'result' FUNCTION = VARPTR(result) END FUNCTION
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment