Click here to Skip to main content
15,904,935 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Console BEEP! (ASCII bell code?) Pin
Eric Strain15-Aug-09 4:59
Eric Strain15-Aug-09 4:59 
QuestionLinked Lists in C++ [modified] Pin
Muhammad Shemyal Nisar7-Aug-07 11:08
Muhammad Shemyal Nisar7-Aug-07 11:08 
AnswerRe: Linked Lists in C++ Pin
Liam O'Hagan7-Aug-07 16:44
Liam O'Hagan7-Aug-07 16:44 
GeneralRe: Linked Lists in C++ Pin
Mark Salsbery7-Aug-07 17:46
Mark Salsbery7-Aug-07 17:46 
GeneralRe: Linked Lists in C++ Pin
ThatsAlok7-Aug-07 23:03
ThatsAlok7-Aug-07 23:03 
AnswerRe: Linked Lists in C++ Pin
David Crow7-Aug-07 17:25
David Crow7-Aug-07 17:25 
QuestionOpening Webfolder files - storing their paths Pin
anujpshah7-Aug-07 10:30
anujpshah7-Aug-07 10:30 
QuestionPassing a 2 Dim Array to a DLL written in C++ Pin
CK9387-Aug-07 9:44
CK9387-Aug-07 9:44 
Hi.

I'm trying to pass a 2D array to my DLL. I can pass a 1D array, however I'm not sure how to work around a 2D. Any suggestions? I guess I just really want function Func2 to work. Is there a better way than to use a pointer to a pointer?


This is what I have...I'm just trying to grasp the concept, so the functions don't make any sense.

VBA CODE:

Private Declare Function Func1 Lib "C:\Documents and Settings\...\MyDLL.dll" _
(ByRef WeightArray As Double) As Double


Public Function temp(ByRef weightArr As Variant) As Double

Dim wArr() As Double

ReDim wArr(0 To 3) As Double

For i = 0 To 3
wArr(i) = weightArr(i + 1)
Next i

temp = Func1(wArr(0))

End Function


C++ CODE:
#define DllExport __declspec( dllexport )

double __declspec (dllexport) __stdcall Func1(double *WeightArray)
{
return WeightArray[0];
}


double __declspec (dllexport) __stdcall Func2(double **WeightArray)
{
return WeightArray[0][0];
}


QuestionRe: Passing a 2 Dim Array to a DLL written in C++ Pin
David Crow7-Aug-07 10:20
David Crow7-Aug-07 10:20 
AnswerRe: Passing a 2 Dim Array to a DLL written in C++ Pin
CK9387-Aug-07 12:07
CK9387-Aug-07 12:07 
QuestionRe: Passing a 2 Dim Array to a DLL written in C++ Pin
CK9387-Aug-07 12:13
CK9387-Aug-07 12:13 
GeneralRe: Passing a 2 Dim Array to a DLL written in C++ Pin
David Crow7-Aug-07 17:07
David Crow7-Aug-07 17:07 
QuestionRe: Passing a 2 Dim Array to a DLL written in C++ Pin
CK9388-Aug-07 3:38
CK9388-Aug-07 3:38 
QuestionClear the debug output window Pin
bob169727-Aug-07 9:15
bob169727-Aug-07 9:15 
AnswerRe: Clear the debug output window Pin
Jim Crafton7-Aug-07 9:34
Jim Crafton7-Aug-07 9:34 
AnswerRe: Clear the debug output window Pin
Mark Salsbery7-Aug-07 9:44
Mark Salsbery7-Aug-07 9:44 
GeneralRe: Clear the debug output window Pin
bob169727-Aug-07 10:12
bob169727-Aug-07 10:12 
GeneralRe: Clear the debug output window Pin
David Crow7-Aug-07 10:22
David Crow7-Aug-07 10:22 
GeneralRe: Clear the debug output window Pin
bob169727-Aug-07 19:21
bob169727-Aug-07 19:21 
GeneralRe: Clear the debug output window Pin
Mark Salsbery7-Aug-07 10:28
Mark Salsbery7-Aug-07 10:28 
GeneralRe: Clear the debug output window Pin
bob169727-Aug-07 19:44
bob169727-Aug-07 19:44 
AnswerRe: Clear the debug output window Pin
Hans Dietrich7-Aug-07 15:46
mentorHans Dietrich7-Aug-07 15:46 
GeneralRe: Clear the debug output window Pin
bob169727-Aug-07 19:31
bob169727-Aug-07 19:31 
GeneralRe: Clear the debug output window Pin
Hans Dietrich8-Aug-07 2:50
mentorHans Dietrich8-Aug-07 2:50 
GeneralRe: Clear the debug output window Pin
bob169728-Aug-07 3:18
bob169728-Aug-07 3:18 

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.