473,325 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

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

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
1 1106
iam_clint
1,208 Expert 1GB
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

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

Similar topics

17
by: BlindHorse | last post by:
Help!!! I need someone to tell me why I am getting the err msg error C2440: '=' : cannot convert from 'char *' to 'char' //==================== #include <iostream>
3
by: Germic | last post by:
Hi, I want to create an Hashtable in C# and pass an pointer to the hashtable to a C code. Later, the C code could reference the hashtable by passing the pointer to the hashtable as a ref...
8
by: Bryan G | last post by:
Hi, I'm working on a VB project which involves using C library functions which take struct pointers as args, and I keep running into this error when trying to pass either an IntPtr or a Structure...
15
by: John Alway | last post by:
Hello, I'm using a DLL I wrote in C++, and am attempting to call and use it from VB. This works fine for functions where I pass parameters by value, but I can't get pointers to work. I get...
8
by: Ivan Liu | last post by:
Hi, I'd like to ask if passing an object as an pointer into a function evokes the copy constructor. Ivan
3
by: anilk501 | last post by:
1)is it possible oop in c using funtion pointers? 2) what is main advantage and application we use funtional pointers?
3
by: drsantosh82 | last post by:
Hi, I am trying to implement a callback routine using function pointers. Basically, I am trying to avoid tying my callback invoking member to a particular class. Let me explain my problem...
1
by: stinger5900 | last post by:
First of all I am new to C++. I have created a class, lets say class A. When the constructor is called I create two new classes Class B and Class C, then are not the same class as A. I need to...
0
by: anu29dolly | last post by:
hello i want to pass two pointers to function ... my code requirement is that i need to pass value tusb_dev1 and tusb_dev2 as it contains different data depending on the usb device found... and...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.