Home > Back-end >  C # how COM components outside of the calling process (C)?
C # how COM components outside of the calling process (C)?

Time:09-27

Everybody is good, I use c + + development process of COM component (.exe), now want to write a c # using the end of the service call this component server, don't know how to call, for which the great spirit show ~ ~ thank you!

CodePudding user response:

No one can answer? Don't sink ah ~ ~
Error message is as follows:
Other information: can't type into "System. __ComObject" COM objects cast to interface type "MYServerLib. ModelScheduling", this is the cause of the failure of IID for "{db66681-9 of 9 a4c - 4933 - B56B - A56594E1F5DF}" interface of COM component calls QueryInterface failure due to the following error: do not support the interface (exception from HRESULT: 0 x80004002 (E_NOINTERFACE)),
Key code is as follows:
 
ModelScheduling _ModelScheduling=new ModelScheduling ();
Int a=163;
Int pNumber,
PNumber=_ModelScheduling. Initialization (a);

//object Para;
The object varOut;
The object adding=0;
VarOut=_ModelScheduling. MRun (a, pNumber, adding);

Has been cited ~ ~
  • Related