|
Hi,
The company I work for has desided for new version of Visual Studio and recompile all source code in C++/CLI . But a lot of thinks are difference . Don't you know if Microsoft has shipped some convertion tool ? Or anything but not like Ctrl+H ?
Wizard_01
-- modified at 13:29 Thursday 26th January, 2006
|
|
|
|
|
They have announced one, but so far nothing has been released, AFAIK.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
Do you have some links or names?
Wizard_01
|
|
|
|
|
Stan Lippman mentioned this tool in one of his C++/CLI articles, but again it has not been released as of now. See his article on the subject.[^]: " In addition, a source to source translation tool (mscfront) is under development and may be provided with the release of the C++/CLI language for those who wish for help in automating the migration of their V1 code to the new language design."
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
Hi,
I need to serialize and deserialize an unmanaged class in VC .Net. please guide how can I do this. This class contains int, bool, double and vector types of data.
Ahmad
|
|
|
|
|
|
Thnax for ur kind help. The stuff looks nice and would solve my problem.
|
|
|
|
|
Hi, Guys,
In the project property page, there is an option Use of MFC. The three options are quite confusing for me, someone please explain the differences.
Thanks!!!
|
|
|
|
|
Hi,
I am little bit in confusion that what is diff between managed C++ code
and other code which is not managed,Pl'z Resolve this.
<b>Good is not good when better is excepted</b>
Yuwraj
|
|
|
|
|
This is a.k.a. "Managed Extensions of C++", as Microsoft used to call it. Now It is "Managed C++". In .NET Framework terminology, Any code that is complied by .NET Framework is "Managed" otherwise is not.
wikipedia. has an article on this, though not full-fledged explanation.
|
|
|
|
|
The CLR takes care of the removing the unrefernced objects in the case of managed code
While in the case of unmanaged code u should make sure u dispose them
sathy
|
|
|
|
|
i'm not a MC++ expert, but here are the facts.
every program compiled to run on the .NET framework is not compiled in native language (directly for the microprocessor) but into an intermediate language called MSIL (Microsoft Intermediate Language). Then, at the first execution of the program, its final compilation into native is executed BY the framework, so that the same program can be run either on whatever plateform that have the .NET framework running...
it is exactly the same as java does with its Byte-Code intermediate language and its JVM/JRE (java virtual machine/Java runtime environment).
there are several languages purely oriented .NET such as C# or VB.NET, and C++ has been implemented too (with several differences in the syntax also) within the new Managed C++ language, also refered to as C++/CLI...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
Some applications, during run-time, require dynamic memory allocations to do the required data processing. If these allocations of memory are not returned to the operating system before the application terminates, no other application can reallocate this memory (this is known as a "memory leak"). With unmanaged code, it is the responsibility of the developer to deallocate memory before application expected or unexpected termination. With managed code, memory deallocation is taken care of by a process called Garbage Collection (GC). The GC process reduces the developer's burden of managing memory.
|
|
|
|
|
hi:
hey guys, how do you load the resource.resx to get the string in managed C++?
thanks
|
|
|
|
|
I'm just off the wikipedia site, reading on the concept of CLI, bytecode, JIT, Managed C++, etc. It jdawns on me that Microsoft's .NET Framework( still a key part of VS 2005)makes C++ no longer a precompiled Lan tool anymore! The C++ code is precompiled by .NET engine to bytecode, which is transmitted to the user, then translated into machine code by .NET virtual machine on the users's computer, just before runtime. (Just In Time-- JIT)
This is exactly like what Java does. So .NET Framework makes C++ like Java?
Here is my question, if .NET Framework makes C++ portable now, why bother with C#? to create web, ADO.NET, and ASP.NET applycations?
Can I stay with C++ to creat a powerful ASP.Net apps? Do you have weblinks talking about this subject?
Thanks
|
|
|
|
|
read this[^] first.
larryfran wrote: if .NET Framework makes C++ portable now, why bother with C#? to create web, ADO.NET, and ASP.NET applycations?
C++ is .NET independant. only C++/CLI compiles for .NET framework.
C# only makes .NET applications, so that you cannnot make native builds with it (when C++ can still do them if not in managed mode).
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
Microsoft does not make it easy to create web applications in Managed C++ or C++/CLI. I don't advise using Managed C++ to create web applications or supporting assemblies using Microsoft .NET framework 1.0 or 1.1 due to the problems associated with Loader Lock. Nevertheless, writing C++/CLI assemblies for C#/VB web applications is a legit option.
|
|
|
|
|
A file is selected in explorer. I am able to get the selected file info using listview class "SysListview23". Now i want to get the selected file full path. SHGetPathFromIDList is not returning the full path. It is returning the path respective of desktop folder. How to get the full path of the selcted file/folder?
Please help me
Thanks,
Arumugarani Sundaram
|
|
|
|
|
Hello,
I was able to call native overridden virtual function (with no parameters) using polymorphism between Managed and Native C++ via a native DLL (compiled by VC6 compiler). I tried to extend this sample by adding one managed parameter of type structure to the native virtual function. VC6 compiler compiled the sources and generated lib/dll for the new changes successfully.
class ADPCBIJW_API AdpCBBase
{
public:
AdpCBBase(){}
//virtual void notify(gcroot<startsqnotiinfo *=""> apInfo)=0;
virtual void notify(StartSQNotiInfo * apInfo)=0;
virtual void notify()=0;
};
However, I noticed below compilation error while trying to compile MC++ client using the native header with the above declaration:
error C3383: 'AdpCBBase::notify' : in an unmanaged class, a virtual member function cannot have a managed type in the signature
I read the explanation for this in MSDN. And found some articles on google stating this feature is prohibited due to performance overheads with the involved transistions from managed-native-managed. But do you know any alternative to get around this problem?
One alternative may be by using gcroot template around the managed type in the native function. This might work with VC7 compiler to generate lib/dll when compiled with CLR option. But how can this work with VC6 compiler for it unaware of gcroot, vcclr.h, mscorlib.dll and /clr option?
How to make this work between VC6 compiler and MC++ compiler?
ps:- Another question, Does gcroot support pointer to a managed structure also?
Thank you & Best Regards,
-- modified at 13:27 Tuesday 24th January, 2006
|
|
|
|
|
Hello ! I am bit confused of allocation of __gc struct arrays, so
I have the following declaration and allocation:
__gc struct MethodTableEntry {<br />
<br />
String* MethodName;<br />
String* ParamName;<br />
};<br />
<br />
<br />
MethodTableEntry *MethodTable[]=__gc new MethodTableEntry*[MethodNumber];
Now I want that ParamName should be an array of 7 strings.
Ex. i want to use the following
MethodTable[1].ParamName[2]=S"This is the 2nd Param of Method No1";
So how can I allocate these string arrays ? I tried a lot, but now I am tired of hunting the proper syntax.
Thanx
|
|
|
|
|
I understand that the equivalent for __gc in VC++ 2005 is ref keyword. Similarly can anyone update me on the equivalent for __gc* in VC++ 2005.
Thanks in advance
Thanks and Regards
Madhu
|
|
|
|
|
madhusri wrote: I understand that the equivalent for __gc in VC++ 2005 is ref keyword. Similarly can anyone update me on the equivalent for __gc* in VC++ 2005.
Thanks in advance
I answered this in the MS forum too. But since you've posted here, and since others may have the same question in future, here's the answer once again :-
A^ a = gcnew A();
The A^ is a handle to the managed object A (similar to __gc* in MC++)
Regards,
Nish
|
|
|
|
|
Sivakumar,
Thanks for your response. I had actually tried with this option earlier. But then i did not get the problem solved. May be i'll try explaning you what i actually need with this code segment so that you can help me out.
The objective is i have to access a dll through C# code. The dll is created from VC++ code. In the C# code i need to pass the address as the function argument. In VS 2003 i could achieve it through the following C++ code segment:
public:void GetIntReturn(int __gc* ivalue)
{
*ivalue=10;
}
Here's the C# code segment calling the corresponding function.
public int GetValueFromC++()
{
int i =0;
GetIntReturn(ref i)
return i;
}
This work fine and this is what i want.
But now i got to do the same using VS2005. As you said earlier i tried replacing __gc* with ^. But when invoking this function in C# it asks me for value type and not reference type. Can you help me out with this please.
Thanks and Regards
Madhu
|
|
|
|
|
Ah ok, the C++/CLI equivalent for that is
void GetIntReturn(int% ivalue)
{
ivalue = 10;
}
Regards,
Nish
|
|
|
|
|
Sivakumar,
Thanks for your response. This worked out well for me.
Thanks and Regards
Madhu
|
|
|
|