Well, partly. I found out that it works if I start it in wine "wine app.exe".> I now have a simple ocx and an exe that has nothing else than this ocx > in it. The ocx appears as black circle on white ground in the upper left > corner (right, the wizard made ocx) In Windows it works without a > problem but in wine there's an exception upon creating the ocx. It > happens with both builtin and native msvcrt.dll.Well, the exception will be there in all cases, but it should be handled correctly with native msvcrt, I'd be very suprised if this didn't work. Anyway it should now work with the builtin too, thanks for the detailed report.
But if I start it with "winedbg app.exe" I still get this exception. So after
all it's maybe not an msvcrt fault but a winedbg one. Maybe because
it's catching every exception immediately even if it would be handled later
by the program.
To find out what's going on inside the MFC I added all MFC-sources to my
prg. Here's the new bt with MFC-files (original file names from MSVC6).
The original MFC42.dll is loaded because of the ocx.
.. (rest deleted) ..
Loaded debug information from ELF '/usr/local/lib/wine/msvcrt.dll.so' (0x413e0000)
No debug information in 32bit DLL 'C:\WINDOWS\SYSTEM\MFC42.DLL' (0x5f400000)
Error: Copyfield list mismatch (4<>3): enum CTestocxCtrl::__unnamed struct none
Loaded debug information from 32bit DLL 'C:\WINDOWS\SYSTEM\TESTOCX.OCX' (0x10000000)
No debug information in 32bit DLL 'C:\WINDOWS\SYSTEM\MFC42LOC.DLL' (0x5fd00000)
First chance exception: e06d7363 in 32-bit code (0x400dc135).
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:008f GS:0000
EIP:400dc135 ESP:406e1b50 EBP:406e1ba8 EFLAGS:00200246( - 00 I Z- -P1 )
EAX:406e1b58 EBX:40115d24 ECX:00000000 EDX:406e1b6c
ESI:406e1bdc EDI:406e1be8
Stack dump:
0x406e1b50 (MSVCRT.DLL._gcvt+0x3c0db0): 40898c3c 006bbd58 e06d7363 00000001
0x406e1b60 (MSVCRT.DLL._gcvt+0x3c0dc0): 00000000 400dc0c0 00000003 19930520
0x406e1b70 (MSVCRT.DLL._gcvt+0x3c0dd0): 406e1c48 006c5198 cccccccc cccccccc
0x406e1b80 (MSVCRT.DLL._gcvt+0x3c0de0): cccccccc cccccccc cccccccc cccccccc
0x406e1b90 (MSVCRT.DLL._gcvt+0x3c0df0): cccccccc 004cfd92 406e1bf0 0056f8e5
0x406e1ba0 (MSVCRT.DLL._gcvt+0x3c0e00): 406e1c58 406e1c70 406e1be8 00465989
0x406e1bb0 (MSVCRT.DLL._gcvt+0x3c0e10):
0011: sel=008f base=4012c8e0 limit=00000fff 32-bit rw-
Backtrace:
=>0 0x400dc135 (RaiseException+0x75(code=0xe06d7363, flags=0x1, nbargs=0x3, args=0x406e1bdc) [except.c:84] in libntdll.dll.so) (ebp=406e1ba8)
1 0x00465989 (__CxxThrowException@8+0x39 in C:\IMD\Bin\MFCStatic.exe) (ebp=406e1be8)
2 0x00571c8f (AfxThrowOleException+0xaf(sc=0x80020003) [N:\Temp\MFCStatic\OleMisc.cpp:420] in C:\IMD\Bin\MFCStatic.exe) (ebp=406e1c64)
3 0x005b53d8 (COleDispatchDriver::InvokeHelperV+0x7b8(dwDispID=0xfffffdfa, wFlags=0x406e0004, vtRet=0x406e0000, pvRet=0x0, pbParamInfo=0x406e1e6c, argList=0x406e1f08) [N:\Temp\MFCStatic\OleDisp2.cpp:380] in C:\IMD\Bin\MFCStatic.exe) (ebp=406e1d88)
4 0x004462ef (COleControlSite::InvokeHelperV+0xcf(dwDispID=0xfffffdfa, wFlags=0x4, vtRet=0x0, pvRet=0x0, pbParamInfo=0x406e1e6c, argList=0x406e1f04) [N:\Temp\MFCStatic\OccSite.cpp:976] in C:\IMD\Bin\MFCStatic.exe) (ebp=406e1dfc)
5 0x00446408 (COleControlSite::SetPropertyV+0xc8(dwDispID=0xfffffdfa, vtProp=0x412e000e, argList=0x406e1f04) [N:\Temp\MFCStatic\OccSite.cpp:1008] in C:\IMD\Bin\MFCStatic.exe) (ebp=406e1e74)
6 0x00446618 (COleControlSite::SafeSetProperty+0x58(this=0x412e2e90, dwDispID=0xfffffdfa, vtProp=0x8) [N:\Temp\MFCStatic\OccSite.cpp:1044] in C:\IMD\Bin\MFCStatic.exe) (ebp=406e1ef0)
7 0x00446cc0 (COleControlSite::SetWindowTextA+0x70(lpszString=0x69e350) [N:\Temp\MFCStatic\OccSite.cpp:1149] in C:\IMD\Bin\MFCStatic.exe) (ebp=406e1f58)
8 0x00443b10 (COleControlSite::CreateControl+0x4e0(pWndCtrl=0x412e1090, clsid=0x69e440, lpszWindowName=0x69e350, dwStyle=0x0, ppt=0x406e21d0, psize=0x406e21c8, nID=0x3, pPersist=0x0, bStorage=0x0, bstrLicKey=0x0) [N:\Temp\MFCStatic\OccSite.cpp:270] in C:\IMD\Bin\MFCStatic.exe) (ebp=406e200c)
9 0x0043cc3e (COleControlContainer::CreateControl+0xfe(pWndCtrl=0x412e1090, clsid=0x69e440, lpszWindowName=0x69e350, dwStyle=0x0, ppt=0x406e21d0, psize=0x406e21c8, nID=0x3, pPersist=0x0, bStorage=0x0, bstrLicKey=0x0, ppNewSite=0x0) [N:\Temp\MFCStatic\OccCont.cpp:184] in C:\IMD\Bin\MFCStatic.exe) (ebp=406e20c0)
10 0x0043c310 (CWnd::CreateControl+0xc0(clsid=0x69e440, lpszWindowName=0x69e350, dwStyle=0x0, ppt=0x406e21d0, psize=0x406e21c8, pParentWnd=0x406e2cd4, nID=0x3, pPersist=0x0, bStorage=0x0, bstrLicKey=0x0) [N:\Temp\MFCStatic\OccCont.cpp:77] in C:\IMD\Bin\MFCStatic.exe) (ebp=406e2144)
11 0x0043c213 (CWnd::CreateControl+0x93(clsid=0x69e440, lpszWindowName=0x69e350, dwStyle=0x0, rect=0x406e22e4, pParentWnd=0x406e2cd4, nID=0x3, pPersist=0x0, bStorage=0x0, bstrLicKey=0x0) [N:\Temp\MFCStatic\OccCont.cpp:56] in C:\IMD\Bin\MFCStatic.exe) (ebp=406e21ec)
12 0x00411568 (CTestocx::Create+0x48(lpszClassName=0x0, lpszWindowName=0x69e350, dwStyle=0x0, rect=0x406e22e4, pParentWnd=0x406e2cd4, nID=0x3, pContext=0x0) [n:\temp\mfcstatic\testocx.h:31] in C:\IMD\Bin\MFCStatic.exe) (ebp=406e2268)
13 0x00411429 (CTestExeDlg::OnInitDialog+0xe9 [N:\Temp\MFCStatic\TestExeDlg.cpp:62] in C:\IMD\Bin\MFCStatic.exe) (ebp=406e2304)
.. (rest deleted) ..
0x400dc135 (RaiseException+0x75 [except.c:84] in libntdll.dll.so): leal 0xffffffa8(%ebp),%esp
84 RtlRaiseException( &record );
What is this error that is showing up while loading the files?
Error: Copyfield list mismatch (4<>3): enum CTestocxCtrl::__unnamed struct none
Maybe this has something to do with it. Using wine from cvs 2002-10-11 with all builtin.
bye Fabi
PS: I'm now going away for about one week. If you need more info or sources just let
me know, I will get there when I'm back.