I have a DLL written in eVC3.0, which works well with other eVC3.0 applications. However, I now need to make the DLL work with eVB3.0 applications, with minimum modifications on DLL code.
The DLL receives a pointer to a BYTE array and fills the first 10 to 30 bytes of the array before returning. However, I don't know how to pass a "byte array" from eVB to DLL. I tried passing a string, but didn't work well (because of UNICODE maybe?) I tried to pass a Variant, but I don't know how to process it in eVC.
So, how can I do this? How can I use eVC DLL to return several bytes of information to an eVB program? Essentially, show me how I can use foo() below from eVB app (not regular VB, where you can pass MyByteArray(0) as ByRef parameter and get things done) so that it can change an array in the eVB app.
void foo(char* pBuffer)
for (int i = 0; i < 20; i++)
pBuffer[i] = 100;
I hope I don't have to go through the ActiveX deal, but for now, anything that works will be appreciated.