Sudden Run-time Error '-2147221504 (80040000)'

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

1
JPB
2/22/2010 9:47:53 PM
vb.general.discussion 1016 articles. 0 followers. Follow

2 Replies
3188 Views

Similar Articles

[PageSpeed] 19

"JPB" <jasonpeterbrown@gmail.com> schrieb im Newsbeitrag
news:d977cbf1-c2d7-40dc-b5a6-95cd66f182ba@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


-1
Schmidt
2/22/2010 10:37:58 PM
Hi Olaf,

On Feb 22, 5:37=A0pm, "Schmidt" <s...@online.de> wrote:
> 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)

Ah! I originally thought that it looked like a dhRichClient3 error
message, but then the code was failing on a standard New keyword line,
so that threw me off ;)

As it turns out, the error was happening further "up the chain" in a
compiled DLL that was using Regfree (since I do the usual RunningInIde
check to switch between standard-reg and dhRichClient3 regfree
depending on the IDE status).

> 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.

And of course, you have diagnosed it correctly - I just added a public
LOGFONT structure to one of my classes.

> In short, this is the only shortcoming compared
> to the alternative, manifest-based regfree-approach.

This is a shortcoming that I am certainly willing to accept!

> 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).

I was just being a bit lazy, I can certainly encapsulate the LOGFONT
stuff in a class, or just restructure the way I was doing things.

Thank you very much for the help, I was starting to pull my hair out
(what little I have left)!

Jason
0
JPB
2/22/2010 11:01:44 PM
Reply:

Similar Artilces:

calculating time #2
What is the formula to calculate time when i must account for the 24 hour time difference. I want my answer to show in hour and minute format. When i try to do this i keep getting some sort of date number in front of my answer. Also, can i calculate a date and time together. Ex. I want to know how many hours from start time of Jan. 2, 04, 8 am to Jan 4, 04, 3 pm thanks Matilda format the cell as Custom [hh]:mm Regards Trevor "matilda" <anonymous@discussions.microsoft.com> wrote in message news:0C3F06C2-1E3F-4487-9264-66D090F2F07F@microsoft.com... > What is the ...

OE 6
My colleague on Windows 2000 has OE 6. Up until recently she has been able to send mail no problem. Now when creating a new message or replying to an existing mail, her OE hangs when starting to type in the address field. We have already rebuilt the address book. It takes around 12 minutes for the email message to become active again ready for the message to be completed. Is this a corruption of OE? You will probably get a faster and more expert answer if you post this to an Outlook Express news group. Try posting in one of these newsgroups: microsoft.public.windows.inetexplorer.ie...

Queries not running
What does it mean when you run a query and do not get results? However, if I create a new query it runs. I have had this db for awhile. Recently I had to replace data in the main table. Checked all fields are there but when I try to run queries it is not generating any data. But there is data in the Main table. Can someone help? Thank you in advance for any help. There are many reasons why a query could yield no results even when there are records in the table. A simple example would be that none of the record match the criteria of the query, or the query has something in its F...

Message Tracking Center Showing Wrong Time
Hi, The Message Tracking Center on Exchange 2003 server is showing the wrong time. It is showing the origination time for messages as exactly one hour ahead (into the future). So, if we sent an email at 11:02 AM, it is reported as 12:02 PM in MTC. We have applied DST updates to our organization and Exchange system servers: 1. Installed Server updates (including Exchange server), 2. Installed Workstation Updates, 3. Installed CDO update for Exchange Server, and 4. Ran Re-basing tool for Exchange calendar appointments and Public Folder Calendars. We had declared our DST prep proje...

Scheduled Backups of Exchg 2003 Don't Run
Anyone else having this problem? I'm using the Windows Backup utility in Server 2003 with Exchange 2003 installed to backup just the Exchange Server Storage Group. If I run the backup manually from within the backup applet, it executes properly. Scheduled, it does not run. In the Scheduler, if I click 'run now' it fails with a 'Could not start'. I've read the MS Knowledge base article about paths with spaces, but that didn't help. At best, the backup window might pops up, but then the process just stops without generating any message. When I'm doing all this I&...

Distribution in time
Hi I have a table containing over 300 records Table contain 4 fields. Unique ID for each field Amount (Field with number) Beginning (dated field) End (date field) I would like to distribute Amounts in time Example let say that for the first record I have 1000$ , the beginning is the first of January 2007 and the end is the 15 of march 2007 1/1/07 to 15/3/07 equal 74 days (counting the last day) Distribution should be like that For January it is : 31 days / 74 days * 1000 = 418.91 For February it is : 28 days / 74 days * 1000 = 378.38 For march it is : 15 days / 74 days * 1000 ...

