COM Type library issue

Hello,

I am trying to implement the PDF batch printing solution shown in a previous post titled "Batch Save as PDF" (#4398).

After pasting in the code and adding the library references, I am getting two warning messages as follows:

Warning1Could not determine the dependencies of the COM reference "SolidEdgeDraft". Type mismatch. (Exception from HRESULT: 0x8002802A (TYPE_E_WRONGTYPEKIND))PDF Maker

Warning2Could not determine the dependencies of the COM reference "SolidEdgeAssembly". Type mismatch. (Exception from HRESULT: 0x8002802A (TYPE_E_WRONGTYPEKIND))PDF Maker

The assumption I am making is that something is out of date or not present as a converted interop library?

Suggestions appreciated, I am new to all this COM interop! Programming in C#.

Thanks,Ted

 

 

 

Posted by: Theodore Langevin
Post date: 12/21/2011 5:00:38 AM

7 REPLIES

RE: COM Type library issue

!! Yes !

the same here with VisualStudio2010 and ST4MP2 and Part/Assembly references !!!

who's next ?

 

Posted by: Linus Hechinger
Post date: 1/15/2012 11:14:45 PM

RE: COM Type library issue

I have the same problem too !!

 

Posted by: gauthier chauvin
Post date: 1/16/2012 3:50:34 AM

RE: COM Type library issue

If I compile my project on 32 bits computer, I haven't this kind of waring and my DLL -VB .NET) is working well.

If I register the same dll on x64 computer, I get tihs kind of error, I don't know the origin :

"Un objet COM qui a été séparé de son RCW sous-jacent ne peut pas être utilisé."

we can translate it like : A COM object that has been separated from its underlying RCW can not be used.

 

any idea ? is there something special about x64 compilation for ST4 ?

 

 

Posted by: gauthier chauvin
Post date: 1/16/2012 7:37:26 AM

RE: COM Type library issue

I got some feedback from my reseller. It might be a .NET version issue. He recommended that I try targeting .NET 3.5 and .NET 2.0 instead of .NET 4.0 as I am doing now. I haven't had a chance to try it, but it sounds like it might be an issue worth investigating. I will post again when I have had a chance to test.

 

Posted by: Theodore Langevin
Post date: 1/16/2012 9:15:26 AM

RE: COM Type library issue

 

I solved my problem by compile my project with Framework 4.0 and by using the SDK tool to generate the interop assemblies.

 

 

 

Posted by: gauthier chauvin
Post date: 1/16/2012 9:22:17 AM

RE: COM Type library issue

I believe this is the same problem being discussed in the private customer forums.  Here is my response:

 

I believe this is a genuine bug...

 

Comparing the IDL from base ST4 to ST4 MP2, the following 'importlib' statements are missing in Part.tlb!

 

// TLib :     // TLib : Solid Edge FrameworkSupport Type Library : {943AC5C6-F4DB-11D1-BE00-080036B4D502}

importlib("fwksupp.tlb");

// TLib : OLE Automation : {00020430-0000-0000-C000-000000000046}

importlib("stdole2.tlb");

// TLib : Solid Edge Geometry Type Library : {3E2B3BE1-F0B9-11D1-BDFD-080036B4D502}

importlib("geometry.tlb");

// TLib : Solid Edge Framework Type Library : {8A7EFA3A-F000-11D1-BDFC-080036B4D502}

importlib("framewrk.tlb");

 

Someone needs to submit an IR with GTAC with high priority... 

 

 

Someone followed up and submitted IR6648315 which got converted to PR6648315.  I also wrote:

In native C++, we get a compiler error C4772.  The worst part?  You can't even compile...

 

http://msdn.microsoft.com/en-us/lib....100).aspx

"This warning is, by default, issued as an error. C4772 can not be suppressed with /W0."

 

I think .NET stuff still works.  You just get warnings.

 

 

 

Posted by: Jason Newell
Post date: 1/16/2012 11:13:43 AM

RE: COM Type library issue

Sounds very similar (if not the same as) the problems I have had when installing MP01 on ST4:

 

http://www.jasonnewell.net/Community/Forums/tabid/55/aft/4588/Default.aspx#4866

 

The only solution suggested there was also related to targeting .NET Framework v4 instead of the v3.5 that worked without MP01 installed. - However, I had such a time trying to get it compiling our C++ code at the time, that we haven't bothered to try again using MP01 or MP02....

 

I'm glad I'm not the only one to be convinced this is a bug, though!

 

Thanks,

 

Posted by: chris mann
Post date: 1/18/2012 10:52:34 PM