By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,025 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Using a C++ DLL from VB, and Passing Pointers? (again)

P: 1
I read "Using a C++ DLL from VB, and Passing Pointers? " and I think very useful. I have a problem like that. I need to use a structure but, I must some array which "double" type. How can I use this array as double?

Thanks.

<StructLayout(LayoutKind.Sequential)> Public Structure MyStruct
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public Position as double
End Structure
Sep 22 '14 #1
Share this Question
Share on Google+
1 Reply


iam_clint
Expert 100+
P: 1,208
Your question doesn't make much sense. I would need more information. Most of the time a c++ dll isn't required to extend .net, if you could give more insight into your problem I can probably help you out.

If I have to make an assumption, I'd assume you have a byte array of a "double", If that is the case you can look into bitconverter.todouble
http://msdn.microsoft.com/en-us/libr....todouble.aspx
Oct 5 '14 #2

Post your reply

Sign in to post your reply or Sign up for a free account.