Click here to Skip to main content
15,881,812 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Book for Managed Extenstion for Vc++ Pin
Vijjuuu.3-Jul-11 7:22
Vijjuuu.3-Jul-11 7:22 
QuestionRe: Book for Managed Extenstion for Vc++ Pin
Mark Salsbery3-Jul-11 7:50
Mark Salsbery3-Jul-11 7:50 
GeneralRe: Book for Managed Extenstion for Vc++ [modified] Pin
ian__lindsay4-Jul-11 5:34
ian__lindsay4-Jul-11 5:34 
GeneralRe: Book for Managed Extenstion for Vc++ Pin
Vijjuuu.4-Jul-11 21:08
Vijjuuu.4-Jul-11 21:08 
QuestionProblem with managed and unmanaged mixed coding Pin
Lighter Joul1-Jul-11 13:56
Lighter Joul1-Jul-11 13:56 
AnswerRe: Problem with managed and unmanaged mixed coding Pin
Philippe Mori1-Jul-11 15:45
Philippe Mori1-Jul-11 15:45 
GeneralRe: Problem with managed and unmanaged mixed coding Pin
Lighter Joul2-Jul-11 1:33
Lighter Joul2-Jul-11 1:33 
GeneralRe: Problem with managed and unmanaged mixed coding Pin
Philippe Mori2-Jul-11 1:55
Philippe Mori2-Jul-11 1:55 
Well, generally all functions in a .cpp that are intended to be used from other files in the project should also be declared in the corresponding header. Then in the file where you want to call the unmanaged function, you just include that file.

In fact, this is the same for managed functions inside the project or any functions in standard librairies.

For this aspect C+/CLI works exactly as C++. The main difference with standard C++ is that when you add a reference to a managed DLL, all public symbols will be visible without any additionnal include to all file in that project. So for managed code outside the current project, C++/CLI behave more like C#.

ProjectA
unmanaged.h
// Since the functionm is intended to be used by multiple file,
// it should be declared inside an header file.
void UnmanagedFunction();


unmanaged.cpp
#include "unmanaged.h"

void UnmanagedFunction()
{
   // Do something
}


other.cpp
#include "unmanaged.h"
void CallingFunction()
{
  // The following function will be defined since it is declared 
  // inside unmanaged.h which is include by this file.
  // By the way, if the function was inside a different namespace, 
  // you will have to qualify the call or explicitly uses that 
  // namespace (not much different that regular C++)
  UnmanagedFunction();
}

Philippe Mori

GeneralRe: Problem with managed and unmanaged mixed coding Pin
Lighter Joul2-Jul-11 3:35
Lighter Joul2-Jul-11 3:35 
QuestionEDIT CONTROL password style Pin
RomTibi30-Jun-11 7:04
RomTibi30-Jun-11 7:04 
AnswerRe: EDIT CONTROL password style Pin
Mark Salsbery30-Jun-11 8:20
Mark Salsbery30-Jun-11 8:20 
QuestionDebugging an application minidump using windbg Pin
Prasann Mayekar9-Jun-11 23:01
Prasann Mayekar9-Jun-11 23:01 
Answercross-post alert Pin
Luc Pattyn10-Jun-11 1:08
sitebuilderLuc Pattyn10-Jun-11 1:08 
QuestionMulti-Project Solution in visual studio 2008 (C++/CLI) (Windows Form Application). Pin
PrajaktPatil6-Jun-11 1:24
PrajaktPatil6-Jun-11 1:24 
QuestionRe: Multi-Project Solution in visual studio 2008 (C++/CLI) (Windows Form Application). Pin
Mark Salsbery6-Jun-11 7:04
Mark Salsbery6-Jun-11 7:04 
GeneralRe: Multi-Project Solution in visual studio 2008 (C++/CLI) (Windows Form Application). Pin
PrajaktPatil6-Jun-11 23:20
PrajaktPatil6-Jun-11 23:20 
AnswerRe: Multi-Project Solution in visual studio 2008 (C++/CLI) (Windows Form Application). Pin
Albert Holguin8-Jun-11 18:48
professionalAlbert Holguin8-Jun-11 18:48 
AnswerRe: Multi-Project Solution in visual studio 2008 (C++/CLI) (Windows Form Application). Pin
Philippe Mori2-Jul-11 2:17
Philippe Mori2-Jul-11 2:17 
QuestionAccess methods from .Net C# COM object from Unmanaged C++ code Pin
Member 79736701-Jun-11 23:20
Member 79736701-Jun-11 23:20 
AnswerRe: Access methods from .Net C# COM object from Unmanaged C++ code Pin
MicroVirus18-Jun-11 3:49
MicroVirus18-Jun-11 3:49 
AnswerRe: Access methods from .Net C# COM object from Unmanaged C++ code Pin
Philippe Mori2-Jul-11 2:30
Philippe Mori2-Jul-11 2:30 
QuestionQuestion about Connecting to Postgresql with ODBC Pin
Lighter Joul27-May-11 5:07
Lighter Joul27-May-11 5:07 
AnswerRe: Question about Connecting to Postgresql with ODBC Pin
Mark Salsbery27-May-11 7:21
Mark Salsbery27-May-11 7:21 
QuestionDrawing problem in panel when scrolling Pin
Lighter Joul26-May-11 4:13
Lighter Joul26-May-11 4:13 
AnswerRe: Drawing problem in panel when scrolling Pin
Lighter Joul26-May-11 21:31
Lighter Joul26-May-11 21: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.