passing byref to lib proc
Posted: Fri Apr 16, 2010 5:47 pm
I'm working on a project where I needed a TWAIN interface. I'm using EZTWAIN. It comes in a .dll and with a static Lib. I've decided, maybe in error, that it was simpler for me to just use the .lib, that way I would not need to add a dependency to the final product.
For several functions the VB call to the .DLL looks like this;
My PB code looks like this inside of the Import "EZTW32.LIB" / EndImport;
Okay, obviously .?? ain't right, so my question is how do I make this work. How do I duplicate the functionality of "ByRef variable As Any"
I have most everything working and it works really well so this is my first stumbling block in making this somewhat complete.
TIA
*EDIT*
The VB call is actually wrong it should not be TWAIN_ReadRow because that function does not exist, it does work as DIB_ReadRow though. It was a typo in their given example.
For several functions the VB call to the .DLL looks like this;
Code: Select all
Declare Sub TWAIN_ReadRow Lib "eztw32.dll" (ByVal hdib As Long, ByVal nRow As Long, ByRef prow As Any)
Code: Select all
DIB_ReadRow(hdib.l, nRow.l, prow.??) As "_DIB_ReadRow@12"
I have most everything working and it works really well so this is my first stumbling block in making this somewhat complete.
TIA
*EDIT*
The VB call is actually wrong it should not be TWAIN_ReadRow because that function does not exist, it does work as DIB_ReadRow though. It was a typo in their given example.