Answer the question
In order to leave comments, you need to log in
How to call the com method of an object in Delphi, the name of which is unknown at the time of writing the program?
Hello everybody!
I know and understand how to access the methods and properties of the ole-object. On the example of a KKM driver from Shtrikh-M
v:=CreateOleObject(‘AddIn.DrvFR’);
v.Password:=30;
v.Quantity:=1000;
v.Sale;
obj.PropertySet('Password','30');
obj.ExecMethod('Sale');
Answer the question
In order to leave comments, you need to log in
In general, the issue is resolved. Using the IDispatch methods (which is the result of CreateOleObject), you can find out what methods and properties are available in the pluggable COM object and use Invoke further
Speaking of 1C, do you obviously mean the technology of external components? Then we are not talking about "any DLL", but about one written according to very specific rules and conventions. If I remember correctly, there must be predefined properties and methods through which you can get a list of other properties and methods. All this is described somewhere on the ITS with examples.
So if you mean some incomprehensible objects in general, then the answer is no way. If it is quite specific, written according to the rules known to you, then the answer is - study these rules, the structure of these objects of yours.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question