c# - Possible consequences of duplicate ProgId for different classes -


in software i'm maintaining i've observed com classes marked identical [progid]s.

afaik progid human readable identifier component , should map 1-to-1 component's clsid.

so i'm wondering:

  • is there reason have same progid different classes?

  • what possible consequences? (except not being able reach component using convenient way)

thanks in advance.

a progid provides friendly name clsid guid of coclass. important scripting languages, no way know guid. used languages support late binding, vb.net , c#. conversion string guid happens @ runtime. usual name of factory function createobject(), language runtime implements looking @ registry entry stored in hklm\software\classes.

which cue go wrong when duplicate them. actual object client program creates random. whichever 1 happened registered last. client program calls different method 1 intended call. might trigger disp_e_xxxx error return that's no guarantee. in general nasty , quite undebuggable mishap.

the way can not have problem when client code uses binding , uses type library know guids. that's not unusual not in control. if know client code doesn't use them omit [progid] attribute no accidents can happen.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -