Click to open or copy the Hellctrl project files.
The Hellctrl sample is a vtable-binding Automation controller that controls the Hello sample.
Hellctrl uses CoCreateInstance to create an instance of Hello and obtains its IHello interface using Hellctrl. It then calls the methods of the IHello interface to access the properties and methods of the Hello object. Rich Error information is obtained by accessing the IErrorInfo interface.
This sample uses the following keywords:
cocreateinstance; converttoansi; converttounicode; createwindow; declare_interface_; define_guid; defwindowproc; dispatchmessage; displayerror; enablemenuitem; failed; from_ole_string; get_hellomessage; get_wm_command_cmd; get_wm_command_hwnd; get_wm_command_id; getdescription; geterrorinfo; getmessage; initapplication; initinstance; interfacesupportserrorinfo; loadcursor; loadicon; loadstring; messagebox; multibytetowidechar; oleinitialize; oleuninitialize; postquitmessage; put_visible; queryinterface; registerclass; release; sayhello; setmessagequeue; showwindow; stdmethod; stdmethod_; sysfreestring; text; to_ole_string; translatemessage; updatewindow; widechartomultibyte