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

Managed C++/CLI

 
GeneralRe: How can I Export DllUnregisterServer in VC++? Pin
Orchid8510-May-06 0:10
Orchid8510-May-06 0:10 
GeneralRe: How can I Export DllUnregisterServer in VC++? Pin
georgeraafat10-May-06 7:36
georgeraafat10-May-06 7:36 
GeneralRe: How can I Export DllUnregisterServer in VC++? Pin
georgeraafat10-May-06 7:39
georgeraafat10-May-06 7:39 
QuestionRead & Write with one I/O on Windows Serial Device Pin
Bill Sabatine7-May-06 17:11
Bill Sabatine7-May-06 17:11 
AnswerRe: Read & Write with one I/O on Windows Serial Device Pin
Milton Karimbekallil8-May-06 1:48
Milton Karimbekallil8-May-06 1:48 
QuestionNewbie: About passing parameter into a form Pin
kkyeung7-May-06 7:57
kkyeung7-May-06 7:57 
AnswerRe: Newbie: About passing parameter into a form Pin
georgeraafat7-May-06 22:51
georgeraafat7-May-06 22:51 
QuestionError with compiling code.. Pin
ALQallaf6-May-06 13:30
ALQallaf6-May-06 13:30 
hello
everythings gos good with the code Below, but when i try to make object (MessageQueue TheQueue = new MessageQueue;), it give me an errors says :

Error 1 error C3821: 'System::Messaging::MessageQueue': managed type or function cannot be used in an unmanaged function c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\dll_from2005\MessageQueue\MessageQueue\MessageQueue.cpp 26
Error 2 error C3624: 'System::ComponentModel::Component': use of this type requires a reference to assembly 'System' c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\dll_from2005\MessageQueue\MessageQueue\MessageQueue.cpp 26
Error 3 error C3821: 'System::Messaging::MessageQueue': managed type or function cannot be used in an unmanaged function c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\dll_from2005\MessageQueue\MessageQueue\MessageQueue.cpp 26
Error 4 error C2750: 'System::Messaging::MessageQueue' : cannot use 'new' on the reference type; use 'gcnew' instead c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\dll_from2005\MessageQueue\MessageQueue\MessageQueue.cpp 26
Error 5 error C3642: 'System::Messaging::MessageQueue::MessageQueue(void)' : cannot call a function with __clrcall calling convention from native code c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\dll_from2005\MessageQueue\MessageQueue\MessageQueue.cpp 26
Error 6 error C3175: 'System::Messaging::MessageQueue::MessageQueue' : cannot call a method of a managed type from unmanaged function 'SendToQueue' c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\dll_from2005\MessageQueue\MessageQueue\MessageQueue.cpp 26
Error 7 error C2664: 'System::Messaging::MessageQueue::MessageQueue(System::String ^)' : cannot convert parameter 1 from 'System::Messaging::MessageQueue *' to 'System::String ^' c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\dll_from2005\MessageQueue\MessageQueue\MessageQueue.cpp 26

------------------------------------------------------
------------------------------------------------------
<br />
#include "stdafx.h"<br />
#using <system.messaging.dll><br />
using namespace System::Messaging;<br />
<br />
#ifdef _MANAGED<br />
#pragma managed(push, off)<br />
#endif<br />
<br />
BOOL APIENTRY DllMain( HMODULE hModule,<br />
                       DWORD  ul_reason_for_call,<br />
                       LPVOID lpReserved<br />
					 )<br />
{<br />
    return TRUE;<br />
}<br />
<br />
int _stdcall Sum(int inA, int inB) {<br />
    return (inA + inB);<br />
}<br />
<br />
int _stdcall SendToQueue(char * SBody,char * SLabel)<br />
{<br />
	MessageQueue TheQueue = new MessageQueue;<br />
	return 0;<br />
}<br />
<br />
#ifdef _MANAGED<br />
#pragma managed(pop)<br />
#endif<br />

AnswerRe: Error with compiling code.. Pin
Milton Karimbekallil7-May-06 2:38
Milton Karimbekallil7-May-06 2:38 
AnswerRe: Error with compiling code.. Pin
Michael Dunn7-May-06 8:48
sitebuilderMichael Dunn7-May-06 8:48 
GeneralRe: Error with compiling code.. Pin
ALQallaf7-May-06 10:17
ALQallaf7-May-06 10:17 
GeneralRe: Error with compiling code.. Pin
Michael Dunn7-May-06 13:03
sitebuilderMichael Dunn7-May-06 13:03 
GeneralRe: Error with compiling code.. Pin
Milton Karimbekallil7-May-06 13:15
Milton Karimbekallil7-May-06 13:15 
AnswerRe: Error with compiling code.. Pin
Nish Nishant7-May-06 9:40
sitebuilderNish Nishant7-May-06 9:40 
GeneralRe: Error with compiling code.. Pin
ALQallaf7-May-06 10:19
ALQallaf7-May-06 10:19 
GeneralRe: Error with compiling code.. Pin
Nish Nishant7-May-06 10:43
sitebuilderNish Nishant7-May-06 10:43 
AnswerRe: Error with compiling code.. Pin
ALQallaf7-May-06 13:15
ALQallaf7-May-06 13:15 
GeneralRe: Error with compiling code.. Pin
Milton Karimbekallil7-May-06 13:17
Milton Karimbekallil7-May-06 13:17 
QuestionHow to include or Add Referance with VC++ 2005? Pin
ALQallaf6-May-06 9:11
ALQallaf6-May-06 9:11 
AnswerRe: How to include or Add Referance with VC++ 2005? Pin
Milton Karimbekallil6-May-06 9:28
Milton Karimbekallil6-May-06 9:28 
GeneralRe: How to include or Add Referance with VC++ 2005? Pin
ALQallaf6-May-06 9:59
ALQallaf6-May-06 9:59 
GeneralRe: How to include or Add Referance with VC++ 2005? Pin
ALQallaf6-May-06 10:23
ALQallaf6-May-06 10:23 
GeneralRe: How to include or Add Referance with VC++ 2005? Pin
Milton Karimbekallil6-May-06 10:39
Milton Karimbekallil6-May-06 10:39 
GeneralRe: How to include or Add Referance with VC++ 2005? Pin
ALQallaf6-May-06 11:40
ALQallaf6-May-06 11:40 
GeneralRe: How to include or Add Referance with VC++ 2005? Pin
ALQallaf6-May-06 11:54
ALQallaf6-May-06 11:54 

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.