Click here to Skip to main content
15,914,074 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCreate an ActiveXControl in an ActiveXControl Pin
tom123933531-May-05 9:49
tom123933531-May-05 9:49 
GeneralVC++6 , need to have timing Pin
nasa6731-May-05 9:44
nasa6731-May-05 9:44 
GeneralRe: VC++6 , need to have timing Pin
Joel Holdsworth31-May-05 10:16
Joel Holdsworth31-May-05 10:16 
GeneralVC++ draw graph from data Pin
nasa6731-May-05 9:41
nasa6731-May-05 9:41 
GeneralRe: VC++ draw graph from data Pin
Christian Graus31-May-05 11:41
protectorChristian Graus31-May-05 11:41 
GeneralRe: VC++ draw graph from data Pin
Kaworu231-May-05 20:05
Kaworu231-May-05 20:05 
GeneralRe: VC++ draw graph from data Pin
ThatsAlok31-May-05 20:37
ThatsAlok31-May-05 20:37 
GeneralMixing C and C# Pin
Drusemark31-May-05 9:22
Drusemark31-May-05 9:22 
I understood you could mix languages. I created 1 solution with 2 projects with the following code: (Original code came from VAX/VMS C, cut to code below, C# code from application I want to mix it with). (CSServer project compiles clean).
C# routine:
using System;<br />
<br />
namespace CSServer {<br />
class CSClass {<br />
<br />
#region Application Start<br />
<br />
static public void Enter_CSServer() <br />
{<br />
int tmp;<br />
Console.WriteLine("Hello World (C#)");<br />
//---------------------------------------------------<br />
// Eventually also need to do something like a<br />
//             Do_Call_Back("Hello from the CS side", &tmp);<br />
//-----------------------------------------<br />
Console.WriteLine("Value={0}",tmp);<br />
} /* Enter_CSServer */<br />
#endregion<br />
<br />
} /* CSClass */<br />
} /* CSServer */


CPP Routine: (startup project)

// This is the main project file for VC++ application project <br />
// generated using an Application Wizard.<br />
// Added to the referenced the reference to CSServerProj;<br />
#include "stdafx.h"<br />
<br />
#using <mscorlib.dll><br />
<br />
using namespace System;<br />
<br />
int _tmain()<br />
{<br />
// TODO: Please replace the sample code below with your own.<br />
Console::WriteLine(S"Hello World(CPP)");<br />
<br />
CSServer::CSClass::Enter_CSServer();<br />
//Also tried   just Enter_CSServer();   and CSServer::Enter_CSServer();<br />
//  and CSClass::Enter_CSServer();<br />
<br />
Console::WriteLine(S"Goodbye Cruel World (CPP)");<br />
return 0;<br />
}<br />
int Do_Call_Back(char *str, int *value)<br />
{<br />
Console::WriteLine(str);<br />
*value = 1;<br />
return(1);<br />
}


I get routine-not-found on Enter_CSServer. Seems like it's related to the NameSpace of CSServer and then the class CSClass; If I add a
using namespace CSServer { .....code... } then it only finds the routines inside the namespace.

Scott Krusemark
330-966-1231
scott@askent.com


Scott Krusemark
330-966-1231
GeneralRe: Mixing C and C# Pin
Christian Graus31-May-05 11:45
protectorChristian Graus31-May-05 11:45 
GeneralRe: Mixing C and C# - redirect question Pin
Anonymous1-Jun-05 10:09
Anonymous1-Jun-05 10:09 
GeneralRe: Mixing C and C# - redirect question Pin
Drusemark1-Jun-05 10:17
Drusemark1-Jun-05 10:17 
GeneralRe: Mixing C and C# - redirect question Pin
Christian Graus1-Jun-05 11:23
protectorChristian Graus1-Jun-05 11:23 
GeneralRe: Mixing C and C# Pin
Tom Archer31-May-05 12:48
Tom Archer31-May-05 12:48 
Generalurgent help Pin
Usman Tasleem Akshaf31-May-05 5:01
Usman Tasleem Akshaf31-May-05 5:01 
GeneralRe: urgent help Pin
Christian Graus31-May-05 11:48
protectorChristian Graus31-May-05 11:48 
GeneralGet &amp; Setting only resource DLL Pin
Kaworu231-May-05 4:57
Kaworu231-May-05 4:57 
GeneralRe: Get &amp; Setting only resource DLL Pin
Blake Miller31-May-05 5:53
Blake Miller31-May-05 5:53 
GeneralRe: Get &amp; Setting only resource DLL Pin
Kaworu231-May-05 20:10
Kaworu231-May-05 20:10 
GeneralMFC and exception handling Pin
Cedric Moonen31-May-05 4:49
Cedric Moonen31-May-05 4:49 
GeneralRe: MFC and exception handling Pin
toxcct31-May-05 5:01
toxcct31-May-05 5:01 
GeneralRe: MFC and exception handling Pin
Cedric Moonen31-May-05 5:34
Cedric Moonen31-May-05 5:34 
GeneralRe: MFC and exception handling Pin
Jack Puppy31-May-05 8:52
Jack Puppy31-May-05 8:52 
GeneralRe: MFC and exception handling Pin
Cedric Moonen31-May-05 20:03
Cedric Moonen31-May-05 20:03 
GeneralRe: MFC and exception handling Pin
Bob Stanneveld31-May-05 10:37
Bob Stanneveld31-May-05 10:37 
GeneralPower Management Pin
Momotte31-May-05 4:28
Momotte31-May-05 4:28 

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.