15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Win32s exceptions

Lee Thompson -- lee@usa.nai.net
Thursday, January 25, 1996

Hi everyone,

Using MSVC 4.0 && Win95  -  Remote Win3.1 && Win32s 1.3

Has anyone run into this?  I have an app using CRichEdit views, doc etc. 
that works fine under win95.  When trying it under win32s it works fine 
except when I try to open a file.  On pressing OK in file open dialog 
win3.1 closes immediately to dos prompt.

Attempts to debug are difficult because program compiled for debug works 
fine!  Compiling the app for release and running it with remote 
debugging results in the message:
 "Unhandled exception in app.exe 0xC0000005: Access Violation"
I have discovered that the problem only occurs when using MFC in shared 
dll.  Use MFC in static library and the problem goes away for debug and 
release copies!

Also I have tried:

1) Win32s from Visual C 4.0 CD - used the setup etc. just as they are, 
   including OLE
2) Latest PW1118.exe(or whatever it is) for Win32s downloaded from    
   Microsoft(I'm not sure if it has even changed, but I tried it anyway)
3) Moved Wordpad (both the copy from Win95 and from the samples) to the 
   remote machine. - It gives the same error when opening files

Hoping someone has an idea,

Lee



Niels Ull Jacobsen -- nuj@kruger.dk
Monday, January 29, 1996

[Mini-digest: 2 responses]

> Using MSVC 4.0 && Win95  -  Remote Win3.1 && Win32s 1.3
> 
> Has anyone run into this?  I have an app using CRichEdit views, doc etc. 
> that works fine under win95.  When trying it under win32s it works fine 
> except when I try to open a file.  On pressing OK in file open dialog 
> win3.1 closes immediately to dos prompt.
> 
> Attempts to debug are difficult because program compiled for debug works 
> fine!

How about when you compile it in release mode, but *with* debug info?


>  Compiling the app for release and running it with remote 
> debugging results in the message:
>  "Unhandled exception in app.exe 0xC0000005: Access Violation"
> I have discovered that the problem only occurs when using MFC in shared 
> dll.  Use MFC in static library and the problem goes away for debug and 
> release copies!
> 
> Also I have tried:
> 
> 1) Win32s from Visual C 4.0 CD - used the setup etc. just as they are, 
>    including OLE
> 2) Latest PW1118.exe(or whatever it is) for Win32s downloaded from    
>    Microsoft(I'm not sure if it has even changed, but I tried it anyway)
> 3) Moved Wordpad (both the copy from Win95 and from the samples) to the 
>    remote machine. - It gives the same error when opening files
> 
> Hoping someone has an idea,

Are you using the correct msvcrt40.dll (special version for win32s)?

Have you run 
regsvr32 /s mfc40.dll
regsvr32 /s olepro32.dll (for OLE controls)

as per the readme, setup, Using MFC and OLE on win32s?

Don't know if this will solve your problems though..  We're about to
do the same thing, so I would be grateful for any info you come
across..

> Lee


--
Niels Ull Jacobsen, Kruger A/S

Everything stated herein is THE OFFICIAL POLICY of the entire Kruger
group and should be taken as legally binding in every respect. Pigs
will grow wings and fly.

-----From: beriksen@cda.com

     See Microsoft's Knowledge Base item #Q141417.  This is a know bug 
     w/mfc on Win32s.  The KB article gives all details for an appropriate 
     work-around.
     
     (The problem is that there's a bug with the 
     CDocManager::OpenDocumentFile() function that crashes on Win32s in 
     release mode.)
     
     Brian Eriksen




| Вернуться в корень Архива |