Click to open or copy the Ohello project files.
The Ohello program demonstrates OLE custom interfaces and proper reference counting and shutdown behavior for a multiple-use local server. The program also shows how to use the Win32® registry functions to install a local server and a proxy DLL in the registry.
This sample uses the following keywords:
addref; cocreateinstance; coinitialize; coregisterclassobject; corevokeclassobject; couninitialize; createinstance; decrementlockcount; dispatchmessage; failed; formatmessage; freelibrary; getlasterror; getmessage; getmodulefilenamea; getprocaddress; helloproc; hresult_from_win32; incrementlockcount; interlockeddecrement; interlockedexchange; interlockedincrement; isequalguid; loadlibrarya; localfree; lockserver; main; makelangid; objectcreated; objectdestroyed; postquitmessage; printerrormessage; printf; queryinterface; regclosekey; regcreatekeyexa; regdeletekeya; regflushkey; registerclassfactory; registerlocalserver; registerproxydll; regopenkeyexa; regsetvalueexa; release; revokeclassfactory; sleep; sprintf; stricmp; strlen; succeeded; translatemessage; unregisterlocalserver; unregisterproxydll