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

Managed C++/CLI

 
Question"Failed to load toolbox item..." [modified] Pin
Xpnctoc9-Jan-07 17:03
Xpnctoc9-Jan-07 17:03 
AnswerRe: "Failed to load toolbox item..." Pin
bsaksida10-Jan-07 9:58
bsaksida10-Jan-07 9:58 
GeneralRe: "Failed to load toolbox item..." Pin
Xpnctoc11-Jan-07 5:28
Xpnctoc11-Jan-07 5:28 
GeneralRe: "Failed to load toolbox item..." Pin
Xpnctoc11-Jan-07 15:48
Xpnctoc11-Jan-07 15:48 
GeneralRe: "Failed to load toolbox item..." Pin
bsaksida11-Jan-07 21:06
bsaksida11-Jan-07 21:06 
Questionstatic const from MC++ to C# via DLL [modified] Pin
ShermansLagoon7-Jan-07 23:03
ShermansLagoon7-Jan-07 23:03 
AnswerRe: static const from MC++ to C# via DLL Pin
User 5838528-Jan-07 12:17
User 5838528-Jan-07 12:17 
GeneralRe: static const from MC++ to C# via DLL Pin
ShermansLagoon8-Jan-07 20:53
ShermansLagoon8-Jan-07 20:53 
Seems like I did not explain my problem good enough;

What I need is some way of having a constant value in MC++ as an integer of any size (have several of them, some 16-bit, some 32-bit and some 64-bit), and I need the value to be viewed from C# as constant.

When trying it as a "static const" value, as seen in my question, the compiler does not regard this as a constant value. When searching forums I found out that this is what the compiler should do, becase "static const is not const" or similar quote, and I found the suggestion of having it as a typed enumeration (i.e. public enum class NAME : TYPE), just as seen in my question.

The downside on doing this is that an enum is not implicitly casted to an integer, and then I have to write:
int i = (int) myEnum.value;
with the explicit type cast each time. This is the same both with and without the enum being derived from an integer, I have tried both.

What I am hoping is that I am not the only one who have tried this, and that someone out there has found a way of doing this, but since I have googled this it does not seem like this, so that is why I asked here.

Internet - the worlds biggest dictionary

AnswerRe: static const from MC++ to C# via DLL Pin
led mike9-Jan-07 5:39
led mike9-Jan-07 5:39 
GeneralRe: static const from MC++ to C# via DLL Pin
ShermansLagoon11-Jan-07 21:58
ShermansLagoon11-Jan-07 21:58 
GeneralRe: static const from MC++ to C# via DLL Pin
led mike12-Jan-07 4:57
led mike12-Jan-07 4:57 
GeneralRe: static const from MC++ to C# via DLL Pin
ShermansLagoon12-Jan-07 5:55
ShermansLagoon12-Jan-07 5:55 
GeneralRe: static const from MC++ to C# via DLL Pin
led mike12-Jan-07 7:12
led mike12-Jan-07 7:12 
GeneralRe: static const from MC++ to C# via DLL Pin
ShermansLagoon12-Jan-07 20:44
ShermansLagoon12-Jan-07 20:44 
AnswerRe: static const from MC++ to C# via DLL Pin
ShermansLagoon26-Mar-07 0:47
ShermansLagoon26-Mar-07 0:47 
QuestionHow can i use time ? Pin
Banks K7-Jan-07 23:02
Banks K7-Jan-07 23:02 
GeneralRe: How can i use time ? Pin
ShermansLagoon7-Jan-07 23:05
ShermansLagoon7-Jan-07 23:05 
AnswerRe: How can i use time ? Pin
Christian Graus8-Jan-07 9:39
protectorChristian Graus8-Jan-07 9:39 
QuestionHow to execute a function at schedule time? Pin
Banks K7-Jan-07 21:46
Banks K7-Jan-07 21:46 
AnswerRe: How to execute a function at schedule time? Pin
Christian Graus8-Jan-07 9:40
protectorChristian Graus8-Jan-07 9:40 
QuestionHelp with C++ Pin
Member 36662707-Jan-07 11:03
Member 36662707-Jan-07 11:03 
AnswerRe: Help with C++ Pin
Christian Graus7-Jan-07 15:21
protectorChristian Graus7-Jan-07 15:21 
GeneralRe: Help with C++ Pin
Jun Du8-Jan-07 14:03
Jun Du8-Jan-07 14:03 
QuestionMS VC ++ Dot NET 2003: PtrToStringChars Error. Pin
Madhu_TN7-Jan-07 6:31
Madhu_TN7-Jan-07 6:31 
AnswerRe: MS VC ++ Dot NET 2003: PtrToStringChars Error. Pin
Mark Salsbery10-Jan-07 13:46
Mark Salsbery10-Jan-07 13:46 

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.