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
  • is it the right code?

    com question
    2
    0 Votes
    2 Posts
    2 Views
    C
    Why do you ask the same questions over and over, just rewording them ? I'd like to know why you want to control/hijack the login process. I'm not going to give any more help on this neverending quest of yours unless I am convinced it does not have a malicious intent. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
  • is there any lose of value ?

    com question
    5
    0 Votes
    5 Posts
    3 Views
    C
    Don't be so stupid. :-) I really worry when someone is here for so long and continues to post the most basic questions over and over. Are we failing him by answering ? Would he learn if he had to ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
  • C++ & Databse connectivity

    c++ database help question
    2
    0 Votes
    2 Posts
    3 Views
    C
    ADO, DAO, OLE DB, ODBC. http://msdn.microsoft.com[^] Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
  • NEED HELP WITH C++ PROGRAM!!

    c++ com help
    2
    0 Votes
    2 Posts
    2 Views
    C
    What, ANY C++ program ? #include <iostream> int main() { std::cout << "hello world"; return 0; } Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
  • Help! Cannot copy Web Service to server!

    sysadmin question csharp c++ asp-net
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Using STL in MC++

    c++ question
    2
    0 Votes
    2 Posts
    2 Views
    A
    You just include the header files and use it as if you were writing a standard C++ application. There's nothing special about it. Best regards, Alexandru Savescu P.S. Interested in art? Visit this!
  • Converting managed string into ansi char*

    c++ help question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Convert managed to unmanaged

    c++
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • type caste it into DWORD?

    csharp com tutorial question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • process and hwnd

    com help tutorial question
    2
    0 Votes
    2 Posts
    2 Views
    I
    If you need to see if a process is doing work, use the Task Manager and find it. If you have the process ID, you can probably get the Thread ID of the process' main thread. Use GetGUIThreadInfo using that thread ID to retrieve the information. The GUITHREADINFO structure filled by the function will contain the HANDLE of the active window. From there, you can ennumerate the Child Windows. GetGUIThreadInfo reference. -- ian http://www.ian-space.com/
  • Callback in C++ to invoke object in MC++

    csharp c++ help tutorial question
    2
    0 Votes
    2 Posts
    3 Views
    N
    See my article :- Implementing Callback functions using IJW (avoiding DllImport) URL - http://www.codeproject.com/managedcpp/cbwijw.asp Desc - Shows how you can call native API functions that require callbacks using IJW, and without the use of DllImport attribute. The technique allows you to pass a delegate as the callback function just as in the MS recommended manner except, I show you how to do this without the ugly DllImport attribute. HTH Regards, Nish Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
  • New line in textbox?

    data-structures help question
    3
    0 Votes
    3 Posts
    2 Views
    G
    Yes, I can't find a better way than using strings and then doing something like: String* break="\r\n"; String::Concat(textString1,break,textString2); This is obviously a lousy solution because you have to put all of your strings together before you even display them! MS says that we shouldn't even be using strings anymore if they have to be manipulated repeatedly, but should use stringBuilder instead. Unfortunately, stringBuilder has been proven in clinical trials to cause insanity in 3 out of 5 users.
  • changing RTF hyperlink appearance w/ C++ .NET

    csharp c++ regex question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    4 Posts
    2 Views
    D
    Correction: cout << "busNumberSQL[1] = " << static_cast(busNumberSQL[1]) << endl; should read: cout << "busNumberSQL[1] = " << static_cast(busNumberSQL[1]) << endl; PS. Apologies for the multiple post - the error of my way has been pointed out to me and will not happen again. Doug
  • String to Cstring

    c++ question
    6
    0 Votes
    6 Posts
    3 Views
    D
    Nick, I had a similar problem, this time involving a CString array. I have found the source of the problem expressed in the thread "ADO.NET : SqlDataReader : I need to assign retrieved value to C++ variable": http://www.codeproject.com/script/comments/forums.asp?forumid=3785#xx309754xx but do not yet know why it occurs or how I can fix it. The problem arises with the /clr compiler setting. Here is the code to illustrate this: ///////////////////////////////////////////////////////// #include #include #include "try_ADONET.h" //#using //#using //#using // This is required for the ADO.NET Provider using namespace std; //using namespace System; int Main() { CString busNumberSQL[2]; CString bus = "Hello"; busNumberSQL[1] = bus; return 0; } //////////////////////////////////////////////////////// Without the /clr setting the array of CString busNumberSQL[2] is correctly contructed as is CString bus and the line busNumberSQL[1] = bus; works as expected. This can be seen by putting a breakpoint in at return 0; and seeing the variables in a Watch. Copy the expanded Watch details (Name, Value & Type) to an EXCEL sheet. .................. Next, add the compiler switch /clr and rerun the code. CString bus is constructed correctly BUT something weird happens in the construction of CString busNumberSQL[2]. Now, busNumberSQL[1] = bus; results in the address of bus as an integer being assigned to busNumberSQL[1], and look at the Watch details!! Copy the expanded Watch details (Name, Value & Type) to an EXCEL sheet Name: busNumberSQL; Value: {Length=2}; Type: ATL::CStringT > >[] ...(Note no dimension at end compared to the "no /clr" case. Next Watch line: [0] 2083454756 __int32 Next Watch line: [1] 3103464 __int32 My conclusion is that busNumberSQL[2] is not an array of CString. Of course, I need the /clr in order to use ADO.NET! It seems as though a CString works, but a CString array for some (unknown) cannot even be defined. Do you have any light for me? (I have not got into your previous post yet on Marshall) Best regards Doug. (In case you are wondering I am very much a beginner with C++ and .NET) Doug
  • 0 Votes
    8 Posts
    4 Views
    D
    Hi Nick Re: ADO.NET : SqlDataReader : I need to assign retrieved value to C++ variable I have found the source of the problem expressed in the thread "ADO.NET : SqlDataReader : I need to assign retrieved value to C++ variable": http://www.codeproject.com/script/comments/forums.asp?forumid=3785#xx309754xx but do not yet know why it occurs or how I can fix it. The problem arises with the /clr compiler setting. Here is the code to illustrate this: ///////////////////////////////////////////////////////// #include #include #include "try_ADONET.h" //#using //#using //#using // This is required for the ADO.NET Provider using namespace std; //using namespace System; int Main() { CString busNumberSQL[2]; CString bus = "Hello"; busNumberSQL[1] = bus; return 0; } //////////////////////////////////////////////////////// Without the /clr setting the array of CString busNumberSQL[2] is correctly contructed as is CString bus and the line busNumberSQL[1] = bus; works as expected. This can be seen by putting a breakpoint in at return 0; and seeing the variables in a Watch. Copy the expanded Watch details (Name, Value & Type) to an EXCEL sheet. .................. Next, add the compiler switch /clr and rerun the code. CString bus is constructed correctly BUT something weird happens in the construction of CString busNumberSQL[2]. Now, busNumberSQL[1] = bus; results in the address of bus as an integer being assigned to busNumberSQL[1], and look at the Watch details!! Copy the expanded Watch details (Name, Value & Type) to an EXCEL sheet Name: busNumberSQL; Value: {Length=2}; Type: ATL::CStringT > >[] ...(Note no dimension at end compared to the "no /clr" case. Next Watch line: [0] 2083454756 __int32 Next Watch line: [1] 3103464 __int32 My conclusion is that busNumberSQL[2] is not an array of CString. Of course, I need the /clr in order to use ADO.NET! It seems as though a CString works, but a CString array for some (unknown) cannot even be defined. Do you have any light for me? (I have not got into your previous post yet on Marshall) Best regards Doug. (In case you are wondering I am very much a beginner with C++ and .NET) Doug
  • #pragma managed/umanaged

    c++ csharp visual-studio winforms linux
    2
    0 Votes
    2 Posts
    2 Views
    A
    Generally I leave my code managed unless there is a good reason not to (performance, easier interop, etc.)
  • Complex Numbers

    question help
    2
    0 Votes
    2 Posts
    2 Views
    S
    Because u didn't identify i the output has some errs.Do not identify i by using double,identify it like characters.And finnaly add it to answer. cout<<(a+c)+(b+d)<<".i"; like this .ok?? However if u want to make some other calculations on complex number theory , you have to identify the special properties of i.
  • how to?

    database com tutorial question workspace
    2
    0 Votes
    2 Posts
    2 Views
    S
    X| There are some companies that provides such programs.But i don't know how and where they can be found.
  • Including Wbemdisp?

    csharp c++ com question
    2
    0 Votes
    2 Posts
    3 Views
    M
    See System::Management namespace. It wraps WMI. :) 43 68 65 65 72 73 2c 4d 69 63 68 61 65 6c