473,654 Members | 3,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

strings between C# and mc++

I am trying to return a string from a mc++ method back to an invoking C#
module.

In the invoking C# module I have the string defined as.... String
strString;.... in mc++ the method definition is like.... int function(String
*strString, String *strString1.... )....etc

I am unable to use the "ref" keyword in the C# module when invoking the mc++
method .... it will not compile.

How do I invoke the mc++ function such that a modified String will be
returned to the C# module ? I have multiple String(s) to be returned from
the mc++ method so having the String as the method return value is not an
option.

--
Philip
Nov 16 '05 #1
1 1633
int function(String ** strString, ...

Willy.

"Philip" <ph****@softwar eforever.com> wrote in message
news:17******** *************** ***********@mic rosoft.com...
I am trying to return a string from a mc++ method back to an invoking C#
module.

In the invoking C# module I have the string defined as.... String
strString;.... in mc++ the method definition is like.... int
function(String
*strString, String *strString1.... )....etc

I am unable to use the "ref" keyword in the C# module when invoking the
mc++
method .... it will not compile.

How do I invoke the mc++ function such that a modified String will be
returned to the C# module ? I have multiple String(s) to be returned from
the mc++ method so having the String as the method return value is not an
option.

--
Philip

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
410
by: Daniel Lidström | last post by:
Hi, I've been trying a long time now to generate some XML using MC++ and XmlSerializer. I have a piece of C# code that produces exactly what I want, but I simply can't get the MC++ code to write the same thing. Below I have included two minimal compilable samples that illustrate my problem. The C# code produces this XML: <?xml version="1.0" encoding="utf-8"?>
2
2510
by: Edward Diener | last post by:
In C++ an overridden virtual function in a derived class must have the exact same signature of the function which is overridden in the base class, except for the return type which may return a pointer or reference to a derived type of the base class's return type. In .NET the overridden virtual function is similar, but an actual parameter of the function can be a derived reference from the base class's reference also. This dichotomy...
4
1240
by: Reza A | last post by:
Can anyone explain why when Visual Studio creates code that has to use strings it puts a S before every string? Example System::Console::WriteLine(S"Hello World");
2
1906
by: Lev | last post by:
Hi, I have some code that does reflection on an assembly I load. When I try to get the attributes on one of the methods implemented in the assembly, the MC++ version does not return anything. See code below: Object __gc* memberAttributes = info->GetCustomAttributes(__typeof(EntryPointAttribute), false);
11
1532
by: John E Katich | last post by:
Being an old MFC guy, I'm having a heck of a time working with MC++. Can anybody tell me why the following code outputs 65 instead of an A. And yes I know 65 is the hex value for A, but why is it getting converted? And how to I get an A to be outputted? char c = 'A'; StringBuilder *s = new StringBuilder; s->Append(c); Console::WriteLine(s);
0
1605
by: Maxwell | last post by:
Hello, I recently completed a MC++ (VS2003) DLL that wraps a non MFC C++ DLL and need to use it in a MC++ Console Application (no forms/guis of any kind just output to console). Trouble is that when I ran it and looked at memory usage (in Windows task manager) it looked as if there was a very slow leak. To isolate the issue:
8
2197
by: WebSnozz | last post by:
I have an application written in C that does a lot of low level stuff. It does a lot of things like casting from void*'s. I want to create a new GUI for it in either C# or MC++, but reuse the existing code. The options I've considered so far: 1. Create a new MC++ GUI project and add the *.c files to them and mark them with pragma unamanged. However, the /clr option does not compile *.c files, so I rename them to *.cpp, and now they...
36
2264
by: MC felon | last post by:
how do we return strings or arrays from a function? i tried.. char some_func() //where i thought char would tell the compiler that the return is a string { char str; //something; return str; }
3
1081
by: MC | last post by:
Where (apart from making up a lot of examples and disassembling them myself) can I get authoritative information about how strings are handled in Microsoft C#? That is, when they are interned and when they're not, what they look like in memory, how related types such as StringBuilder are implemented, and so forth.
0
8379
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8294
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8494
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8596
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7309
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2719
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1597
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.