Click here to Skip to main content
15,901,035 members
Home / Discussions / C#
   

C#

 
GeneralRe: Passing dynamic 2 dim float array in c# to unmanaged c++ dll Pin
m@u11-Dec-07 3:25
m@u11-Dec-07 3:25 
GeneralRe: Passing dynamic 2 dim float array in c# to unmanaged c++ dll Pin
f4hd11-Dec-07 3:46
f4hd11-Dec-07 3:46 
GeneralRe: Passing dynamic 2 dim float array in c# to unmanaged c++ dll Pin
m@u11-Dec-07 4:15
m@u11-Dec-07 4:15 
GeneralRe: Passing dynamic 2 dim float array in c# to unmanaged c++ dll Pin
f4hd11-Dec-07 8:33
f4hd11-Dec-07 8:33 
GeneralRe: Passing dynamic 2 dim float array in c# to unmanaged c++ dll Pin
m@u11-Dec-07 22:33
m@u11-Dec-07 22:33 
GeneralRe: Passing dynamic 2 dim float array in c# to unmanaged c++ dll Pin
f4hd13-Dec-07 4:23
f4hd13-Dec-07 4:23 
GeneralRe: Passing dynamic 2 dim float array in c# to unmanaged c++ dll Pin
m@u13-Dec-07 5:02
m@u13-Dec-07 5:02 
GeneralRe: Passing dynamic 2 dim float array in c# to unmanaged c++ dll Pin
Skippums11-Dec-07 9:02
Skippums11-Dec-07 9:02 
Ok, here are a few ideas for you to try:

1. Change the C# import declaration type from float[,] to float[][] (they are NOT equivalent types)
2. Change the C++ method signiture to take parameters of type float[][] instead of float**
3. Convert the float[][] to a float[] in your c# code, and change your method to either float* or float[] in your C++ code
4. Convert the float[][] to an IntPtr pointing to the address of the array
5. Convert the float[][] to a float* (requires unsafe code in C#)
6. Try combinations of the above, where you attempt a method signature in C++ using float[][], float[], float**, float*, and change the type you are sending from C# between IntPtr, float[], float*, float[][], float[,], float**, and in addition try mixing in the keywords out and ref as well
7. Do the same as you did in #6, but try copying the data to public memory using Marshal.Copy prior to making all the above calls

The above suggestions give you hundreds of combinations to try, and my guess is that at least one of them will work. Let us know if you get this figured out,

Sounds like somebody's got a case of the Mondays

-Jeff

GeneralRe: Passing dynamic 2 dim float array in c# to unmanaged c++ dll Pin
f4hd11-Dec-07 9:34
f4hd11-Dec-07 9:34 
Questionregarding to dll hell with code Pin
creative2002guy11-Dec-07 2:57
creative2002guy11-Dec-07 2:57 
GeneralRe: regarding to dll hell with code Pin
Pete O'Hanlon11-Dec-07 3:17
mvePete O'Hanlon11-Dec-07 3:17 
GeneralRe: regarding to dll hell with code Pin
Colin Angus Mackay11-Dec-07 3:22
Colin Angus Mackay11-Dec-07 3:22 
JokeRe: regarding to dll hell with code Pin
Luc Pattyn11-Dec-07 4:15
sitebuilderLuc Pattyn11-Dec-07 4:15 
GeneralRe: regarding to dll hell with code Pin
creative2002guy11-Dec-07 7:09
creative2002guy11-Dec-07 7:09 
GeneralEnterprise Library configuration tool Pin
PaulPrice11-Dec-07 2:19
PaulPrice11-Dec-07 2:19 
Generaldatatable column size Pin
arkiboys11-Dec-07 1:55
arkiboys11-Dec-07 1:55 
GeneralRe: datatable column size Pin
pmarfleet11-Dec-07 2:47
pmarfleet11-Dec-07 2:47 
Generalerror in execution of SSIS package.. Pin
tasumisra11-Dec-07 1:05
tasumisra11-Dec-07 1:05 
GeneralRe: error in execution of SSIS package.. Pin
pmarfleet11-Dec-07 2:48
pmarfleet11-Dec-07 2:48 
GeneralRe: error in execution of SSIS package.. Pin
mecca15-Feb-09 7:17
mecca15-Feb-09 7:17 
Generaldatagridview cell size limit Pin
arkiboys11-Dec-07 0:31
arkiboys11-Dec-07 0:31 
GeneralPop3 mail attachment download Pin
energeticsridhar11-Dec-07 0:18
energeticsridhar11-Dec-07 0:18 
GeneralRe: Pop3 mail attachment download Pin
m@u11-Dec-07 2:10
m@u11-Dec-07 2:10 
Generalunable to find database of webservice Pin
Member 447840010-Dec-07 23:53
Member 447840010-Dec-07 23:53 
GeneralRe: unable to find database of webservice Pin
pmarfleet11-Dec-07 2:31
pmarfleet11-Dec-07 2:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.