mardi 27 octobre 2015

Type.GetTypeFromProgID returns null

My application connects to third party COM components and make use of the APIs exposed by the COM component.

var instanceType = Type.GetTypeFromProgID("EXTERNALAPPLICATION");
if(instanceType!=null)
var workSet= Activator.CreateInstance(instanceType, false) as IWorkSet; 

The GetTypeFromProgID return null and I am unable to create any instance out of that.

But, If I enable visual studio hosting process at project properties--> Debug menu, .vshost.exe is created. After that, It returns the instanceType properly. Am I missing something?





Aucun commentaire:

Enregistrer un commentaire