c++-cli

Examples of ISO C++ code that is not valid C++/CLI

坚强是说给别人听的谎言 提交于 2019-12-01 18:14:45
I've seen contradictory answers on the internet with regard to whether C++/CLI is a superset of C++ or not. The accepted answer on this question claims that "technically no", but doesn't provide an examples of non-C++/CLI code that conforms to ISO C++. Another answer on that question cites a book that says the opposite. So, can you please provide accurate answers with example code that fails on C++/CLI or cite a trusted source (MSDN for example) on this matter? I had someone this topic come up today and thought I would like to inform myself, but I didn't find any clear answer elsewhere! Valid

Examples of ISO C++ code that is not valid C++/CLI

无人久伴 提交于 2019-12-01 18:12:36
问题 I've seen contradictory answers on the internet with regard to whether C++/CLI is a superset of C++ or not. The accepted answer on this question claims that "technically no", but doesn't provide an examples of non-C++/CLI code that conforms to ISO C++. Another answer on that question cites a book that says the opposite. So, can you please provide accurate answers with example code that fails on C++/CLI or cite a trusted source (MSDN for example) on this matter? I had someone this topic come

Mixed mode assembly not loading symbol for native C++ pdbs

若如初见. 提交于 2019-12-01 17:30:23
I am working with mixed mode assemblies in C++/CLI. All managed mode assembled pdb's get loaded when successfully in mixed mode assembly, but native dll's and pdb's are not getting loaded even though the information of native pdb's is shown in the Modules pane (i.e. in VS Debug->Windows->Modules). I am using native dll and calling its exported function in mixed assembly in C++/CLI code. Here, functions get called successfully, but native pdb symbols are not loading and all breakpoints in the native code are shown as hollow circle and tool tips says there are no symbols loaded for this. I have

Mixed mode assembly not loading symbol for native C++ pdbs

白昼怎懂夜的黑 提交于 2019-12-01 17:05:22
问题 I am working with mixed mode assemblies in C++/CLI. All managed mode assembled pdb's get loaded when successfully in mixed mode assembly, but native dll's and pdb's are not getting loaded even though the information of native pdb's is shown in the Modules pane (i.e. in VS Debug->Windows->Modules). I am using native dll and calling its exported function in mixed assembly in C++/CLI code. Here, functions get called successfully, but native pdb symbols are not loading and all breakpoints in the

Are there any tools for converting Managed C++ to C++/CLI? [closed]

雨燕双飞 提交于 2019-12-01 17:02:39
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . We have an old project written using Managed C++ syntax. I would like to propose to the team a reasonably pain-free (I don't mind some level of human interaction, I think I'm realistic in my expectations that we'll still have to do some work by hand) method of updating the existing code to C++/CLI syntax so that

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

纵然是瞬间 提交于 2019-12-01 15:14:09
问题 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 marshalling data back and forth if you want some more easy points from CLI questions.) I just want to use this C library from my CLR wrapper. I went to Properties-

afxwin.h issues in Visual Studio 2015 Windows Form App

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 14:14:21
A while ago i wrote a C++ CLI Windows Form app, which compiled fine in Visual Studio 2013. Now i wanted to recompile it in Visual Studio 2015 Update 1 but i'm facing a problem, and after hours of tests i figured out the culprit is afxwin.h . TL;DR - Is there any way i can use stdafx.h (so afxwin.h and all other imports coming with it) in a Windows Form app compiled with Visual Studio 2015 without having the app crash upon start? Here's how to reproduce the same issues i'm facing in my app. Since Windows Form is no longer available as project template in VS2015, i created a CLR Empty Project

Preventing a RichTextBox operation from being added to the control's Undo stack

こ雲淡風輕ζ 提交于 2019-12-01 13:58:52
Editing a RichTextBox control's text (more specifically, modifying selection font/color) programmatically seems to be tracked in the control's built in undo stack. Is there a way, short of writing my own undo/redo "manager", to prevent certain actions/operations from being added to the undo stack ? No cando. At best you can flush the undo stack completely by sending EM_SETUNDOLIMIT twice. EM_SETTEXTEX offers the same option with the ST_DEFAULT flag. Surely not what you want. Look at ScintillaNET for a real editor. If you came here when searching for a WPF c# answer you have a good one here

How to associate constants with an interface in C#?

人盡茶涼 提交于 2019-12-01 13:52:58
问题 Some languages let you associate a constant with an interface: A Java example A PhP example The W3C abstract interfaces do the same, for example: // Introduced in DOM Level 2: interface CSSValue { // UnitTypes const unsigned short CSS_INHERIT = 0; const unsigned short CSS_PRIMITIVE_VALUE = 1; const unsigned short CSS_VALUE_LIST = 2; const unsigned short CSS_CUSTOM = 3; attribute DOMString cssText; attribute unsigned short cssValueType; }; I want to define this interface such that it can be

how to unload managed c++ dll?

你离开我真会死。 提交于 2019-12-01 13:48:43
A.dll is a native c++ dll, B.dll is a managed c++ dll. A.dll depends on B.dll, so when load A.dll, B.dll is loaded automatically, but after A.dll is unloaded, B.dll is still loaded. Only A.dll depends on B.dll, why B.dll can't be unloaded? How to unload the managed c++ dll? I'm using vs2010. Thanks You cannot unload a managed assembly once it is loaded by the CLR. The only way is to kill the AppDomain. 来源: https://stackoverflow.com/questions/7697621/how-to-unload-managed-c-dll