Hello Guest it is April 19, 2024, 10:11:57 PM

Author Topic: mcGetInstance in API from c#  (Read 997 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,546 1,546
  • "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. 

Steve