Not Enough Memory Error
Recently we've started to experience an error when we attempt to open a Contact (E-mail List) within a mailbox. We are getting the following error: "Can't open this item. There is not enough memory available on the Microsoft Exchange Server computer to perform this operation." Memory usage in the task manager on the machine is around 1.4GB, the machine has 2GB of physical memory and is showing 500MB free. Any assistance would be appreciated! Thanks! Honestly, that sounds more like a client error than an Exchange error. Are there any corresponding errors in the eve...

Open .csv file and run a macro?????
I need to run a macro on a .csv file. Presently I open the .csv file, then run the macro. Is there a command line switch that I can use to open the .csv file in excel and execute a macro? - Thanks in advance - Mike -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =----- I did one for a customer recently where I used Workbooks.OpenText Filename:=ActiveWorkbook.Path & "\" & [wbtoget] 'where wbtoget was a named cell with the name o...

code error
Please can anyone help - my PC runs out of memory (I currently have 512) I'm presuming that my code is badly written - can anyone please help with this, code follows: Private Sub CommandButton1_Click() ' Option box allowing user to select relevant ctr filetoopen = Application _ .GetOpenFilename("Excel Files (*.xls), *.xls") If filetoopen <> False Then Workbooks.Open Filename:= _ filetoopen End If Dim strPath As String, strFileName As String strPath = ActiveWorkbook.FullName strFileName = Mid(strPath, InS...

Sales Process Error
I am having problems with sales process on sending emails and tasks. The sales process errors out with the following message - Error code = 80131509. This SqlTransaction has completed; it is no longer usable. I haven't made any changes to the system and it was working fine two days ago. The Event ID in Windows is 16650. We are on SQL 2005 and Windows Server 2003 R2 SP1. Any help would be appreciated. It is a .Net Framework 2.0 issue with SQL Server 2005. Do not be mislead that MSCRM 3.0 is using 1.1. I have had this recently on a couple environments that I support. Check out: - ...

Capturing First Error Message
Hi All, For the following code, I am getting two difference errors. I need to capture the first error message. Please advise how to capture the first error message. I need to log this info in Error_Log table. CODE ===== drop table authors go CREATE TABLE Authors ( AuthorID INT NOT NULL PRIMARY KEY, Name VARCHAR(100) NOT NULL ) GO ALTER TABLE Authors ADD CONSTRAINT pk_authors PRIMARY KEY (AuthorID) GO print @@error ================ Thanks in Advance, Guru Hi Can you use BEGIN ..TRY ..BEGIN CATCH ... to capture the errors? "Guru" <guruprasathb@...

run-time error 35752
I trying to play AVI on form but this error keep appearing "run-time error 35752". ...

Running balance in bank account suddenly wrong!
We went to enter todays transactions into a bank account, and noticed that the running balance was wrong by ~$250 :-| After *hours* of investigation it looks like the 'starting balance' for this account was now ~$250 higher than should have been! We have been on Money since 2001, and when we upgraded to 2004, we archived 2001 - 2002. When we upgraded to 2005 we archived 2003. We can't tell why M2005 *suddenly* decided that the starting balance was wrong, but this cast serious doubt on M2005 reliablity. Has anyone else had this problem? Beware people, beware! ...

Outlook sends same email many times
HI, Occasionally Outlook will send the same email many times to my recipient. I don't know this because the message remains in my outbox with the appearance of not being transmitted. But in fact, Outlook has sent the message to recipient over and over until I deleted it from the outbox. One person received an eight emails, but this same email was still in my outbox. This seems to happen when I have attached a file to the email. This is a real problem... Can anybody help? Thanks in advance. ...

Running on 64-Bit Vista
I have an old MFC application that installs okay for me on 32-bit Vista. However, a customer is telling me they get the following error when they attempt to install the application on 64-bit Vista: "The version of this file is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program, and then contract the software publisher." I believe the program uses old Wise installer software. Does anyone know what is causing this error and how it could be eas...

XP Outlook error "Cannot start Microsoft Outlook..."
After recently installing Office XP 2002 I haven't been able to open Outlook. I used Outlook a lot in my previous Office version and I had very extensive Contact, Calendar, and E-mail folders. The first error told me that Outlook couldn't find my folders and then it shut down. Now when I try to open Outlook, I get an error that says "Cannot start Microsoft Outlook. Could not open the item. Try again." I did some brief checking about it error on other websites and was told that it might have something to do with a missing secur32.dll file? If so, how do I fix tha...

Macro Issue
My VBA skills are limited to using recorded macros, not writing them- so when something won't execute... well, I'm lost. I painstakingly recorded my actions importing 38 small text files, including a clear contents command so that the workbook can be re-used. I have done this successfully in the past. The macro worked after creation once, but not after a save/close workbook. It now stalls at ' .Refresh BackgroundQuery:=False' of the first import as displayed below, with 'run time error 1004 - Application Defined or object - defined error Sub DataImport() ' &...

Error Message
Im running Full MS office 2007 - and with my Outlook 2007 I have just received for the first time an error message after clinking on a hyperlink within the body of an incoming e-mail. The message reads: This operation has been canceled due to restrictions in effect on this computer. Please contact system administrator. This error takes place on my Laptop - Windows - Vista 64-Bit What can I do to correct? TIA, Jim This isn't actually an Outlook error but an issue with IE: http://www.slipstick.com/problems/link_restrict.htm "JMay" <JMay@discussion...

try-catch and @@error
hello, i am having one query in sql server 2008 try catch block. if i am using try-catch, then what is use of using @@error in try block if any exception i can catch in catch block. any help will be truely appreciated. thanks in advance. @@Error is the old way to handle errors in SQL Server. With @@Error you would have to capture that value into another local variable after each operation and then check that value to see if it was non-zero. With a Try-Catch block, you have more control and no longer need @@Error. Instead, you should use ERROR_NUMBER(). From MSDN: In the ...

Error:Email message in CRM client for Outlook
I have the following error message “An error occurred promoting this item to Microsoft CRM. The Microsoft CRM server could not be contacted or the user has insufficient permissions to perform this action. Do you want to send the e-mail? If you click Yes, the e-mail will be sent out, but no corresponding activity will be created in Microsoft CRM.” In the article ( http://support.microsoft.com/kb/925532/ ) the Microsoft give the solution. I have done every steps described in this article but the error continues. Someone can give another solution? Thanks an advance, Paulo Pina On...

Server suddenly "isolates" itself from the network
I have a fully patched SBS 2003 installation. For some reason since about the middle of April it will suddenly isolate itself from the network. By this I mean that while I can get on the console and all seems well, the server cannot see the internet, nor can it see anything on the LAN. Of course, nothing can see it either. My suspicion is ISA, but I suppose it could be the 4-port NIC as well. Has anybody seen this? The only way I can resolve it is to reboot it. No matter of stopping/starting services has any effect. -Jim jtpryan wrote: > I have a fully patched SBS 2003 ...

Error reading win7 64 drive
Hi Folks Duel booting Windows 7 64... Vista Home 64 & Vista Ultimate 64 When I'm in Vista Home 64, and I try to read the Windows 7 drive, explorer immediately crashes. Same thing happens if I boot to Vista Ultimate, explorer crashes when trying to read the Windows 7 drive. I have no problems reading either Vista drive from within Vista. I do not know how long it's been like this, but at one time I had no problem reading any drive from within Vista. If I boot to Windows 7 I can read all three drives fine. Anyone heard of this problem? Anyone know of a fix? I...

Windows Server 2008/Vista Cannot Run GP Macros Automatically
Hello: A couple of weeks back, I had mentioned that I was having trouble running a GP macro automatically in Windows Server 2008 Task Scheduler. After working at great length with Microsoft tech support, I found out why. The Windows Task Scheduler in Windows Server 2008 and Vista will simply not run a GP macro automatically. This is because the Task Scheduler cannot be configured to interact with the desktop. Scheduled Tasks in Windows Server 2003 and XP, however, do allow GP macros to be scheduled to run automatically. I just thought that I would share this info with you all, and I...

TrueCrypt 6.3a
Hi I'm having difficulties compiling TrueCrypt 6.3a, possibly because I'm not quite sure as to how to set up all extra libraries/tools. 1. The PC's specs I was using to compile were: - Pentium 4 w/2gb RAM - WinXP Pro w/s.p.2 - MS Visual C++ 2008 Pro - RSA Security Inc. PKCS #11 Cryptographic Token Interface 2.20 - NASM 2.07 (Win32) installed 2. The things I wasn't sure about were: - For MS Visual C++ 2008 Pro: + was s.p.1 really necessary, or could I've done without? It's just that, as I recall, when I tried to run an upd...

Want to load MSPublisher97 on my laptop running windowsXP. Error.
I'm running Windows XP Home on a Sony VAIO Laptop with Pentium 4 processor Tried to load MSPublisher97 and got the message that it would not load.. the exact wording of the error message is: C:\WINDOWS|SYSTEM32\AUTOEXEC.NT. The system file is not suitable for running MS-DOS and Microsoft Windows applications. Choose "Close" to terminate the application. Any help would be appreciated... I really don't understand since I'm also using MS Office97 and it loaded just fine! Puzzled! Dave Perkins daveylee@daveylee.com Some things to try Disable your virus software...