Solved

"48 File Not Found" for API function

Posted on 2002-03-10
9
495 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
  • 5
  • 3
9 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:EasyAim
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 39

Accepted Solution

by:
abel earned 50 total points
Comment Utility
[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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
" >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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now