Solved

"48 File Not Found" for API function

Posted on 2002-03-10
9
513 Views
Last Modified: 2010-05-18
I have a Visual Basic app that runs fine on my Win2000 machine.

However, when I run it on our Win98 machine it bombs.

The problem is a call to a function in the "oleacc.dll".

The error I'm getting is "48 File not found 'oleacc'".

The declare statement is:

Declare Function ObjectFromLresult Lib "oleacc" (ByVal lResult As Long, riid As UUID, ByVal wParam As Long, ppvObject As Any) As Long

  I verified that the file exists on my Win98 machine at "c:\Windows\System\oleacc.dll".

  I changed the declare statement to:

Declare Function ObjectFromLresult Lib "c:\Windows\System\oleacc.dll" (ByVal lResult As Long, riid As UUID, ByVal wParam As Long, ppvObject As Any) As Long

  And I still get the same message (file not found).

  Additional strangeness:

 When I tried to re-register the dll, I get the following message:

 Run: regsvr32 oleacc.dll

 "LoadLibrary ("oleacc.dll") failed. GetLastError returns 0x0000045a"

 I tried UN-registering this dll using "regsvr32 /u" and got the same message.

I'm aware of the KnowledgeBase article:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q191476

  But I don't know if this has anything to do with it.

  Any thoughts out there?
0
Comment
Question by:EasyAim
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6854861
Have you checked out the following article?
WD2002: Run-Time Error 48 "File Not Found" When You Start
Word or Use Add-in (Q286897)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q286897

Anthony
0
 
LVL 39

Expert Comment

by:abel
ID: 6855043
It should not matter to give the whole path or only the filename in the Declare statement. The PATH of the system is searched anyway and first of all the windows and the windows system directory.

If you have VC++ installed you can build your application with debugging symbols (Create Symbolic Debug Info under Compile-properties) and break in when you get the error message. At least you can find what call is causing the error. If that is LoadLibrary with the parameter oleacc.dll, then indeed something is wrong and Windows cannot find the dll. But I doubt that. Most of the times something else causes this error. For example, a missing entry point.
I have Win2k on my system, and the function ObjectFromLresult happens to be in it. If you have Dependency Walker or QuickView on your Win98 system, I'd use it to check the availability of ObjectFromLresult in the exported functions list of the dll.

If this doesn't give any clues, check the versions of this accessibility dll and if different, exchange them and see if the problem still persists.

I'm a little worried that the DllRegisterServer is not available, nor DllUnregisterServer. This means that it is not a genuine, self-registering MS system-dll. I know that not all MS dlls can register themselves, but I also know that this one happens to be able to do register itself.

Btw, are you aware that "This function is designed for internal use by Active Accessibility and is documented for informational purposes only. Neither clients nor servers should call this function."

And last but not least: this all is pretty odd, because the ObjectFromLresult function has been around since the first incarnation of Active Accessibility in Windows 95. You're talking '98. My guess is that there's something seriously wrong with your oleacc.dll.

Regards,
Abel
0
 
LVL 39

Expert Comment

by:abel
ID: 6855048
Btw, are you aware of that you may have to determine before your application runs if AA is installed? See Q244822  for details.

Your worries about Q191476 are ungrounded: both versions, old and new, should have that ObjectFromLresult function.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:EasyAim
ID: 6855255
acperkins,
  I double-double checked that the dll is in the c:\windows\... directory.   Just to be sure I hardcoded the entire path in the declare.


Abel,

Thanks for your reply.

I retrieved the oleacc.dll from a Microsoft site a few weeks ago.  This same dll works fine on my 2000 machine.

I could not find any article "Q244822".  Could you verify your source of that KnowledgeBase article?

Yes, I have seen the notification "This function is designed for internal use by Active Accessibility ...." however, it is the only known method of retrieving the DOM of a WebBrowser control from a window handle.
0
 
LVL 39

Accepted Solution

by:
abel earned 50 total points
ID: 6855666
[I was delayed because EE was inaccessible since Sunday, untill a few minutes ago]

I never tried that (retrieving the DOM through a hWnd) but I guess you are right. And now I just come across Q249232 (HOWTO: Get IHTMLDocument2 from a HWND) and that's probably close to about the same subject. This article does not appear in the current version of MSDN Library, but in the archive I was able to locate it:
(http://support.microsoft.com/default.aspx?scid=kb;EN-US;q249232)

The same is true for Q244822, you find it here:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q244822

Apparently, locally I have an old version of MSDN Library installed.

Back on the subject. If I were you, I should try the installment package provided by MS, instead of just copying the files. In q249232 it is explained how and where to download the MSAA package, but Microsoft is messing with its links and you are redirected to the wrong page. Searching on "download msaa" has the same result: you get back named links that direct to a redirect page that in turn brings you to a place where you don't want to be. The only thing I found is the SDK, which may contain the right files as well, but not necessarily. Thereby, it is a new version, and it is beta. Here's the download link:
http://www.microsoft.com/downloads/release.asp?ReleaseID=30331&area=search&ordinal=2

I've been looking for how the msaa package is built up, but I can't seem to find the right articles (yet).

An easier thing to make sure you really have the right files (W2K files on a W98 system is probably not a good idea, these system are quite different and so are there dlls) is installing the accessibility from the original w98 cd. That shouldn't be to hard, unless you don't have that anymore.

Regards,
Abel
0
 
LVL 39

Expert Comment

by:abel
ID: 6855961
I heard that the emailing system was down, so just to let you know there was an update (hope it works again): ping :)
0
 

Author Comment

by:EasyAim
ID: 6857270
As it turns out, my solution for Win95 and Win98 machines was to remove the newest oleacc.dll version and replace it with an ancient version that I found in some obscure website.

For some reason, when I enabled the Assessiblity Access thing at Start/AddPrograms/System..stuff my application would still not work (but maybe I didn't delete the offending newer oleacc.dll first??).

It sounds like the oleacc.dll is still screwed up in the head and I'm trying to figure out how to work around not using it at all.

Otherwise my setup packages are going to have to be tailored to specific operating systems in an effort to load the correct oleacc.dll.

Anyway, I appreciate your responses.
0
 
LVL 39

Expert Comment

by:abel
ID: 6857306
Thanks for the grade!

> (but maybe I didn't delete the offending newer oleacc.dll first??).
If this was the case, then it also was the reason. Most MS Installers do not overwrite files that are newer then the file they are currently installing. Meaning, that the file will indeed not be replaced when it was still that offending version of Win2k.

>It sounds like the oleacc.dll is still screwed up in the head
Is your problem still around? Or do you mean that you get different error messages now?

Hope you find it out in the end. If you still need help, even though you accepted a comment of me as an answer, I'm still around here.

Cheers,
Abel
0
 

Author Comment

by:EasyAim
ID: 6857551
" >It sounds like the oleacc.dll is still screwed up in the head...  Is your problem still around? Or do you mean that you get different error messages now?"

  What I meant was that it is a poorly designed DLL if I have to go back and grab an old version to get something to work.
  What's sad is that to create a working setup package, I'll have to give a different package depending upon their operating system.

  I hate to instruct my users to install the Assessiblity system package when all I need is one little-bitty DLL to work correctly.
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question