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
  • Run exe resource from memory.

    performance question learning
    2
    0 Votes
    2 Posts
    3 Views
    Richard Andrew x64R
    That depends if the resource is an exe or a dll. If it's an exe, there is no way, but if it's a dll, then check out this link: Loading a Dll From Memory[^] The difficult we do right away... ...the impossible takes slightly longer.
  • Convert a C# WinSCP program to C++/CLI

    csharp help tutorial c++ dotnet
    5
    0 Votes
    5 Posts
    3 Views
    B
    Richard, Thanks for your help. I get it. The thing is when I mouse over the new SessionOptions in this line in the C# program, SessionOptions sessionOptions = new SessionOptions { Protocol = Protocol.Sftp, I see SessionOptions.SessionOptions(). With that in mind, when I do the C++ program, I convert that line to: WinSCP::SessionOptions ^ sftpOptions = gcnew WinSCP::SessionOptions::SessionOptions() sftpOptions->Protocol = WinSCP::Protocol::Sftp; As you can see, that (WinSCP::SessionOptions::SessionOptions()) is not a valid call. I change that to gcnew WinSCP::SessionOptions() and it works! Thanks.
  • vc++2003 interop call c# DLL

    help csharp c++ com question
    5
    0 Votes
    5 Posts
    3 Views
    X
    Yes, I tried in DotPeek, it works well. Also it can be called in other C# project. Any other ideas?:mad: Code Project
  • Passing unsigned int* from Native C++ to Managed C++

    c++ tutorial
    3
    0 Votes
    3 Posts
    3 Views
    L
    You just pass it as is, it is up to the managed code to read the contents. See http://msdn.microsoft.com/en-us/magazine/cc164193.aspx[^] for further details.
  • medical store management

    2
    0 Votes
    2 Posts
    2 Views
    L
    Please read http://www.codeproject.com/Messages/3122367/How-to-get-an-answer-to-your-question.aspx[^].
  • test

    6
    0 Votes
    6 Posts
    3 Views
    S
    Testing started ... Check for sensible topic name .................. failed! Check comprehensibility of the question ........ check aborted; missing data! Check for code example ......................... success! Check for code readability and documentation ... failed! Check topic against sub forum type ............. failed! Test completed. Test results: 1 success 3 failed 1 aborted We are sorry to inform you that at this moment there is insufficient data to process your query. Thank you for using CodeProject Forums. GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
  • Static Analysis code reqired for C++

    c++ java com linux help
    3
    0 Votes
    3 Posts
    3 Views
    S
    http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis[^] Most of the tools are commercial, but if it is your job, and you find that one of the commercial tools will notably improve the quality or speed of your work, you shouldn't have any problems convincing your boss to buy a license. The free ones I've tried are rather limited in scope and capabilities. GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
  • How to model endless-loop with states in UML-state-diagram

    question tutorial
    4
    0 Votes
    4 Posts
    2 Views
    S
    A bit hard without the ability to embed an image, but I'll try: /*********\ * * * state 0 * * * \*********/ | ^ ^ | | | v no| |yes / \ | | / \ | | R==1?>-+ | \ / ^ \ / / \ V / \ | <R==0?>-+ | \ / | |yes \ / no| | V | | ^ | | | | v | | /*********\ | * * | * state 1 *<--+ * * \*********/ Ok, the readability suffers a bit - sorry for the bleeding eyes ;) GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
  • redirecting output of CMD with administrator privileges

    help question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • redirecting output of CMD with administrator privileges

    help question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • how to lock function used by thread?

    tutorial question
    2
    0 Votes
    2 Posts
    3 Views
    M
    Why don't you try Thread Synchronization mechanisms? Following may help you. Managed Thread Synchronization[^] How to create a Simple Lock Framework for C++ Synchronization[^] [Delegates]      [Virtual Desktop]      [Tray Me !] -Malli...! :rose:****
  • 0 Votes
    3 Posts
    2 Views
    G
    Identify your primary objective. If it is producing a new application, then stick to the language you know best, but if it is learning C++ then follow Richard's advice. I faced the same choice some years back, and since my primary objective was learning C++ I went down this route. Had it been the production of a new application I would have continued with COBOL. I never had any desire to branch out into C# but it made practical sense to adopt it for the WCF and ASP.NET aspects so that got learned too. Nowadays Visual Studio, and particularly the express versions offer better UI experiences in C#, so consider that C++ may not offer all you desire. Ger Ger
  • ShellExecute

    c++ linux help
    2
    0 Votes
    2 Posts
    3 Views
    Richard Andrew x64R
    Well, for one thing, you're failing to pass the "-plugin" parameter on the command line in the C++ version. The difficult we do right away... ...the impossible takes slightly longer.
  • LNK2019: unresolved external

    c++ help question
    9
    0 Votes
    9 Posts
    4 Views
    L
    thnx
  • 0 Votes
    3 Posts
    2 Views
    W
    Thank you.
  • haching with MD5

    help cryptography question
    3
    0 Votes
    3 Posts
    2 Views
    W
    Well, type of data is not important. Anyhow you have to send data to MD5 with array so there is no important thing happened when you send char array or byte array. The difference between your message and string is that use byte array or use char array. So, you can send byte array which implements your message contents to HD5 instead of char array. That's all.:suss:
  • Icon color resolution

    c++ csharp visual-studio help tutorial
    3
    0 Votes
    3 Posts
    5 Views
    W
    That's not problem. When you using your icon resource from source, there is not resolution problem occurred. You can load your icon resource from files with LoadIcon function. You can see details from MSDN. That's all. :)
  • 0 Votes
    2 Posts
    4 Views
    Richard Andrew x64R
    A delegate is like a function pointer, and event is like a function. When an event is raised, it calls each delegate that is attached to it. Events are generic in that they can accept delegates that point to any function, as long as the delegates' signatures match the signature of the event. Events are points of attachment for delegates to receive calls from an object. The difficult we do right away... ...the impossible takes slightly longer.
  • 0 Votes
    3 Posts
    4 Views
    J
    As Richard indicates, nothing beats actually writing some code and learning by doing. There is one book I really like which isn't on the reference page: "C++/CLI In Action" by Nishant Sivakumar.
  • how can I draw real-time curve in coordinate system?

    question
    9
    0 Votes
    9 Posts
    4 Views
    W
    thank you!