Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Memblock ptr parameter in VC++ ?

Author
Message
Kelebrindae
21
Years of Service
User Offline
Joined: 15th Sep 2003
Location: Where cheeses are scarier than dragons.
Posted: 3rd Dec 2004 22:40 Edited at: 3rd Dec 2004 22:41
Hi,

I've got some DB code which generates a memblock containing 100 bytes (a table of 100 characters, in fact).
And I want to send the memblock pointer to a function in a DLL I made in VC++6, to do some massive calculations on these bytes.

Can you tell me how to write the function declaration ?
(yeah, I know: noob question... )

Thanks a lot!

Ideas: memories of things which did not occur yet...
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Dec 2004 03:29
Easy:

CALL DLL 1, "MyFunctionName", GET MEMBLOCK PTR(1)

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Kelebrindae
21
Years of Service
User Offline
Joined: 15th Sep 2003
Location: Where cheeses are scarier than dragons.
Posted: 6th Dec 2004 16:24
Thank you Ian, but my question was more about the VC++ side:
How to write the function declaration in VC++ so I can access to the datas stored in the memblock ?

Ideas: memories of things which did not occur yet...
Kelebrindae
21
Years of Service
User Offline
Joined: 15th Sep 2003
Location: Where cheeses are scarier than dragons.
Posted: 6th Dec 2004 23:31 Edited at: 6th Dec 2004 23:32
Forget it, I've just figured it out.
My memblock contains only one type of datas (bytes). So, in VC++, I can use the memblock pointer as if it was a pointer to a char table, like this:

And then, in DB, you can read the memblock and get the datas that the VC code put in it. Easy, and powerful.

Hmmm, I think I'm gonna have fun with this...

Ideas: memories of things which did not occur yet...

Login to post a reply

Server time is: 2024-11-23 09:56:56
Your offset time is: 2024-11-23 09:56:56