dcsimg
Results 1 to 6 of 6

Thread: [RESOLVED] How to create an instance of a class with a class name?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,596

    Resolved [RESOLVED] How to create an instance of a class with a class name?

    I want to create an object by class name (string). For example: there is a class Class1, how to create an instance of Class1 by the class name "Class1"? Thanks.

  2. #2
    Hyperactive Member
    Join Date
    Feb 2019
    Posts
    382

    Re: How to create an instance of a class with a class name?

    See CallByName().

    Edit: Never mind, it doesn't work by String representation of a class. Olaf's DirectCom works with classes in DLL's.
    Last edited by qvb6; May 20th, 2019 at 06:49 AM.

  3. #3

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,596

    Re: How to create an instance of a class with a class name?

    Quote Originally Posted by qvb6 View Post
    See CallByName().

    Edit: Never mind, it doesn't work by String representation of a class. Olaf's DirectCom works with classes in DLL's.
    Thank you, qvb6. I need to call internal classes inside my projects, and these projects will not be compiled into COM components.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,596

    Re: How to create an instance of a class with a class name?

    Hi The trick, that's exactly what I need, thank you very much!

  6. #6
    New Member
    Join Date
    May 2019
    Posts
    2

    Re: How to create an instance of a class with a class name?

    thanks to this!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width