I'm running VB5(SP3) Professional on Win95(SP1).
My program uses an API call to open Notepad. I discovered that after
opening Notepad, attempts to open the CommonDialog box in ShowOpen,
ShowSave, or ShowPrint would fail. It's not a fatal error; that is, it
doesn't crash the program. The box simply fails to open. If put in an
On Error trap, I can see that error 32768 is generated. When in
ShowPrint mode, I also got a message box with exclamation point but no
message. (Apparently it's trying to show Err.Description, which is
Empty.)
After a good deal of experimenting, I discovered that I could cause
the same failure by opening Notepad, Wordpad, or Paint from the Win 95
desktop. If I opened any of these while a VB5-compiled EXE program is
running, or while the VB IDE is running, attempts to open the
CommonDialog would fail from the time I open one of them until I end
the EXE or shut down the IDE and restart. Starting Notepad within the
program with several different API calls gave the same result, as did
opening the Common Dialog box directly with an API call.
I discovered that this wasn't happening on my notebook computer, which
I thought had the same operating system revisions. I carefully checked
comdlg32.dll, comdlg32.ocx, commdlg.dll, shell32.dll, kernel32.dll,
user32.dll, gdi32.dll, and advapi32.dll, and found them to be
identical on both machines. (These are the dlls on which Notepad.EXE
and comdlg32.dll depend.)
I reinstalled the Win95 SP1 and some other Win95 updates, and VB SP3,
with no effect.
Finally, I reinstalled Windows 95 from scratch on my desktop machine
-- the one giving the problem -- and told it to overwrite newer files.
The problem was solved! I re-installed the Win95 and VB updates, and
still no problem. A check of the \Windows\System directory shows 24
files which have changed, of which 9 are DLLs. I suspect that one of
these was the culprit. But I've already spent several days (and
nights) working on this, and I'm not interested enough to spend more
time to see which one or ones were the actual cause.
The bottom line is that, in my case at least, it was a Win95 system
problem, and wasn't directly related to VB (except that only
VB-compiled programs seem to have the CommonDialog problem as a
result). There surely could be other causes of error 32768, but I'd
definitely start looking for it in the operating system.
I hope this will help someone in the future to short-circuit some of
the trial and error I've just been through.
Roy Lewallen
The problem is error number 32768 when trying to use the CommonDialog
box in ShowOpen, ShowSave, or ShowPrint modes. In my case, I found
that this error would occur in my VB5(SP3) programs, either compiled
or in the IDE, after Notepad, Wordpad, or Paint was opened while the
program was running (for an EXE) or while loaded into the IDE. My
operating system is Win95(SP1). I finally cured the problem by
reinstalling Win95 from scratch. Afterward, I compared files in the
\Windows\System directory with copies I saved before the
reinstallation. This led to finding the file which causes the problem.
The culprit was definitely OLEAUT32.DLL. The version which caused the
trouble is version 2.20.4122 (determined by right-clicking it with
Explorer and then clicking Properties), 503,808 bytes, 5-11-98, 8:01
pm. The good one is an older version, 2.20.4118, 492,304 bytes,
5-19-97, 8:08 am. I can make the problem come and go by installing one
file or the other. Some research in the Microsoft knowledge base shows
that 2.20.4118 is installed by VB5 SP2 and SP3 (which I've installed).
I'm not sure how I picked up 2.20.4122, but suspect it may have been
installed by Word 97 or an upgrade to it. I haven't reinstalled it or
any Word upgrade since reinstalling Windows. There apparently have
been a lot of problems with OLEAUT32.DLL -- a knowledge base search
got 162 hits. I only found one reference to 2.20.4122, and that's that
it's part of the original Win98 installation! (However, I tried my
son's Win98 system, and it has version 2.40.4268. The problem doesn't
occur on his system.) There's apparently a way to get an even newer
version of this DLL, but it's available from the Microsoft web
download facility. And the only way you can get it is to first install
Internet Explorer 5. No, thanks! If you're interested, see
http://support/microsoft.com/support/kb/articles/q214/8/45.asp
(article Q214845).
There might be other causes of error 32768, but if you or a customer
is seeing this problem, you might check for OLEAUT32.DLL v. 2.20.4122
in the \WINDOWS\SYSTEM directory. That's what did it to me.
Roy Lewallen