No I haven't tried &strtemp, but I'll try it right now.
Btw I found the solution for my problem, I used a c++ dll and then I just call it from my vb app. But is there a way to do this in vb6 directly, this are the functions I did in my c++ dll
Code:
BSTR __stdcall testFunction(BSTR stringVar)
{
LPSTR buffer;
buffer = (LPSTR)stringVar;
if (OK!=SETDRIVERPAR(290,(LPARAM)buffer)){
::MessageBox(NULL,"Error asignando ","Error",0);
}
else{
}
//buffer = _strrev(buffer);
return(SysAllocString(stringVar));
}
BSTR __stdcall testGetSerial()
{
unsigned char bufSerial[255];
if (OK!=GETDRIVERPAR(290,(LPVOID)bufSerial)){
::MessageBox(NULL,"Error retrieving Serial ","Error",0);
}
else{
}
return (BSTR)bufSerial;
}
My problem is these 2 lines, in both I need a pointer to a string and I'm having trouble doing it in vb6. Any suggestions or using my dll is the only solution.
GETDRIVERPAR(290,(LPVOID)bufSerial))
SETDRIVERPAR(290,(LPARAM)buffer))