Click here to Skip to main content
15,501,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: internationalisation Pin
Kyudos14-Jun-11 11:50
MemberKyudos14-Jun-11 11:50 
GeneralRe: internationalisation Pin
Abhi Lahare14-Jun-11 12:29
MemberAbhi Lahare14-Jun-11 12:29 
QuestionWant to find Rightmost top point from the CPoint List Pin
Abhijit_Satpute9-Jun-11 9:27
MemberAbhijit_Satpute9-Jun-11 9:27 
AnswerRe: Want to find Rightmost top point from the CPoint List Pin
MicroVirus9-Jun-11 11:03
MemberMicroVirus9-Jun-11 11:03 
AnswerRe: Want to find Rightmost top point from the CPoint List Pin
Richard MacCutchan9-Jun-11 11:32
mveRichard MacCutchan9-Jun-11 11:32 
AnswerRe: Want to find Rightmost top point from the CPoint List Pin
CPallini9-Jun-11 23:09
mveCPallini9-Jun-11 23:09 
AnswerRe: Want to find Rightmost top point from the CPoint List Pin
Stefan_Lang15-Jun-11 3:46
mveStefan_Lang15-Jun-11 3:46 
QuestionUsing C# in C++ Pin
Chris_Green9-Jun-11 0:54
MemberChris_Green9-Jun-11 0:54 
Hi,

I have a sample project where I am using a C# library in a C++ test program. I'm doing this by COM, using the tlb and project reference.

C#
<br />
    [ComVisible(true)]<br />
    [ClassInterface(ClassInterfaceType.AutoDual)]<br />
    public class Math<br />
    {<br />
        public int Add(int x, int y)<br />
        {<br />
            return x + y;<br />
        }<br />
<br />
        public static int Subtract(int x, int y)<br />
        {<br />
            return x - y;<br />
        }<br />
    }<br />


C++
<br />
#include "stdafx.h"<br />
#include <iostream><br />
<br />
#import "..\\CSharpUsefulLibrary.tlb" raw_interfaces_only<br />
<br />
int _tmain(int argc, _TCHAR* argv[])<br />
{<br />
    CoInitialize(0);<br />
<br />
    CSharpUsefulLibrary::_MathPtr math(__uuidof(CSharpUsefulLibrary::Math));<br />
<br />
    long value;<br />
    math->Add(1, 2, &value);<br />
    std::wcout << "The value is " << value;<br />
<br />
    CoUninitialize();<br />
	return 0;<br />
}<br />


So this works fine, I'm able to call the add method in my C# library from C++. The question is, how do I call the static subtract method?
AnswerRe: Using C# in C++ Pin
CPallini9-Jun-11 1:24
mveCPallini9-Jun-11 1:24 
GeneralRe: Using C# in C++ Pin
Chris_Green9-Jun-11 1:54
MemberChris_Green9-Jun-11 1:54 
GeneralRe: Using C# in C++ Pin
Rolf Kristensen9-Jun-11 9:43
MemberRolf Kristensen9-Jun-11 9:43 
GeneralRe: Using C# in C++ Pin
CPallini9-Jun-11 23:03
mveCPallini9-Jun-11 23:03 
AnswerRe: Using C# in C++ Pin
ThatsAlok13-Jun-11 22:14
MemberThatsAlok13-Jun-11 22:14 
AnswerRe: Using C# in C++ Pin
ThatsAlok13-Jun-11 22:16
MemberThatsAlok13-Jun-11 22:16 
QuestionFont Size Problem in Edit Control [SOLVED] Pin
vishalgpt8-Jun-11 20:37
Membervishalgpt8-Jun-11 20:37 
AnswerRe: Font Size Problem in Edit Control Pin
Richard MacCutchan8-Jun-11 22:42
mveRichard MacCutchan8-Jun-11 22:42 
GeneralRe: Font Size Problem in Edit Control Pin
vishalgpt8-Jun-11 23:16
Membervishalgpt8-Jun-11 23:16 
GeneralRe: Font Size Problem in Edit Control Pin
Richard MacCutchan9-Jun-11 5:07
mveRichard MacCutchan9-Jun-11 5:07 
GeneralRe: Font Size Problem in Edit Control Pin
vishalgpt9-Jun-11 8:04
Membervishalgpt9-Jun-11 8:04 
GeneralRe: Font Size Problem in Edit Control Pin
Richard MacCutchan9-Jun-11 8:23
mveRichard MacCutchan9-Jun-11 8:23 
GeneralRe: Font Size Problem in Edit Control Pin
vishalgpt9-Jun-11 8:32
Membervishalgpt9-Jun-11 8:32 
GeneralRe: Font Size Problem in Edit Control Pin
Iain Clarke, Warrior Programmer9-Jun-11 9:03
MemberIain Clarke, Warrior Programmer9-Jun-11 9:03 
GeneralRe: Font Size Problem in Edit Control Pin
vishalgpt10-Jun-11 18:28
Membervishalgpt10-Jun-11 18:28 
Questionhow to get the code of OnLButtonDown and OnMouseMove etc in OnDraw method ? Pin
iampradeepsharma8-Jun-11 18:13
Memberiampradeepsharma8-Jun-11 18:13 
AnswerRe: how to get the code of OnLButtonDown and OnMouseMove etc in OnDraw method ? Pin
Cedric Moonen8-Jun-11 21:29
MemberCedric Moonen8-Jun-11 21:29 

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.