Yes, absolutely. You are pretty much spot on.
It would require using all late bound calls, since we wouldn't want to rebuild the C++ module anytime we wanted to add a new COM object. No a big deal though
The only problem is handling the variety of parameter lists for the method calls. My thinking would be to provide some way to add the parameters to a list or array. I'd hate to have to deal with poking / peeking bytes.. We can be smarter than that.
Something like:
It would require using all late bound calls, since we wouldn't want to rebuild the C++ module anytime we wanted to add a new COM object. No a big deal though
The only problem is handling the variety of parameter lists for the method calls. My thinking would be to provide some way to add the parameters to a list or array. I'd hate to have to deal with poking / peeking bytes.. We can be smarter than that.
Something like:
Extern Function COMCreateArgList:Int() ' returns handle to arg list Function COMAddArg(value:Byte Ptr, ArgType:Int) ' value would be a pointer to the variable containing the data. Variable would be any type ' ArgType would be a constant, indicating the type of pointer. Somewhat similar in principal to a variant type. e.g. ARG_INT, ARG_STRING, ARG_FLOAT... Function COMCallMethod(Handle:Int, MethodName:Byte Ptr, ArgList:Int) ' ArgList could be Null. End Extern