Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

edotorpedo

c++ array to vb-array via dll

This topic is 6069 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How can you copy an entire array from a c++ dll to a VB6 array ? The data type is long. What I do is pass a pointer from the c++ array in the dll to the VB-application, and then use CopyMemory arrayVB(0), pointerFromDLL, numberOfBytes to copy the array. This doesn''t work. Is it possible at all, or do I have to copy all elements one at the time? Thanks, Edotorpedo

Share this post


Link to post
Share on other sites
Advertisement
SAFEARRAY
<gives edotorpedo a large bottle of asprin>

Magmai Kai Holmlor

"Oh, like you''ve never written buggy code" - Lee

"What I see is a system that _could do anything - but currently does nothing !" - Anonymous CEO

Share this post


Link to post
Share on other sites
VB doesn''t use arrays the way C++ does. All arrays in VB are actually SAFEARRAYs so that VB can provide bounds checking etc...

Look around for a SAFEARRAY tutorial / article somewhere. Oh, and as Magmai said, don''t forget the asprin.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!