I have a C++/CLI metadata editor application which edits the exif data like GPS, Datatime etc. The problem is that when I try to delete any one detail the whole metadata is lost the code which I am using for metadata editor is appended below in the code snippet. I have checked the code but was not able to find out the error can some one ...
I'm trying to use the following code to convert a native string to a managed string in C++\CLI:
System::String^ NativeToDotNet( const std::string& input )
{
return System::Runtime::InteropServices::Marshal::PtrToStringAnsi( (static_cast<LPVOID>)( input.c_str() ) );
}
I originally found the code here:
But when I try to build it th...
Has anyone tried coding in managed C++? I have a few questions :
How productive is the language compared to C#?
Is there any restriction on type of projects that can be written? Can we write a web application in managed C++?
Is it possible to mix managed and unmanaged C++ code in one application?
Is MFC still valid in managed C++? Wil...
I ran into a rather odd behavior that I don't even know how to start describing.
I wrote a piece of managed C++ code that makes calls to native methods.
A (very) simplified version of the code would look like this (I know it looks like a full native function, just assume there is managed stuff being done all over the place):
int somefu...
Would it be possible to create a handle ( or a tracking handle ) to a class' property ? For instance,
System::Windows::Forms::CheckBox^ Box = gcnew System::Windows::Forms::CheckBox()
I'd like to create a handle to Box's Checked property and use it to access and modify the same.
...
Hi,
I'm trying to convert a FreeType2 bitmap to a System::Drawing::Bitmap in C++/CLI.
FT_Bitmap has a unsigned char* buffer that contains the data to write.
I believe that the size of byte[] is incorrect and that my data is truncated.
Any hints/tips/ideas on what is going on here would be greatly appreciated. Links to articles ex...
Using VS2008 Managed C++ to wrap a dll. The native method takes a series of single const char* values and a collection of char* values. Going to make an example function:
Function1(char * value1, TF_StringList& catList);
TF_StringList is a dll class with 3 insert methods, the one I want to use is:
TF_StringList::insert(const char...
I was wondering - how much limitation is there to C++/CLI compared to classic C++ (chuckle) - I was wanting to write an application that I cannot do with c# -- I was wanting to be able to connect to the PC's audio device and detect audio (for example) - Is this something I can do with C++/CLI?
I have tried using NAudio with c#, but i ha...
Hi,
I have a game I am making, it is giving me this message...
"An unhandled exception of type 'System.StackOverflowException' occurred in game.exe"
To explain...I have a 2D array with 9 different opening moves and I am getting a random number to use as the array reference to retrieve the details needed for a move...
you may get th...
I'm using a standard Windows FileDialog to allow the user to select some files. I'd like to filter out only the file types I'm interested in though (lets call them *.a and *.b). Is there any way to do this without using *.*? I've tried the following but it fails to match any files at all:
this->openFileDialog1->DefaultExt = L"*.a,*.b";
...
C# code:
class Program
{
static void Main(string[] args)
{
TFWrapper tf;
String lexDir = ".......";
String lic = "........";
String key = ".........";
ArrayList cats = new ArrayList();
Boolean useConj = false;
String lang = "english";
String encoding = "auto";
...
I have the problem that C++ compiler does a recompile without any changes done.
Does anyone of you know how to get a list on criterias why VisualStudio decides to start a compilation.
...
What is the opposite of the string comparison
thisString->EndsWith("String")
If it does not end with...
...
Hello friend,
How can I take out one line of this array
array< array< int^ >^ >^ sample = gcnew array< array< int^ >^ >{
gcnew array<int>{0, 0, 0, 0, 0},
gcnew array<int>{1, 1, 1, 1, 1},
gcnew array<int>{2, 2, 2, 2, 2},
};
So it would be :-
array< array< int^ >^ >^ sample = gcnew array< array< int^ >^...
How do you get the current time in VC++ CLI Visual Studio 2008,
...
In C# 2.0, I can do the following:
public class MyClass
{
delegate void MyDelegate(int myParam);
public MyClass(OtherObject obj)
{
//THIS IS THE IMPORTANT PART
obj.SomeCollection.Add((MyDelegate)MyFunction);
}
private void MyFunction(int myParam);
{
//...
}
}
Trying to implem...
Is it possible to use the new lambda expressions in Visual C++ 2010 as CLR event handlers? I've tried the following code:
SomeEvent += gcnew EventHandler(
[] (Object^ sender, EventArgs^ e) {
// code here
}
);
It results in the following error message:
error C3364: 'System::EventHandler' : invalid argument for deleg...
Hello,
I've an app written C & C++. Now, I need to provide a GUI for this app. MFC is the best option for me. But I'm not familiar with MFC.
So can I use .NET to build GUI for this? If so, How? Please be clear.
If I can use .NET I guess I can use WPF too right?
...
Hi,
I need to convert int32 to int in VS2008 C++ CLI?
How is this done?
...
I'm using the OpenCV library and one of its header files, cxoperations.hpp, generates "warning C4793: '`anonymous namespace'::CV_XADD' : function compiled as native", if my C++ project is compiled with CLR support. I can prevent the warning by surrounding the OpenCV header include like this:
#pragma managed(push,off)
#include <cv.h>
#pr...