Q:

Sample code for using IBM's PCOMM in C# o write an as400 screenscraper

Has anybody used C# to write a sample screen scraper for IBM as400? 

A:

When using interop. AutOIATypeLibrary and interop. AutPSTypeLibrary for building a class library.  It throws error as below
Unable to cast COM object of type 'AutPSTypeLibrary. AutPSClass' to interface type 'AutPSTypeLibrary. IAutPS'.  This operation failed because the QueryInterface call on the COM component for the interface with IID '{891FC4A1-7DD8-11D0-9112-0004AC3617E1}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))
I am using VS2017, Framework 4.5.  Interop Dlls are registered using regasm.exe in framework64, Reference added
Above Dlls works fine, while creating project with Console Application/Win form application.