Click here to Skip to main content
16,007,760 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionWhat do i use to make a DOS app Pin
Anthony Mushrow13-May-05 7:24
professionalAnthony Mushrow13-May-05 7:24 
AnswerRe: What do i use to make a DOS app Pin
Saksida Bojan16-May-05 22:29
Saksida Bojan16-May-05 22:29 
Generalstring formatting to show hex values Pin
richiemac13-May-05 4:20
richiemac13-May-05 4:20 
GeneralRe: string formatting to show hex values Pin
Saksida Bojan17-May-05 3:26
Saksida Bojan17-May-05 3:26 
GeneralRe: string formatting to show hex values Pin
richiemac17-May-05 4:09
richiemac17-May-05 4:09 
GeneralRe: string formatting to show hex values Pin
Saksida Bojan17-May-05 5:01
Saksida Bojan17-May-05 5:01 
GeneralRe: string formatting to show hex values Pin
richiemac18-May-05 0:04
richiemac18-May-05 0:04 
QuestionHow to use unmanaged char arrays as class member? Pin
Thomas Freudenberg12-May-05 3:59
Thomas Freudenberg12-May-05 3:59 
Hi,

I have a problem when I add an unmanaged character array as an member to a managed class. Here's a simple example:
__nogc class Foo
{
public:
    static void Test(char* sz)
    {}
};
 
__gc public class Bar
{
public:
    void TestFunc1()
    {
        char buffer[100];
        Foo::Test(buffer);
    }
 
    char anotherBuffer __nogc[100];
 
    void TestFunc2()
    {
        Foo::Test(anotherBuffer);
    }
};
While there's no problem with Bar::TestFunc1, Bar::TestFunc2 won't compile. The error message is error C2664: cannot convert parameter 1 from 'char [100]' to 'char *'. The only difference is that in the first case the char array is allocated on the stack, while in the latter it's a member of the class.. However, if I change the call to
void TestFunc2()
{
    Foo::Test(&anotherBuffer[0]);
}
, I get the message error C2664: cannot convert parameter 1 from 'char __gc *' to 'char *'.

Any help is appreciated.

Regards
Thomas


Disclaimer:
Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you.

GeneralManaged wrapper and inheritance Pin
Johan de Koning12-May-05 0:00
Johan de Koning12-May-05 0:00 
GeneralNullReferenceException in MC++ Pin
Member 19685839-May-05 11:52
Member 19685839-May-05 11:52 
GeneralRe: NullReferenceException in MC++ Pin
Anonymous10-May-05 10:05
Anonymous10-May-05 10:05 
GeneralExcellent Question Pin
ursus zeta10-May-05 10:33
ursus zeta10-May-05 10:33 
GeneralRe: Excellent Question Pin
Gurminder_G10-May-05 11:14
sussGurminder_G10-May-05 11:14 
GeneralRe: Excellent Question Pin
ursus zeta12-May-05 9:30
ursus zeta12-May-05 9:30 
GeneralToolboxItem attribute problem Pin
tomand9-May-05 0:17
tomand9-May-05 0:17 
Generalmanaged c++ Pin
_tasleem8-May-05 9:47
_tasleem8-May-05 9:47 
GeneralRe: managed c++ Pin
Christian Graus8-May-05 14:11
protectorChristian Graus8-May-05 14:11 
Generalmystring object help Pin
user3166-May-05 19:24
user3166-May-05 19:24 
GeneralRe: mystring object help Pin
user3166-May-05 19:36
user3166-May-05 19:36 
GeneralPassword Code Pin
Derdog1016-May-05 16:37
Derdog1016-May-05 16:37 
GeneralRe: Password Code Pin
Christian Graus8-May-05 14:13
protectorChristian Graus8-May-05 14:13 
GeneralProtect a file by group Pin
sloaken6-May-05 15:37
sloaken6-May-05 15:37 
GeneralIs there a way to print a String using mc++ Pin
Lagwagon565-May-05 7:25
Lagwagon565-May-05 7:25 
GeneralRe: Is there a way to print a String using mc++ Pin
Christian Graus8-May-05 14:14
protectorChristian Graus8-May-05 14:14 
GeneralC++ Problem Pin
Dohan CRPathirana4-May-05 21:38
sussDohan CRPathirana4-May-05 21:38 

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.