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

Managed C++/CLI

 
GeneralMFC APLICATION AND MANAGED CODE Pin
imran_rafique6-Aug-02 0:11
imran_rafique6-Aug-02 0:11 
GeneralRe: MFC APLICATION AND MANAGED CODE Pin
Nish Nishant6-Aug-02 17:46
sitebuilderNish Nishant6-Aug-02 17:46 
GeneralRe: MFC APLICATION AND MANAGED CODE Pin
rbc9-Aug-02 13:52
rbc9-Aug-02 13:52 
GeneralRe: MFC APLICATION AND MANAGED CODE Pin
Nish Nishant9-Aug-02 14:15
sitebuilderNish Nishant9-Aug-02 14:15 
GeneralRe: MFC APLICATION AND MANAGED CODE Pin
imran_rafique9-Aug-02 23:00
imran_rafique9-Aug-02 23:00 
GeneralRe: MFC APLICATION AND MANAGED CODE Pin
Nish Nishant10-Aug-02 1:16
sitebuilderNish Nishant10-Aug-02 1:16 
GeneralRe: MFC APLICATION AND MANAGED CODE Pin
imran_rafique13-Aug-02 11:04
imran_rafique13-Aug-02 11:04 
Generalhelp in csocket code plzzzz Pin
imran_rafique6-Aug-02 0:01
imran_rafique6-Aug-02 0:01 
SIR,
I dont know how to use csocket class in managed code.
any bode can help me.
plz read this code clearly and

namespace mfcdll
{
class CListeningSocket : public CSocket
{
public:
CListeningSocket(){}
virtual ~CListeningSocket(void){}

//{{AFX_VIRTUAL(CListeningSocket)
public:
virtual void OnAccept(int nErrorCode);
//}}AFX_VIRTUAL

// Generated message map functions
//{{AFX_MSG(CListeningSocket)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
};
//***********************************************
public __gc class M_listeningsocket
{
public:
M_listeningsocket();
~M_listeningsocket(void);

CListeningSocket *ptr3;

//{{AFX_VIRTUAL(M_listeningsocket)
public:
virtual void OnAccept(int nErrorCode);
//}}AFX_VIRTUAL
void Create(UINT port);
bool Listen(void);
};
}
//********************************************************
///file name (m_listeningsocket.cpp)


M_listeningsocket::M_listeningsocket()
{
ptr3=new CListeningSocket( );
}
M_listeningsocket::~M_listeningsocket(void)
{
delete ptr3;
}

void mfcdll::M_listeningsocket::OnAccept(int nErrorCode)
{
ptr3->OnAccept(nErrorCode);
}

void mfcdll::M_listeningsocket::Create(UINT port)
{
if(ptr3->Create(port))
MessageBox(0,"create succ....",0,0);
else
MessageBox(0,"create not succge....",0,0);
}

bool mfcdll::M_listeningsocket::Listen(void)
{
if(ptr3->Listen())
{
MessageBox(0,"Listen succ....",0,0);
return true;
}
else
{
MessageBox(0,"Listen not succ....",0,0);
return false;
}

}



//********************************************************

if(ptr3->Create(port))
i dont know why it return false in above line what is mistake in the above code can any body tell me i will be very thank full to u.

r00d0034@yahoo.com
Generalcsocket in managed code Pin
imran_rafique5-Aug-02 23:57
imran_rafique5-Aug-02 23:57 
GeneralRe: csocket in managed code Pin
Nish Nishant6-Aug-02 17:44
sitebuilderNish Nishant6-Aug-02 17:44 
Generalcsocketin managed code Pin
imran_rafique5-Aug-02 23:56
imran_rafique5-Aug-02 23:56 
GeneralCopyLocal Mystery in Man C++ Pin
Firoz5-Aug-02 21:19
Firoz5-Aug-02 21:19 
GeneralRe: CopyLocal Mystery in Man C++ Pin
Nish Nishant6-Aug-02 17:41
sitebuilderNish Nishant6-Aug-02 17:41 
GeneralRe: CopyLocal Mystery in Man C++ Pin
Nick Hodapp9-Aug-02 14:23
sitebuilderNick Hodapp9-Aug-02 14:23 
Generalbutton controls for forms Pin
smooth5-Aug-02 12:33
smooth5-Aug-02 12:33 
GeneralRe: button controls for forms Pin
James T. Johnson5-Aug-02 14:41
James T. Johnson5-Aug-02 14:41 
GeneralHWND in a Managed C++ Class Library Pin
gekoscan4-Aug-02 22:51
gekoscan4-Aug-02 22:51 
GeneralRe: HWND in a Managed C++ Class Library Pin
Nish Nishant4-Aug-02 23:52
sitebuilderNish Nishant4-Aug-02 23:52 
Generalhyperlink Pin
smooth4-Aug-02 18:26
smooth4-Aug-02 18:26 
GeneralRe: hyperlink Pin
Nish Nishant4-Aug-02 19:23
sitebuilderNish Nishant4-Aug-02 19:23 
Generalresource management Pin
RK_20004-Aug-02 11:59
RK_20004-Aug-02 11:59 
Generalunzip Pin
smooth3-Aug-02 15:41
smooth3-Aug-02 15:41 
GeneralRe: unzip Pin
James T. Johnson4-Aug-02 13:35
James T. Johnson4-Aug-02 13:35 
GeneralRe: unzip Pin
Shog98-Aug-02 18:25
sitebuilderShog98-Aug-02 18:25 
QuestionError code (0x80131019) ?? Pin
Firoz2-Aug-02 1:09
Firoz2-Aug-02 1:09 

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.