c++-cli

How to Compile a c++ program using .NET Framework libraries

Hi i want comile a my c++ program using .NETFRAMEWORK libraries only at command prompt.how can i do this ?? Plz help mee.. ...

Defining a matrix as an array of arrays and computation its inverse matrix in C++

Hello, Unfortunately I haven't much experience in C++ and I'm trying to progress myself in C++. Firstly,I defined array of arrays so that I formed an 3x3 matrix: array< array< double >^ >^ input = gcnew array< array< double >^ >(3); for (j=0;j<input->Length;j++){ input[j]=gcnew array<double>(3); Then I assigned matrix elements to...

Need help with connecting c++ and c# code with a c++/cli bridge

I have a client application in native c++ code which is using native c++ dlls. I am investigating the possibility of connecting this code with c# dlls as they would be much easier to write. I decided to write a c++/cli bridge dll which can be loaded with LoadLibrary and which would pass the calls to c# dll. The communication between the...

D8045: cannot compile C file 'serialcommands.c' with the /clr option

I am getting compiler error D8045. cannot compile C file 'serialcommands.c' with the /clr option. This file is a C library that has been written to talk over a serial port to a TI processor. The task that I need to do is wrap this library with a CLR wrapper (there will be additional questions posted to stackoverflow concerning marshall...

C1083: Cannot open include file 'serialheader.h': No such file or directory

I am writing a wrapper for a library written in C. The header file for this library is located in C:\Projects\SerialLibrary The wrapper is located in C:\Projects\SerialLibrary\Client\ClrSerialLibrary no matter what I do, VS2008, cannot seem to find #include "serialheader.h" I always am getting the no such file or directory erro...

Implementing an interface declared in C# from C++/CLI

Say I have a C# interface called IMyInterface defined as follows: // C# code public interface IMyInterface { void Foo(string value); string MyProperty { get; } } Assume I also have a C++/CLI class, MyConcreteClass, that implements this interface and whose header is declared as follows: // C++/CLI header file ref class MyConcreteC...

How to use com components.

Hi i hav created a COM component using vs2005 . Now let me know can i use the dll which i have create on vs2005(which uses f/w 2.0) in vs2003(which uses f/w 1.1)?? ...

what is difference b/w managed /unmanaged and native code??

Hi is unmanaged code is native code?what is differnece any boduy help me. Duplicate: http://stackoverflow.com/questions/855756/difference-between-native-and-managed-code ...

How to consume com libraries for SQLSERVERSMO ?

Hi I hav created a com library by which i can discover the SQLVolumes using SMo namespace in VS2005. Now i want to use this com library in VS2003 to discover the same sqlvolumes in another machine where vs2003 installed. Can i use like this. I hav created a COM using version VS2005 and now i want to consume it in VS2003 is it possible?...

How do I convert a System::String to a unsigned char * ?

I saw another post that suggested the following: String^ clistr = gcnew String("sample"); IntPtr p = Marshal::StringToHGlobalAnsi(clistr); char *pNewCharStr = static_cast<char*>(p.ToPointer()); Marshal::FreeHGlobal(p); I just wanted to check and see if there is any other, preferred way, or if anything was wrong with the above? ...

Difference between association, aggregation and composition

What is the difference between association, aggregation and composition? Please explain in terms of implementation. ...

Parenting a .NET form to an HWND.

I'm developing a plugin (C++/CLI DLL) that runs inside of an certain applications, about which I only know the HWND. My plugin shows various .NET forms that I'd like to behave as children of the main application (e.g. centered to the main window, etc). Here's what I've tried: // MyDialog.h public ref class MyDialog : public System::Wi...

Declare native types inside a cli class?

I have a public ref class Test inside this class, I have: int frameWidth; int frameHeight; int frameStride; When I try to compile this, I get the error: error C2664: 'GetImageSize' : cannot convert parameter 1 from 'cli::interior_ptr<Type>' to 'int *' GetImageSize is a native function and it works only if I move the declaration...

Use a .net assembly from a totally unmanaged C++ application?

Is there any way I can reference and use classes and methods from a managed .net assembly from within a totally unmanaged C++ application? (no /clr) ...

How to display List items in vc++???

How to populate List (string) items on console window in c++cli. Thanks in Advance ...

can we access the managed code with out pointer object??

Hi i have created some application in managed c++.when i try to instantiates it shows error as cannot convert from obj to *obj. when i instantiates as pointer obj it shows no error. so. is there any way to access such class without creating pointer object ...

Return a multidimensional array from pointer function in Visual C++

Hello, I wrote following code to return multidimensional array from pointer function.Input parameter of this function is one dimensional array, output is pointer that point multidimensional array. double **function( array< double>^ data,int width,int height ) {int i; //define returning variable that point multidimensional arr...

How do I center a rotated image using GDI+?

I'm trying to center a rotated image into a destination buffer using GDI+. The source buffer and the destination buffer are different sizes. The source buffer is the size of the image data: (width, height). The destination buffer is the size of the rectangle required to fit the entire rotated image: (rotatedWidth, rotatedHeight). This ...

Threads shutdown during mixed managed/unmanaged c++/CLI process shutdown

I'm working on a mixed managed/native application using c++/CLI. I know that the CLR will suspend all managed threads on (a clean) shutdown, but what about the unmanaged ones? Is it possible for the unmanaged threads to still be running, while the CLR runtime is shutting down/freeing memory/running finalizers? ...

Some questions about special operators i've never seen in C++ code.

I have downloaded the Phoenix SDK June 2008 (Tools for compilers) and when I'm reading the code of the Hello sample, I really feel lost. public ref class Hello { //-------------------------------------------------------------------------- // // Description: // // Class Variables. // // Remarks: // // A normal compiler would have m...