Red Gate forums :: View topic - trying to send array from VC++.net to VB.net DLL
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
PInvoke.Net
PInvoke.Net forum

trying to send array from VC++.net to VB.net DLL

Search in PInvoke.Net forum
Post new topic   Reply to topic
Jump to:  
Author Message
Pizza4Life



Joined: 18 Mar 2008
Posts: 2

PostPosted: Tue Mar 18, 2008 9:11 pm    Post subject: trying to send array from VC++.net to VB.net DLL Reply with quote

I am new to pinvoke and looking for a little COM help. Sending an array from VC++.Net to VB.Net (Visual Studio 2005, .Net Framework 2) seems to be especially complicated - is this something Pinvoke can help with ?

Currently, my function in the VB.Net DLL accepts a lot of Byte variables, which should be in an array, but to overcome the technical difficulty of calling the function from VC++.Net using an array I'm using many variables instead.

Can anyone point me in a direction for the solution ?


thankyou very much!!
Back to top
View user's profile Send private message
Pizza4Life



Joined: 18 Mar 2008
Posts: 2

PostPosted: Wed Mar 19, 2008 12:11 am    Post subject: Reply with quote

this is what I'm doing at the moment to overcome passing an array from VC++

Code:
        Function smbADM1026BlockWrite(ByVal ChannelNumber As Byte, _
                                      ByVal BusID As Byte, _
                                      ByVal SlaveAddress As Byte, _
                                      ByVal ReadCount As Byte, _
                                      ByVal DataCount As Byte, _
                                      Optional ByRef DataBuffer1 As Byte = 0, _
                                      Optional ByRef DataBuffer2 As Byte = 0, _
                                      Optional ByRef DataBuffer3 As Byte = 0, _
                                      Optional ByRef DataBuffer4 As Byte = 0, _
                                      Optional ByRef DataBuffer5 As Byte = 0, _
                                      Optional ByRef DataBuffer6 As Byte = 0, _
                                      Optional ByRef DataBuffer7 As Byte = 0, _
                                      Optional ByRef DataBuffer8 As Byte = 0, _
                                      Optional ByRef DataBuffer9 As Byte = 0, _
                                      Optional ByRef DataBuffer10 As Byte = 0, _
                                      Optional ByRef DataBuffer11 As Byte = 0, _
                                      Optional ByRef DataBuffer12 As Byte = 0, _
                                      Optional ByRef DataBuffer13 As Byte = 0, _
                                      Optional ByRef DataBuffer14 As Byte = 0, _
                                      Optional ByRef DataBuffer15 As Byte = 0, _
                                      Optional ByRef DataBuffer16 As Byte = 0, _
                                      Optional ByRef DataBuffer17 As Byte = 0, _
                                      Optional ByRef DataBuffer18 As Byte = 0, _
                                      Optional ByRef DataBuffer19 As Byte = 0, _
                                      Optional ByRef DataBuffer20 As Byte = 0, _
                                      Optional ByRef DataBuffer21 As Byte = 0, _
                                      Optional ByRef DataBuffer22 As Byte = 0, _
                                      Optional ByRef DataBuffer23 As Byte = 0, _
                                      Optional ByRef DataBuffer24 As Byte = 0, _
                                      Optional ByRef DataBuffer25 As Byte = 0, _
                                      Optional ByRef DataBuffer26 As Byte = 0, _
                                      Optional ByRef DataBuffer27 As Byte = 0, _
                                      Optional ByRef DataBuffer28 As Byte = 0, _
                                      Optional ByRef DataBuffer29 As Byte = 0, _
                                      Optional ByRef DataBuffer30 As Byte = 0, _
                                      Optional ByRef DataBuffer31 As Byte = 0, _
                                      Optional ByRef DataBuffer32 As Byte = 0) _
                                      As Boolean Implements _SMBusIPMI.smbADM1026BlockWrite


        End Function


as you can see, it's very ugly !
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group