From: JPB on 22 Feb 2010 16:47 Hi, I just opened a project that I haven't worked on in a couple of days, and suddenly when I try to run or compile I get an error in any code that tries to create a new object from one of my ActiveX DLLs (also contained in the project, project compatibility set). The error is: Run-time error '-2147221504 (80040000)': No Permission (probably unregistered Types in the Interface-Def) The line is just: Set so_Lib = New SL5RfStock.CLibs The code never gets to the Class_Initialize event of SL5RfStock.CLibs. I've tried compiling the SL5RfStock.dll outside of the project group (including with No Compatibility set and then resetting the reference on all of the other projects that depend on it), but this hasn't helped. Has anyone every encountered this, and know of any way to fix it? Thanks in advance for any help. Jason
From: Schmidt on 22 Feb 2010 17:37 "JPB" <jasonpeterbrown(a)gmail.com> schrieb im Newsbeitrag news:d977cbf1-c2d7-40dc-b5a6-95cd66f182ba(a)g28g2000yqh.googlegroups.com... > I just opened a project that I haven't worked on in a > couple of days, and suddenly when I try to run or > compile I get an error in any code that tries to create > a new object from one of my ActiveX DLLs (also > contained in the project, project compatibility set). > > The error is: > Run-time error '-2147221504 (80040000)': > No Permission (probably unregistered Types in the > Interface-Def) > The code never gets to the Class_Initialize event of > SL5RfStock.CLibs. Um, sounds familiar to me <g> - because that is an Error which is originated (and thrown) from within DirectCOM.dll. (indirectly, over the GetInstanceLastError-Call) And the reason for this error is probably, because... erhm - maybe someone has introduced Public UDTs into the interfaces of the Dll-Class which needs to get instantiated regfree. In short, this is the only shortcoming compared to the alternative, manifest-based regfree-approach. Public UDTs in *.bas modules (within that Dll) are fine of course, but Public TypeDefs at Class-Level cause an unwanted Registry-Lookup which I cannot avoid, because this lookup is performed under the hood (within the ActiveX-Dll-export: DllGetClassObject of the "to-be-instantiated" Dll itself). This has (probably) to do with preparations for *eventual* OLE-marshaling, to know these "non OLE-Standard" parameter-types beforehand (should the Dll be used OutOfProcess and to get the Parameter-Transport correct in this case). Public Enums in Class-Defintions and in the Interface of Public Methods and Properties are fine though. So please take another look (with the above in mind) - and if there *are* Class-Public-UDTs indeed, then just ask, if you are badly in need for them - I'm sure we can come up with a performant enough workaround - but maybe it's not that critical and you find a "cheap" alternative, based on simple Types (Variants, Strings, Arrays of BaseTypes - or Even ClassType-parameters). Olaf
|
Pages: 1 Prev: Outlook 2007 and second inbox created Next: Sudden Run-time Error '-2147221504 (80040000)' |