v := CreateOleObject(<Some OLE Automation>);
v.<Some Method>;
How I can work with COM?
10 posts
How?
write a plugin or use the system plugin
How I can work with COM by using system plugin?
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')"
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:
How I can input string correctly?
BUT my string has many #0#0#...#0 in the end.
System::Call "$0->8(w 'Some Text')"
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.