Help: Pass string from MFC(c++) to c#

Help inpassing string from MFC(c++) to c#

Page 1 of 1

6 Replies - 2113 Views - Last Post: 01 July 2010 - 06:56 PM Rate Topic: -----

#1 Guest_White*


Reputation:

Help: Pass string from MFC(c++) to c#

Posted 29 June 2010 - 07:17 PM

Does anyone knows how to pass a string from MFC file (written in c++) to c# file? My c# program is supposed to call the MFC file and get a string from it when it runs. Help is deeply appreciated!
Is This A Good Question/Topic? 0

Replies To: Help: Pass string from MFC(c++) to c#

#2 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: Help: Pass string from MFC(c++) to c#

Posted 29 June 2010 - 08:19 PM

google got me this
Was This Post Helpful? 0
  • +
  • -

#3 Guest_white*


Reputation:

Re: Help: Pass string from MFC(c++) to c#

Posted 30 June 2010 - 07:36 PM

View PostNickDMax, on 29 June 2010 - 07:19 PM, said:



Sorry to inform u this now but i am doing it for windows CE so win32 stuff i cant use.
Was This Post Helpful? 0

#4 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1639
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Help: Pass string from MFC(c++) to c#

Posted 30 June 2010 - 07:44 PM

Well the maybe you should have specified that when asking your initial question. That way people did not waste their time trying to find a solution that isn't going to work from jump street.
Was This Post Helpful? 1
  • +
  • -

#5 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: Help: Pass string from MFC(c++) to c#

Posted 01 July 2010 - 07:39 AM

Though the process is still the same. You need to put your C++ code into a dll and then call the function using dllimport -- the OS version is irrelevant here so long as your C++ code works on Windows CE. The process is exactly the same.
Was This Post Helpful? 0
  • +
  • -

#6 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: Help: Pass string from MFC(c++) to c#

Posted 01 July 2010 - 07:47 AM

Relevant (same user)
Was This Post Helpful? 0
  • +
  • -

#7 Guest_White*


Reputation:

Re: Help: Pass string from MFC(c++) to c#

Posted 01 July 2010 - 06:56 PM

View PostPsychoCoder, on 30 June 2010 - 06:44 PM, said:

Well the maybe you should have specified that when asking your initial question. That way people did not waste their time trying to find a solution that isn't going to work from jump street.



Sorry if i make you unhappy, i was in a hurry typing this i didn't really consider much.

Btw, the dll i have now is created in c but i don't get the part about linking "core.dll" coz i'm not using it.
Was This Post Helpful? 0

Page 1 of 1