Razvan Atim
posted this on October 05, 2011 21:16
If you develop in a managed language like C# or VB the default target platform is Any CPU, your application is compiled to run on any platform and needs to load specific x86 or x64 native dependencies at runtime. Also if you reference COM libraries you’ll have to register the correct versions on the client system or setup registration free COM deployment.
To simplify these scenarios, we now include a managed assembly ScreenScraper.dll that you can reference directly in your project. Using the namespace ScreenScraper, all interfaces are accessible the same way as in COM. You only need to change the way you instantiate our objects, instead of using new use the ComFactory class.
For example, instead of:
TextCaptureX textCapture = new TextCaptureX();
you should write:
TextCaptureX textCapture = ComFactory.Instance.NewTextCaptureX();
There are separate methods for each object that you can instantiate. See the code samples project on GitHub for more examples.
When you are ready for deployment just copy all our native DLLs to the output folder, next to your EXE file.
If you use Visual Studio 2010 or later, an even easier method of development and deployment is to use the NuGet package manager. Just install our ScreenScraper package and everything will be automatically setup for you.
Comments latest first
Hi Razvan,
Your support is a big disappointment for me. I have already written to you about my problem with my solution deployment. I have got no response. Now I can see that my requests were even deleted.
1) about your tip to place all dlls from REDISTRIBUTABLES.txt next to the exe output of my program. No. This is not a good tip. Consider this: In situations when you have more than one program which you need to install on the production machine. How do you activate all that versions? Will they have repeated records in registry?
And such a small info: This tip does NOT work at all. In my development machine my SSSystemObj_x64.dll is installed in Computer\HKEY_CLASSES_ROOT\CLSID\{very long CLSID }\inprocServer32
I have installed my solution on production machine. I have activated these dlls. SSSystemObj_x64.dll is now installed in Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
Installer\UserData\ ....
MY application does not work at all. Unhandled Exception: Retrieving the COM Class factory for component (very long CLSID) failed due to the following error: 80040154 Class not registered ...
Please help me as soon as possible.
Tom
I am unable to redistribute ScreenSraper dlls. Nugget package is not current. My current installed version is 4.0.4374.24127 but screeSraper version from nugget package is only 4.0.4360.26870. So it is useless.