CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: CJ1

Page 1 of 3 1 2 3

Search: Search took 0.03 seconds.

  1. Replies
    1
    Views
    998

    Re: MC++ function that receives void * parameter

    Assuming C++/CLI (i.e. VS 2005 or later, otherwise upgrade) the wuestion is what managed thing do you wish to pass in "void *" ?
    C++/CLI: void Mfunc1 (System::Int32 length, System::Object^ thing)...
  2. Replies
    2
    Views
    1,106

    Re: char* to string^ conversion

    Your code is not clear. If name is a native char * then you need to convert from String back to char * like this:


    char* str2 = (char*)(void*)Marshal::StringToHGlobalAnsi(managedString); ...
  3. Replies
    17
    Views
    2,467

    Re: help needed for new programmer

    Or, in the real world you might use Array.Sort, but if this is an assignment you'll get an F for that solution.
  4. Replies
    3
    Views
    1,556

    Re: How to do Tripple DES decryption in C#.

    There is a good example in the TripleDESCryptoServiceProvider Class on MSDN (TripleDESCryptoServiceProvider Help) which is the wrapper class for TrippleDES.
  5. Replies
    0
    Views
    553

    Debug Application Plug-in

    I have an application that uses C# as the script language. The C# is compiled on the fly from within the application and executed.

    I would like to be able to allow the user to debug their C# code...
  6. Replies
    1
    Views
    962

    Overloading the [] operator

    I am working with a mix of C# and Managed C++ in my project.

    I need to know what the syntax is to overload the [] operator.

    My class derrives from System::ArrayList. The documents say that the...
  7. Replies
    9
    Views
    1,311

    Re: public variable not accessible, why??

    You really don't want to start messing around with static members in the end you will end up with more problems than you will solve.

    As for saving memory this is false, it will not matter if you...
  8. Replies
    10
    Views
    812

    Re: Learning C when you already know C++

    Yes all true, in fact you can do object oriented programming in assembler if you want when you start with a clean slate.

    In this case we are talking about working on existing C code for an...
  9. Replies
    10
    Views
    812

    Re: Learning C when you already know C++

    In a nutshell C is all about pointers and memory management (IMHO), if you feel comfortable with pointers you are well on your way.

    C is really one step above assembler (IMHO), the language...
  10. Replies
    10
    Views
    1,700

    Re: Wrapping C++ functions

    I'm sorry I was in error on the static part, it IS required (that's what you get when you answer from memory only).

    I have only used this in one project which used a dll written in C. From what...
  11. Replies
    10
    Views
    1,700

    Re: Wrapping C++ functions

    Sorry, cut-n-paste error, change the modifier to public and remove static. Accessing native DLLs requires that the method is public and it may NOT be static.

    If you need anything else, create a...
  12. Replies
    10
    Views
    1,700

    Re: Wrapping C++ functions

    Yes, try:
    using System.Runtime.InteropServices;

    [DllImport("Data.dll")]
    private static extern bool CDataApp.IsOpen();When looking for more information on this search for "PInvoke".
  13. Re: calling methods of already loaded C# Exe from VC++ dll

    From your question I assume you are developing this VC++ DLL, in which case you will need to use the managed VC++ extensions to talk to C# using reflection.

    I suggest you read the...
  14. Replies
    14
    Views
    2,480

    Re: A Newbie's Problems w/ DLLs

    I also had this problem with different runtime libraries between my EXE and DLL, the ONLY soultion I found was to make everything Multithreaded DLL (Debug or Release), then everything worked again.
    ...
  15. Thread: Timer

    by CJ1
    Replies
    6
    Views
    1,793

    Re: Timer

    We have found that under WIndows NT/2000 you can get 50 ms most of the time, 20 ms generally but the computer needs to be properly setup. Under pure Windows you can expect delays > 1000 ms from time...
  16. Replies
    3
    Views
    1,063

    Re: Accessing already loaded C# dll in VC++

    From what I understand of your requirements, you want the exe to call methods in your DLL and use some data that the other exe has set?

    Then use .NET Remoting to talk from application to...
  17. Replies
    5
    Views
    904

    Re: Reading hexadecimal values for a file

    You never said if the compiler was MS VC++ (I'll assume yes given the __int64), so here is the quick answer:
    fscanf(fp, "%d 0x%16I64X, &id, &move); where id is an int and move is __int64.
    Here is...
  18. Replies
    6
    Views
    3,502

    I thought that under DCOM you could isolate the...

    I thought that under DCOM you could isolate the DLLs?

    I could always go back to launching the DLLs in seperate apps and using shared memory or named pipes to communicate, but I really wanted to...
  19. Replies
    5
    Views
    2,128

    Could you post the ful code excerpt, I don't see...

    Could you post the ful code excerpt, I don't see how cResultPtr is declared and initialized?
  20. Replies
    6
    Views
    3,502

    Loading multiple instances of a DLL?

    Here is one that I am having trouble with.

    I need to load multiple instances of a DLL in my application and have each instance isolated from the others (the DLL has global variables).

    In the...
  21. Thread: strcat problem

    by CJ1
    Replies
    28
    Views
    3,813

    I agree, BUT I still think C++ is NOT a good...

    I agree, BUT I still think C++ is NOT a good first language. Also C# is a better introduction to C++ than C, and it would has the added advantage of protecting the beginner from system crashing...
  22. Replies
    5
    Views
    2,128

    Lets get the basic stuff out of the way first: ...

    Lets get the basic stuff out of the way first:

    #using <mscorlib.dll>
    using namespace System;
    using namespace System::Runtime::InteropServices;
    The within your code to go from managed to...
  23. Thread: strcat problem

    by CJ1
    Replies
    28
    Views
    3,813

    Right you are on the precision field, my error. ...

    Right you are on the precision field, my error. :blush:

    As for the quarter, I wouldn't want to guess or assume the intentions.

    This point only undelines that C++ is NOT a language for...
  24. Thread: strcat problem

    by CJ1
    Replies
    28
    Views
    3,813

    You better read your manual more carefully and...

    You better read your manual more carefully and concentrate on the precision fieldthat is how you limit the output size.
    Again read the C++ specification, it includes most of C as part of C++ (there...
  25. Thread: strcat problem

    by CJ1
    Replies
    28
    Views
    3,813

    This forum has many new programmers, and NO you...

    This forum has many new programmers, and NO you are NOT violating the forum rules.VictorN is wrong is saying there is no specific C++ code as all the code you presented was valid C++ code, perhaps it...
Results 1 to 25 of 60
Page 1 of 3 1 2 3





Click Here to Expand Forum to Full Width

Featured