Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: almost non vb question.. but includes VB...


Message #1 by "Gonzalo Martin Bianchi" <gbianchi@a...> on Tue, 7 Jan 2003 15:00:47 -0300
thanks for the reply..

the dll is writte in c.. and there were not asking for the buffer len..

anyway after searching carefully the msdn we found that the strings should
be LPSTR and then everything work... along with a couple of thing about how
to compile it..

thanks anyway...

Gonzalo Martin Bianchi
Desarrollo de sistemas de cuenta corriente tributaria
Hipolito Yrigoyen 370
Entrepiso B pasillo 600 oficina 5
4347-3181
----- Original Message -----
From: "Marco Straforini" <marco.straforini@c...>
To: "professional vb" <pro_vb@p...>
Sent: Thursday, January 09, 2003 8:10 PM
Subject: [pro_vb] Re: almost non vb question.. but includes VB...


> It looks that your is not an ActiveX dll, but a standard one and in
> this case using Strings is tricky.
> If you need to send a pointer to the API and the API allocates the
> memory for the pointer, then you have to send a long byref,
> convert the memory allocated into a string and then free the memory.
> If you are lucky, the API wants an alreday allocate buffer (like
> GetComputerName) and eventually a second parameter specifying the
> size of the buffer, in that case send an empty string like this:
>
> dim sBuffer as String
> sBuffer = Space(lBufferSize)
>
> Let me know,
> Marco
>
> > hi there..
>
> we have a problem here involving using a dll that is not made in VB..
>
> this dll is build in c... i can connect to it if i dont have to send any
> arguments to the functions, but i need to send strings to the functions,
> one of them is an output string (the function return something inside
> it...)
>
> anyone know how the strings have to define in the c functions???
>
> also.. how do i send a blank string to it so the function modify it???
>
> thanks a lot...
>
>
> Gonzalo Martin Bianchi
> Desarrollo de sistemas de cuenta corriente tributaria
> Hipolito Yrigoyen 370
> Entrepiso B pasillo 600 oficina 5
> 4347-3181


  Return to Index