cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Poor performance of COM-component
Poor performance of COM-component
Apr 25, 2016 at 9:49pm UTC
vlad1977
(1)
Hi ALL! I've faced the following issue while programming C++/COM:
1) there is C++ code, let's say it's inside the function void f1();
2) there is inproc DLL COM-component, that is wrapper for code mentioned above, something like
STDMETHODIMP component::run()
{
f1();
return S_OK;
}
I found that original f1() being called from statically linked program works 3-4 times faster, than run() call:
#import "path\\to\\dll\\component.dll"
int _tmain(int argc, _TCHAR* argv[])
{
CoInitialize( NULL );
CComQIPtr<component> ptr;
ptr.CoCreateInstance( OLESTR( "component.progID" ) );
ptr->run();
}
The question is it possible to increase performance of calling COM interface function run()? If yes, how?
Topic archived. No new replies allowed.