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
  • 0 Votes
    1 Posts
    4 Views
    No one has replied
  • 0 Votes
    4 Posts
    11 Views
    L
    Maybe he though that in the CodeProject numbering system, C++/CLI = C#. ;)
  • How to format DATETIME

    c++ csharp visual-studio help tutorial
    10
    0 Votes
    10 Posts
    26 Views
    L
    Since you have only just started with C++/CLI, my advice would be to stop now and switch to C#. It is so much better for this sort of application, and the learning curve is not as bad as it may at first appear. There is a great free starter document at .NET Book Zero[^] which you can work through fairly quickly. Like you, I am retired and followed this route myself, so I am far from being a C# expert, but I can code simple applications without too much trouble.
  • serial port, threads, events

    help question c++ delphi design
    3
    0 Votes
    3 Posts
    11 Views
    J
    My apologies: Let me try this again. I'm wondering if there is a way to free my serial port thread after i invoke to my UI thread. Once i Invoke from the Data Received event on the Serial port Thread to a receive function on the UI thread, my switch statement in the receive function may call a function that sends data to the pic program. Now the pic responds immediately but the data doesn't appear cause the invoke method hasn't quite exited yet. any suggestions would be Appreciated.
  • 0 Votes
    5 Posts
    15 Views
    S
    You can add generic Catch block in your code for function which is calling that third party APIs and in catch you do nothing.But its just to avoid your application from getting crash, ideally you should not do it as it makes no sense. ~Sam
  • 0 Votes
    3 Posts
    10 Views
    J
    What?? This is the Managed C++/CLI forum. This crash directly affects C++/CLI code. I'd think anyone that cares about successfully coding in C++/CLI will care about this. Thus, the post.
  • Basic TCP/IP Server and Client Code

    csharp c++ sysadmin
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • 0 Votes
    5 Posts
    15 Views
    L
    I think this message was meant for the OP.
  • c++ sms send dll

    c++ java json help question
    4
    0 Votes
    4 Posts
    12 Views
    V
    Your code looks like the native C++.
  • meaing of below code

    question
    3
    0 Votes
    3 Posts
    7 Views
    V
    See: [curl](https://curl.haxx.se/) [libcurl - curl_easy_setopt()](https://curl.haxx.se/libcurl/c/curl\_easy\_setopt.html) And BTW, you again posted in the wrong forum. This code looks like the native C++.
  • Sharpen filter of bmp image

    ios graphics data-structures help question
    2
    0 Votes
    2 Posts
    8 Views
    J
    I don't know Polish so that it is really hard to retrace the code. But you missed some points: There are two versions of info headers with different sizes which can be identified using the biSize member: BITMAPINFOHEADER and BITMAPV5HEADER When biCompression is BI_BITFIELDS, these bitfields are stored after the info header. Your code supports only 24-bit RGB bitmaps. So you should check if the file is in that format (biBitCount == 24). You can read the pixel data from file offset bfOffBits with size biSizeImage which includes the padding bytes. But your code starts reading after the info header which is the location of the bitfields table or still within a BITMAPV5HEADER.
  • why c++ is still being used?

    c++ question
    25
    0 Votes
    25 Posts
    109 Views
    R
    As noted by others for drivers and embedded systems. It is a mature language that works well with hardware with less interpretation. One reason many people left C++ was they hate pointers, but as those other languages mature, they too employ pointers, so in the end we are now seeing a revival of C++. p.s. Some people love pointers. :-D
  • please explain this lines of code

    com tools regex question
    3
    0 Votes
    3 Posts
    10 Views
    J
    Read the function documentation. They contain sections about the return values: fread | Microsoft Docs[^] _stricmp, _wcsicmp, _mbsicmp, _stricmp_l, _wcsicmp_l, _mbsicmp_l | Microsoft Docs[^] fread() returns the number of successfully read items which is the same as the third function parameter when reading was successful. So the while loop continues to be executed while reading is successful. stricmp() returns zero when the passed strings are identical. So the if block is executed when the passed strings are identical.
  • What is the alternative of _kbhit_ in linux ?

    question game-dev linux
    2
    0 Votes
    2 Posts
    7 Views
    M
    may be you can find the solution here : Is there is any alternative to kbhit() for Linux? - Quora[^]
  • 0 Votes
    3 Posts
    10 Views
    T
    thank you
  • C++/CLI support comes to ReSharper C++

    c++ com announcement
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • using user-defined data type as data-member of a class.

    announcement
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Small RAII-like cleanup class in C++/CLI

    c++ tools help tutorial question
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Information Edit Source code for c++

    c++ design
    3
    0 Votes
    3 Posts
    11 Views
    J
    I'm not going to write the complete edit function for you. But you already have most of the parts because editing can be implemented by selecting, reading, entering new data, deleting the old record, and inserting the edited data. Quote: Also it does not going back to main menu after adding a record. Never call main() from within your code as done here in the record() function: if (choice2=='n'||choice2=='N') { system("cls"); main(); } Just return from the function (simply delete the above code block). Then execution continues after the function call in main(). Similar for the other functions where you call main() too. To process the next operation you have to implement a loop in main() that gets and processes the next choice until the exit option is selected: do { printf("\nEnter your Choice here \t"); scanf("%i",&choice); fflush(stdin); switch (choice) { // ... } system("cls"); } while (choice != 5); Note also that this the wrong forum because this is about Managed C++/CLI as stated in the topmost (sticky) post. Please use the C / C++ / MFC Discussion Boards[^] or Ask a Question for further C/C++ related questions where the latter is the better choice when posting larger amounts of code (which should be avoided).
  • Print causes in afxtls.cpp

    csharp c++ visual-studio help
    2
    0 Votes
    2 Posts
    7 Views
    Richard Andrew x64R
    It would help if you gave us the details of the error you're getting. There's no way we can guess. Also, what line of code does it occur on? You have LeaveCriticalSection in three different lines. The difficult we do right away... ...the impossible takes slightly longer.