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

Managed C++/CLI

 
GeneralRe: Map file generation on VS2008 Pin
Member 225379327-Jul-10 21:12
Member 225379327-Jul-10 21:12 
GeneralRe: Map file generation on VS2008 Pin
Sauro Viti27-Jul-10 21:36
professionalSauro Viti27-Jul-10 21:36 
QuestionHow could I pass data from MFC application to .Net user control? Pin
Daniel Tong20-Jul-10 13:20
Daniel Tong20-Jul-10 13:20 
AnswerRe: How could I pass data from MFC application to .Net user control? Pin
Nish Nishant20-Aug-10 6:41
sitebuilderNish Nishant20-Aug-10 6:41 
Questionhow to save IHTMLElement of Tag IMG Pin
voo doo129-Jul-10 20:45
voo doo129-Jul-10 20:45 
QuestionIE BHO in C++/CLI? Pin
ddoutel8-Jul-10 3:15
ddoutel8-Jul-10 3:15 
AnswerRe: IE BHO in C++/CLI? Pin
ddoutel8-Jul-10 5:55
ddoutel8-Jul-10 5:55 
QuestionError declaring a class from the same namespace Pin
Lomedil7-Jul-10 0:17
Lomedil7-Jul-10 0:17 
Hello Coders,

I have built a wrapper for native code. I need a struct to store information (FileData). The public class for information is inside the same namespace than the consumer class. But when I compile the project, the compiler says me that there is not any FileData class into SMComm namespace and other errors int relation with this one:

<code>error C2039: 'FileData' : is not a member of 'SMComm'
sm-comm\Wrapper.h(21) : error C2143: syntax error : missing ';' before '^'
sm-comm\Wrapper.h(21) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
sm-comm\Wrapper.h(21) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
sm-comm\Wrapper.h(22) : error C2039: 'FileData' : is not a member of 'SMComm'
sm-comm\Wrapper.h(22) : error C2143: syntax error : missing ';' before '^'
sm-comm\Wrapper.h(22) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
sm-comm\Wrapper.h(22) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int</code>



The code here:


<code>#pragma once
#include &amp;quot;Comunicaciones.h&amp;
using namespace System;
using namespace System::Runtime::InteropServices;
namespace SMComm {
public ref class CommWrapper
{
public:
// Ctor Dtor
CommWrapper();
~CommWrapper();
// Variables
public:
SMComm::FileData^ m_memIntern;
SMComm::FileData^ m_memExtern;
private:

public:
// Methods to wrap the native code
bool ConectaServidor(String^ direccion, int puerto, String^ usuario, String^ password);
bool EnviaTrama(int tipoTrama, short parametroExtra);
bool EnviaTrama(String^ tipoTrama, short parametroExtra);
// Access methods
bool EstaConectado();
protected:
// Navive class
CComunicaciones* m_pComm;
};

// Struct for file information
public value class FileData
{
int id;
String^ nombre;
};
}&lt;</code>

Do you know what's wrong?
I'm new in C++/CLI (more or less), but I have programmed with C# and native C++.

Thank you for help me.
AnswerSOLVED: Error declaring a class from the same namespace Pin
Lomedil7-Jul-10 1:13
Lomedil7-Jul-10 1:13 
QuestionMaking a collection in a Property Grid be uneditable. Pin
TheBerk6-Jul-10 11:11
TheBerk6-Jul-10 11:11 
Question.NET assembly not creating as backgrouond process using System.Process Pin
glitteringsound6-Jul-10 1:46
glitteringsound6-Jul-10 1:46 
QuestionException occured While loading dynamically EXE assembly in C++/CLI (Could not load file or assembly ', Version=1.0.3836.39802, Culture=neutral, PublicKeyToken=null' ...) Pin
glitteringsound3-Jul-10 9:14
glitteringsound3-Jul-10 9:14 
AnswerRe: Exception occured While loading dynamically EXE assembly in C++/CLI (Could not load file or assembly ', Version=1.0.3836.39802, Culture=neutral, PublicKeyToken=null' ...) Pin
andrey kurdyumov14-Aug-10 23:22
andrey kurdyumov14-Aug-10 23:22 
QuestionError 1 error C2664 : 'cannot convert parameter 1 from 'gcroot<T>' to 'System::IO::Stream ^%' [modified] Pin
KASR124-Jun-10 20:18
KASR124-Jun-10 20:18 
AnswerRe: Error 1 error C2664 : 'cannot convert parameter 1 from 'gcroot<T>' to 'System::IO::Stream ^%' Pin
Richard MacCutchan25-Jun-10 2:51
mveRichard MacCutchan25-Jun-10 2:51 
AnswerRe: Error 1 error C2664 : 'cannot convert parameter 1 from 'gcroot' to 'System::IO::Stream ^%' Pin
Nish Nishant29-Jun-10 2:48
sitebuilderNish Nishant29-Jun-10 2:48 
GeneralRe: Error 1 error C2664 : 'cannot convert parameter 1 from 'gcroot' to 'System::IO::Stream ^%' Pin
KASR129-Jun-10 2:51
KASR129-Jun-10 2:51 
AnswerRe: Error 1 error C2664 : 'cannot convert parameter 1 from 'gcroot' to 'System::IO::Stream ^%' Pin
Nish Nishant29-Jun-10 3:16
sitebuilderNish Nishant29-Jun-10 3:16 
GeneralRe: Error 1 error C2664 : 'cannot convert parameter 1 from 'gcroot' to 'System::IO::Stream ^%' Pin
KASR129-Jun-10 3:18
KASR129-Jun-10 3:18 
QuestionCustom combo Box[modified] Pin
AbhiHcl23-Jun-10 19:28
AbhiHcl23-Jun-10 19:28 
AnswerRe: Custom combo Bo [modified] Pin
Andreoli Carlo24-Jun-10 22:32
professionalAndreoli Carlo24-Jun-10 22:32 
QuestionHow to stop a simulation while running Pin
KlaasVersteeg21-Jun-10 22:27
KlaasVersteeg21-Jun-10 22:27 
AnswerRe: How to stop a simulation while running Pin
Luc Pattyn22-Jun-10 1:21
sitebuilderLuc Pattyn22-Jun-10 1:21 
GeneralRe: How to stop a simulation while running Pin
KlaasVersteeg22-Jun-10 5:31
KlaasVersteeg22-Jun-10 5:31 
GeneralRe: How to stop a simulation while running Pin
Luc Pattyn22-Jun-10 6:07
sitebuilderLuc Pattyn22-Jun-10 6:07 

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.