Click here to Skip to main content
15,903,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: How to share a variable between two MFC Dlls? Pin
CPallini15-Mar-09 22:34
mveCPallini15-Mar-09 22:34 
AnswerRe: How to share a variable between two MFC Dlls? Pin
Hamid_RT15-Mar-09 22:57
Hamid_RT15-Mar-09 22:57 
GeneralRe: How to share a variable between two MFC Dlls? Pin
CPallini15-Mar-09 23:02
mveCPallini15-Mar-09 23:02 
GeneralRe: How to share a variable between two MFC Dlls? Pin
Hamid_RT15-Mar-09 23:06
Hamid_RT15-Mar-09 23:06 
AnswerRe: How to share a variable between two MFC Dlls? Pin
002comp15-Mar-09 23:09
002comp15-Mar-09 23:09 
GeneralRe: How to share a variable between two MFC Dlls? Pin
Hamid_RT16-Mar-09 4:01
Hamid_RT16-Mar-09 4:01 
AnswerRe: How to share a variable between two MFC Dlls? Pin
Hamid_RT15-Mar-09 21:40
Hamid_RT15-Mar-09 21:40 
QuestionProblem with data type from C++ to C# Pin
Lars_K15-Mar-09 15:59
Lars_K15-Mar-09 15:59 
I try to send some data from my multiproject, from C++ to C# but i keep getting the error:

: cannot convert parameter 1 from 'System::Double ^' to 'System::String ^'

Been working all night with trying to find the solution, but im at a loss. Here is the essential part of the code:

C++ part: (this is a mod from a tutorial)For further reading[^]

 // Create an instance of the C# class <br />
    // on the managed heap (using gcnew)<br />
    TestCSharpLib1::CSharpClass ^ csharpClass = gcnew TestCSharpLib1::CSharpClass();<br />
    <br />
    // Prepare marshal context for marshaling data between C# and C++ ( No idea what this does!)<br />
    marshal_context ^ marshalCtx = gcnew marshal_context();<br />
<br />
    //<br />
    // Marshal string from C++ (CStringW - const wchar_t *)<br />
    // to C# (System::String ^)<br />
    //<br />
	System::Double ^ d = marshalCtx->marshal_as< double >( static_cast< double >( In2 ) );<br />
<br />
    // Set string property into C# object<br />
    csharpClass->Text = d;  // THIS gives error C2664<br />


And the C# part:

namespace TestCSharpLib1<br />
{<br />
    public class CSharpClass<br />
    {<br />
        private double _text;<br />
<br />
        public CSharpClass()<br />
        {<br />
            _text = 0;<br />
        }<br />
<br />
        public CSharpClass(double text)<br />
        {<br />
            _text = text;<br />
        }<br />
<br />
        public System.Double Text<br />
        {<br />
            get { return _text; }<br />
            set { _text = value; }<br />
        }


Any help appeciatet!
AnswerRe: Problem with data type from C++ to C# Pin
Joe Woodbury15-Mar-09 17:19
professionalJoe Woodbury15-Mar-09 17:19 
GeneralRe: Problem with data type from C++ to C# Pin
Lars_K15-Mar-09 23:22
Lars_K15-Mar-09 23:22 
AnswerRe: Problem with data type from C++ to C# Pin
Eytukan15-Mar-09 19:38
Eytukan15-Mar-09 19:38 
GeneralRe: Problem with data type from C++ to C# Pin
Lars_K18-Mar-09 8:51
Lars_K18-Mar-09 8:51 
AnswerRe: Problem with data type from C++ to C# Pin
Stuart Dootson15-Mar-09 22:27
professionalStuart Dootson15-Mar-09 22:27 
JokeRe: Problem with data type from C++ to C# Pin
Eytukan15-Mar-09 22:31
Eytukan15-Mar-09 22:31 
GeneralRe: Problem with data type from C++ to C# Pin
Stuart Dootson15-Mar-09 22:50
professionalStuart Dootson15-Mar-09 22:50 
GeneralRe: Problem with data type from C++ to C# Pin
Eytukan15-Mar-09 23:41
Eytukan15-Mar-09 23:41 
Generallink multiple shared libraries o.s linux Pin
al effendi15-Mar-09 15:26
al effendi15-Mar-09 15:26 
GeneralRe: link multiple shared libraries o.s linux Pin
Eytukan15-Mar-09 20:25
Eytukan15-Mar-09 20:25 
GeneralRe: link multiple shared libraries o.s linux Pin
CPallini15-Mar-09 21:13
mveCPallini15-Mar-09 21:13 
GeneralRe: link multiple shared libraries o.s linux Pin
Stuart Dootson15-Mar-09 22:25
professionalStuart Dootson15-Mar-09 22:25 
GeneralRe: link multiple shared libraries o.s linux Pin
al effendi13-Apr-09 5:32
al effendi13-Apr-09 5:32 
QuestionTerminating explorer.exe Pin
hxhl9515-Mar-09 10:46
hxhl9515-Mar-09 10:46 
AnswerRe: Terminating explorer.exe Pin
Kenny McKee15-Mar-09 13:25
Kenny McKee15-Mar-09 13:25 
QuestionRe: Terminating explorer.exe Pin
hxhl9515-Mar-09 13:40
hxhl9515-Mar-09 13:40 
AnswerRe: Terminating explorer.exe Pin
Kenny McKee15-Mar-09 17:54
Kenny McKee15-Mar-09 17:54 

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.