Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


"48 File Not Found" for API function

Posted on 2002-03-10
Medium Priority
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:


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

  Any thoughts out there?
Question by:EasyAim
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
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)

LVL 39

Expert Comment

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.

LVL 39

Expert Comment

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.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 6855255
  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.


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

Accepted Solution

abel earned 200 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:

The same is true for Q244822, you find it here:

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:

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.

LVL 39

Expert Comment

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

Author Comment

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

Expert Comment

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.


Author Comment

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.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

610 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