Skip to content

Managed C++/CLI

Discussions on Managed Extensions for Visual C++ .NET

This category can be followed from the open social web via the handle managed-c-cli@forum.codeproject.com

4.4k Topics 14.9k Posts
  • Anyone can help me ?

    help question
    2
    0 Votes
    2 Posts
    0 Views
    M
    First of all, please remember the debugging 101: 1. Attach a debugger and try to run it then. 2. The debugger will stop at the Null Pointer assignement, and you can fix the error. About Null pointer assignments: Null pointer assignments occur when you try to access a pointer which's memory was deleted or not initialized (via malloc or new) and are a strong hint towards dangling and insecure pointers. People becoming wiser in order to notice the stupid things they did back in the young days. This doesn't mean that they really stop doing those things. Wise people still do stupid things, only on purpose.
  • visual studio 2008 QT project with c++

    help c++ csharp visual-studio sysadmin
    3
    0 Votes
    3 Posts
    0 Views
    A
    Could be that the audio device is being locked up by the other caller. You don't show the actual error code but the function where it stalls out would indicate that he's checking if the device is ready. You should post the actual error output instead of the call stack. Also, this is likely a problem with how you're using Qt, so you may be better off asking for help in a Qt forum.
  • NativeWindow? Win32??

    question graphics game-dev help
    3
    0 Votes
    3 Posts
    0 Views
    A
    Use a native window when you're working with native C/C++/WinAPI code and use the managed version when you're using managed code. Only reason to use native code when you have a managed project is if the managed version doesn't do something you need already (which is hardly ever the case).
  • Why calling sort() crashes?

    graphics help question
    2
    0 Votes
    2 Posts
    0 Views
    L
    Kumar Anitesh wrote: Am i missing something very basic ? Not that I can figure out. I tried the same code, but using greater as the predicate and it works fine. This needs an STL expert to look at it, but you posted in the managed C++ forum; try http://www.codeproject.com/Forums/4486/ATL-WTL-STL.aspx[^]. Veni, vidi, abiit domum
  • socket programming in forms app

    help c++ python tools
    2
    0 Votes
    2 Posts
    0 Views
    L
    The code is much the same as you have above, although you would use connect rather than bind; see this tutorial[^]. Veni, vidi, abiit domum
  • C++ CLR Windows Form Application (Printing to the Printer)

    help c++ dotnet tutorial
    16
    0 Votes
    16 Posts
    0 Views
    K
    Thank you so much, Richard. You have been most help in resolving our problems.
  • can't get out of loop

    question
    2
    0 Votes
    2 Posts
    0 Views
    L
    You could simplify this by removing all those redundant case blocks and replaing them with a single default:. You could then use your debugger to find out why it does not break out of the loop. Use the best guess
  • Indirect assembly dependency issue

    c++ question csharp help
    3
    0 Votes
    3 Posts
    1 Views
    J
    I'll second this. We have a post-build step copy the DLLs too. John
  • 0 Votes
    2 Posts
    0 Views
    L
    You cannot directly use a managed dll from unmanaged code as far as I know. You need to take some other actions as detailed in some of these articles[^]. Use the best guess
  • got error while writing into excel file

    help c++ css tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    K
    Hi David, now i realized that i am not saving the excel file till completion of the report generation so what i am suspecting, each excel sheet will have maximum rows 1048576 that means 1048576 * 8 = 8388608 rows of data(this data is a huge) it holding on RAM. Now what i will do i will save the excel file for each 5 sheets completion and continue to generate report. In this application i am also using number of Dictionary objects, so i will also take care to freed these objects as per you suggestion. Thanks for you support
  • Pointer in Managed Code

    csharp visual-studio question c++ help
    6
    0 Votes
    6 Posts
    0 Views
    N
    Thank you :)
  • How to add existing project in VS6.0

    c++ debugging help tutorial
    3
    0 Votes
    3 Posts
    0 Views
    L
    Shyam Kodase wrote: Code is in plain C and C++ So why have you posted this in the Managed C++/CLI forum? However, as to your question: The best way to do this would be to leave the existing folders intact until the new projects are all building successfully. Using Visual Studio, create a new empty project for the first existing project in your set. This will create a solution folder and a project folder underneath it. Copy the source files (via Windows Explorer) from the existing project into the new project folder. Using Visual Studio, add the files into the project (header, resource, source etc). Build the project and correct any errors. Add a new blank project to the solution and repeat the above process. Repeat for all remaining projects. Use the best guess
  • Preserving polymorphism across the managed/unmanaged boundary

    c++ oop question
    3
    0 Votes
    3 Posts
    0 Views
    J
    Assuming that you really do need to expose the full class hierarchy as managed types to managed code then yes, I think you're left duplicating the hierarchy with wrapper ref classes. If the client managed application is also guaranteed to be C++/CLI (and not C#) it could #include the native class hierarchy intact and use it directly. If you want to allow C# then I'd use wrapper classes with the PIMPL idiom. Also, hopefully your native classes don't use multiple inheritance since a managed class can only have one non-interface base class. John
  • Compiler Error

    visual-studio help csharp c++ database
    2
    0 Votes
    2 Posts
    0 Views
    L
    Why is this in the Managed C++/CLI forum? This is purely a C++ language question. However, the reason for the error is explained at http://msdn.microsoft.com/en-us/library/da60x087(v=vs.80).aspx[^], so you need to check the parameter types that you are passing into your function calls. Use the best guess
  • Type casting in C++\CLI project

    question c++ dotnet help
    4
    0 Votes
    4 Posts
    0 Views
    L
    TNT
  • GetScanline is not a member of TBitmapData???

    json c++ delphi com help
    4
    0 Votes
    4 Posts
    0 Views
    L
    If you post in the wrong place you can always delete it when you realise your mistake. Use the best guess
  • new to c++/cli

    csharp visual-studio c++ dotnet com
    2
    0 Votes
    2 Posts
    0 Views
    L
    Member 9668955 wrote: please help With what? All you have done is tell us that you can't get it to work. You need to provide specific details of the failures and include extracts of the code that is giving the problem. If you are having a problem with the code of an article then you should use the forum at the end of that article to discuss with the author. Use the best guess
  • VISUAL STUDIO 2005, 2008

    csharp visual-studio com learning
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    3 Posts
    0 Views
    Z
    Thanks!
  • Convert string array from C# to C++ ?

    question csharp c++ graphics data-structures
    6
    0 Votes
    6 Posts
    0 Views
    T
    Hi Karthik, Thank you very much. Your link is very useful. I will try it. Kind regards, Tai