Hello Guest it is May 17, 2021, 06:51:35 PM

Author Topic: mcGetInstance in API from c#  (Read 387 times)

0 Members and 1 Guest are viewing this topic.

mcGetInstance in API from c#
« on: May 31, 2019, 07:31:30 AM »
hi ,i create Lister that will run list of programs from c# application
i can connect the dll ,no problem
but i dont see the function "mcGetInstance" in the API
how i get the current instance

Offline smurph

  • *
  •  1,402 1,402
  • "That there... that's an RV."
    • View Profile
Re: mcGetInstance in API from c#
« Reply #1 on: June 14, 2019, 12:34:38 PM »
There is no mcGetInstance() in the C API.  That is a LUA only function call so that there is a way to know what instance of Mach called the embedded script.  With C/C++, C#, and VB, you (the programmer) must specify the instance with which to operate.  Mach Hobby only has one instance; instance zero.  So...  in your case, use 0 for the instance.