Click here to Skip to main content
15,917,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Class Bascis Question... Pin
Axter7-May-06 1:20
professionalAxter7-May-06 1:20 
QuestionRe: Class Bascis Question... Pin
Maxwell Chen7-May-06 2:08
Maxwell Chen7-May-06 2:08 
AnswerRe: Class Bascis Question... Pin
Axter7-May-06 5:57
professionalAxter7-May-06 5:57 
GeneralRe: Class Bascis Question... Pin
Maxwell Chen7-May-06 6:08
Maxwell Chen7-May-06 6:08 
Questionhow to get ip address of my own system Pin
noumanzaidi6-May-06 1:39
noumanzaidi6-May-06 1:39 
AnswerRe: how to get ip address of my own system Pin
Hamid_RT6-May-06 1:48
Hamid_RT6-May-06 1:48 
AnswerRe: how to get ip address of my own system Pin
Mila0257-May-06 21:19
Mila0257-May-06 21:19 
Questionerror(plz give the solution for this) Pin
Reddyb6-May-06 1:26
Reddyb6-May-06 1:26 
AnswerRe: error(plz give the solution for this) Pin
Hamid_RT6-May-06 1:57
Hamid_RT6-May-06 1:57 
AnswerRe: error(plz give the solution for this) Pin
Cedric Moonen6-May-06 1:58
Cedric Moonen6-May-06 1:58 
AnswerRe: error(plz give the solution for this) Pin
guestcat6-May-06 2:17
guestcat6-May-06 2:17 
AnswerRe: error(plz give the solution for this) Pin
Hamid_RT6-May-06 4:50
Hamid_RT6-May-06 4:50 
Questiondll to source Pin
Try6-May-06 1:20
Try6-May-06 1:20 
AnswerRe: dll to source Pin
Milton Karimbekallil6-May-06 1:42
Milton Karimbekallil6-May-06 1:42 
AnswerRe: dll to source Pin
Chris Losinger6-May-06 16:12
professionalChris Losinger6-May-06 16:12 
QuestionRe: dll to source code Pin
Try8-May-06 19:20
Try8-May-06 19:20 
AnswerRe: Problem in print Pin
tbrake6-May-06 9:51
tbrake6-May-06 9:51 
QuestionIntegrating c# code in vc++.net Pin
Ashraj19826-May-06 0:51
Ashraj19826-May-06 0:51 
AnswerRe: Integrating c# code in vc++.net Pin
Milton Karimbekallil6-May-06 1:29
Milton Karimbekallil6-May-06 1:29 
GeneralRe: Integrating c# code in vc++.net Pin
Ashraj19827-May-06 18:33
Ashraj19827-May-06 18:33 
QuestionCasting a pointer to an unmanaged const void* Pin
Ilkka Pitkänen6-May-06 0:48
Ilkka Pitkänen6-May-06 0:48 
AnswerRe: Casting a pointer to an unmanaged const void* Pin
Milton Karimbekallil6-May-06 2:10
Milton Karimbekallil6-May-06 2:10 
GeneralRe: Casting a pointer to an unmanaged const void* Pin
Ilkka Pitkänen6-May-06 6:38
Ilkka Pitkänen6-May-06 6:38 
GeneralRe: Casting a pointer to an unmanaged const void* Pin
Ilkka Pitkänen6-May-06 21:43
Ilkka Pitkänen6-May-06 21:43 
Hi!
Have done some testing now which takes me to new, maybe trivial, situation. I have two questions:

1) As I amworking with CLI managed code, compiling the definition __nogc needs the /clr::oldsyntax switch for compiling. Maybe this could be given on the command line but as I am in the beginning of programming this application I wouldn't like to do that all the time when I make small changes to the code but instead would like to use build or F7 available in the main window of VS. Now I tried to change the project properties with ' project->properties->Configuration properties->General->Common Language Runtime support ' and changing the switch to "Common Language Runtime Support, Old Syntax (/clr:oldSyntax)". Having done this and back in building the code, I receive a lot of errors like with the first managed code class definition:

: error C2470: 'ref' : looks like a function definition, but there is no parameter list; skipping apparent body

Is there not a way to accept both /clr and /clr::oldsyntax together or do I need to compile the code separately which of course would be sad for the future development of the application.

2) This brings me to the apparent next question. You used static_cast for converting the pointer to a base class to a pointer of a derived class, if I get it right. As this type of conversion is quite new for me, I wonder could there be a possibility of using dynamic_cast, which (I think) would at the same time eliminate the need for clr::oldsyntax. Is there a way of using MarshalAsAttribute leading to AnsiBStr, I tried something but with no luck.

Thankful for any answer!






Questiona question regarding CString Pin
namaskaaram6-May-06 0:22
namaskaaram6-May-06 0:22 

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.