Click to open or copy the IPDRIVE project files.
IPDRIVE is a simple Automation (formerly OLE Automation) client application that drives the INPROC sample application. It tests the functionality provided by INPROC, an Automation in-process server. IPDRIVE can drive both the in-process version and the out-of-process or local server version of INPROC, demonstrating the performance advantages of in-process components. See the INPROC sample for more information.
To run IPDRIVE, you must first build and register the INPROC sample. Then, when you run IPDRIVE, it will load the INPROC sample and create a variant map object that you can manipulate using IPDRIVE's interface.
A variant map object is much like MFC's CMap collection. It is used to map one arbitrary value to another arbitrary value. Each value is a VARIANT, which consists of a type and a value. IPDRIVE's user interface allows you to access both the type and the value. Any type/value pair can be mapped to any other type/value pair.
IPDRIVE also provides two buttons, Test1 and Test2, which can be used to test the performance of the INPROC server application. For the most part, these functions test the function call overhead of automation. Function call overhead is expected to be much greater with the local server versions of INPROC than with the in-process versions of INPROC. A local server runs in its own address space as a separate executable. As such, it requires a remote procedure call (RPC) to access the methods and properties of its objects. An in-process server, however, loads as a DLL in the client's address space and does not require an RPC. Both the Test1 and Test2 buttons execute for exactly five seconds, then display the number of calls. The more calls, the better the performance.
INPROC also contains a simpler collection (a string array), which is not exercised by IPDRIVE.
This sample demonstrates the following keywords:
AfxMessageBox; AfxOleInit; AfxThrowUserException; CArchive::IsStoring; CComboBox::GetCurSel; CComboBox::SetCurSel; CControlBar::EnableDocking; CControlBar::GetBarStyle; CControlBar::SetBarStyle; CDialog::DoModal; CDocument::OnNewDocument; CFrameWnd::DockControlBar; CFrameWnd::EnableDocking; CObject::AssertValid; CObject::Dump; CObject::Serialize; COleDispatchDriver::GetProperty; COleDispatchDriver::InvokeHelper; COleDispatchDriver::SetProperty; CScrollView::ResizeParentToFit; CStatusBar::Create; CStatusBar::SetIndicators; CString::AllocSysString; CString::Format; CString::GetBuffer; CString::LoadString; CString::ReleaseBuffer; CToolBar::Create; CToolBar::LoadBitmap; CToolBar::SetButtons; CView::GetDocument; CView::OnInitialUpdate; CWinApp::AddDocTemplate; CWinApp::Enable3dControls; CWinApp::InitInstance; CWinApp::LoadStdProfileSettings; CWinApp::OnFileNew; CWinApp::SetDialogBkColor; CWnd::DoDataExchange; CWnd::GetDlgItem; CWnd::GetParentFrame; CWnd::GetWindowText; CWnd::OnCreate; CWnd::SetDlgItemText; CWnd::SetWindowText; DragAcceptFiles; GetKeyState; GetTickCount; max; wsprintf