Thanks for your help.
It seems that I also need to define the interface again in QM.
With the following code, the member functions can be displayed using the dot notation. However, I want to be able to call the function using "mc.Add" in any QM macro. Is there anything else I need to do to achieve this?
Function Com_Demo_T2
My ultimate goal is to be able to use the loaded class and its functions in any QM macro or function, and for it to continue working even after generating an EXE. Is this possible?
The reason for this idea is that I have too many C# code functions. If I add each function as a separate DLL resource, I have to load each DLL file separately for every function call, and then invoke it, which results in high resource overhead. Therefore, I want to generate all these C# functions into a single DLL, and then execute them using the method mentioned above. This would be much more convenient.
It seems that I also need to define the interface again in QM.
With the following code, the member functions can be displayed using the dot notation. However, I want to be able to call the function using "mc.Add" in any QM macro. Is there anything else I need to do to achieve this?
Function Com_Demo_T2
interface# IMyComClass :IDispatch
,#Add(a b)
,{12345678-1234-4321-ABCD-1234567890AB}
CsScript x.Load("$qm$\MyCom.dll")
IMyComClass mc=x.CreateObject("ComDemo.MyComClass")
out mc.Add(7,8)My ultimate goal is to be able to use the loaded class and its functions in any QM macro or function, and for it to continue working even after generating an EXE. Is this possible?
The reason for this idea is that I have too many C# code functions. If I add each function as a separate DLL resource, I have to load each DLL file separately for every function call, and then invoke it, which results in high resource overhead. Therefore, I want to generate all these C# functions into a single DLL, and then execute them using the method mentioned above. This would be much more convenient.
