Archive: How I can work with COM?


How I can work with COM?
v := CreateOleObject(<Some OLE Automation>);
v.<Some Method>;


How?


write a plugin or use the system plugin


How I can work with COM by using system plugin?


http://forums.winamp.com/showthread....38#post1445638


Thank you very much

BUT how I can set input/get output BSTR parameter?

Code below does not work:
System::Call "$0->8(t 'Some Text')"


Code below works:


System::Call "$0->8(w 'Some Text')"

BUT my string has many #0#0#...#0 in the end.
How I can input string correctly?

use SysAllocString/SysFreeString when you are working with BSTR's


String again has many #0#0#...#0 in the end


System::Call "oleaut32::SysAllocString(w 'Some Text') w .r1"
System::Call "$0->8(w r1)"

You should treat the value returned by SysAllocString as a pointer (`i`). This way, no conversion will be done by System and the string won't be touched. If it still contains those characters, you can be sure it's because of the functions used and not because of BSTR mistreatment.