Re: Correct way to pass data to/from DLLs?
Well, in that case, you can do something like this.
char *GetData(const void *data);
I don't understand what problem you are trying to solve here.
What is the type for your binary data?
Is the returned asci the problem? Do you need to convert it to UNICODE
afterwords? Is MultiByteToWideChar something you are looking for?
AliR.
"Alexander" <the44secs@yahoo.com> wrote in message
news:91ea284d-d717-4519-8472-11a81912da27@z19g2000yqe.googlegroups.com...
On Apr 23, 12:52 am, "AliR \(VC++ MVP\)" <A...@online.nospam> wrote:
What is the signature of the function that you are calling in your dll?
Does it allocate the memory that will be returned to you? No one can
really
answer that without seeing what function signature looks like, and what
type
of data it will return, and what you want to do with the data after you
get
it.
AliR.
"Alexander" <the44s...@yahoo.com> wrote in message
news:6fe67d8f-c9d9-497f-800b-d1895a998722@h2g2000yqg.googlegroups.com...
I have a dll that I need to pass binary data to and receive ascii data
(strings) from. The exe is built UNICODE and MFC while the dll is
neither UNICODE nor MFC and plain C to boot.
The data going back and forth is best thought of as files although I
want to pass on the data via memory.
I have no idea what's the correct way of accomplishing this. How
should I allocate memory, for one? Any pointers or leads would be much
appreciated.
Thank you all.
Thank you for the fast reply.
It's all up to me. I need to do the modifications to both the exe and
dll. I have inherited the code as is.