DVDR-DL fails on write from data, but not from image
Using the imapi2sample, I get an E_FAIL from
IDiscFormat2Data::Write()when trying to burn some files to a DVD+R DL (e.g. imapi2sample.exe -write c:\users\raptor2lavbb8\AppData\Roaming\temp\burn )
It works ok with other media types and works ok to DL on other drives. So, how can I further diagnose what the problem is (beyond E_FAIL) ?
[392 byte] By [
foobarX] at [2008-3-1]
i'd start by putting a breakpoint on imapi2sample::DataWriter, which appears to be the function that does the most work and see which IMAPIv2 API is returning E_FAIL...that should help narrow down where the error is coming from...
if you get that information and need some help or have more questions, please feel free to ask!
Garrett Jacobson
SDE, Optical Platform Group
That is exactly what I gave you in the original post! :-)
imapi2sample.cpp, line 1801 (in DataWriter() ):
hr = dataWriter->Write(dataStream);
This returns E_FAIL
Hey foobarX,
I'm extremely sorry, I must have misread the details in the post :)
So, the first thing I'd say to try is that since all of the IDiscRecorder2 and IDiscFormat2Data functions are public, you could put a breakpoint on the entire list of them and see if any of them are returning a failure, since IDiscFormat2Data::Write uses a lot of it's own public APIs. This will help narrow down if it's something generic that's failing or if it's something specific to the Write function...
Since I've spent some time tracking these kinds of issues down, I'd focus on functions which are very drive/media specific like get_CurrentMediaStatus, get_TotalSectorsOnMedia, SetWriteSpeed, and try getting some mode pages (maybe the write page parameters) and see if any of these functions are returning errors. If they are, we have somewhere to start.....otherwise we'll have to come up with something else....
Let me know what you find...
Garrett Jacobson
SDE, Optical Platform Group
Hi Garrett,
I'm a little bit confused. I don't have source code to IDiscFormat2Data. Are you saying that I should put break points on the abstract base class in imapi2.h ?
MIDL_INTERFACE("27354153-9F64-5B0F-8F00-5D77AFBE261E")
IDiscFormat2Data : public IDiscFormat2
{
I did step through all the code leading up to the failure, and there were no other failures up to that point...
I realize you don't have source code, so you can't step through IDiscFormat2Data::Write per-se, but I'm saying that some of the functions it calls that could be failing are the same public APIs you could be calling in the interface, so you could break on those (IDiscFormat2Data::* and IDiscRecorder2::* using a command like bm in windbg) and watch what they return. This may or may not find the function that is returning E_FAIL.
Additionally, if you wanted to be extremely thorough, you could step through the assembly code for IDiscFormat2Data::Write and look at the EAX register immediately after a 'call' instruction to see which call instruction is returning E_FAIL. This will indicate exactly what function (although it won't mean much to you) is returning E_FAIL. If you report that information here (the address of the call instruction and the address it's calilng into), it may able to help track down the failure....
As a possibly better option, I'm going to try and put together a post on how to capture a software trace of IMAPI2. This would allow you to capture a software trace that you could send to me and I may be able to locate the failure for you. However, it may take me a while for me to put together the information and make sure the required tools are available to everyone, etc....
please let me know if i can be of any more assistance in the mean time! :)
Garrett Jacobson
SDE, Optical Platform Group
Ok, thanks for explaining - I stick mostly to app debuggers - it's been a while since I've used softice! :-)
No problem foobarX!
WinDBG is another good debugger which is freely available on MSDN (and i'm much more familiar with commands in it if you need help :))
Also, if you want to follow my new post in this forum about capturing a software trace, I can try and help you analyze the problem that way. If you get one, let me know and I'll give you an email address to send it to...
Hey Garrett,
I replied to the trace thread.
I used it during a run of the imapi sample for this drive/media:
Recorder 0: MATSHITA BD-MLT UJ-210S ( H:\ ) (IMAPI_MEDIA_TYPE_DVDPLUSR_DUALLAYER)
Still trying to dig up windbg/msdn...
Garrett and crew determined that it looks like the drive's firmware is not handling the instructions that get passed to it when IDiscFormat2Data::put_ForceMediaToBeClosed() is called.
So, until we get feedback from Matsushita's engineering our workaround was to not close the media.
But would not writing from an image actually close the session? Or is that a seperate thread altogether?
Writing a stream to the disc only closes the disc if the property above has been properly set. We wanted to allow people the flexibility to leave the disc open if they wanted...
Please let me know if you have any further questions!
thanks,
Garrett Jacobson
SDE, Optical Platform Group
The sample fails for me too ...
I have a panasonic DVD-RW DVR111D. This sample fails on all types of media, CDR/RW, DVDR/RW, DVD-DL R/RW ... :(
C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\WinBase\imapi\imapi
Debug>imapi2sample -write c:\windows\explorer.exe -drive 0
Adding c:\windows\explorer.exe - Time: 00:00:00
Supported file systems: ISO9660 Joliet UDF
Number of Files: 1
Number of Directorys: 1
Image ready to write
Failed to write stream
default error
Returned 80070006: T
DataWriter FAILED for drive index 0
Returned 80070006: T
- Total Time: 00:00:03
Returned 80070006: T
I did trace on to this .. took awhile to watch behavior .. things worked all the way to the point after exclusive access was delivered and then some SQM reporting code got triggered and then deviceIO ... there was no error on the files imported, the ability to create files on the target device all passed .. when it came to crunch time this failed.
i copied most of the interesting snips taken at key stack change intervals up through the last call which returned me took me back to my code
0:000> t
eax=80070006 ebx=7ffde000 ecx=2077e96f edx=ffffffff esi=0012fb74 edi=0012fdc4
eip=6e37aaea esp=0012fb68 ebp=0012fdc4 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2!CMsftDiscFormat2Data::Write+0x24ee:
6e37aaea c20800 ret 8
0:000> t
eax=80070006 ebx=7ffde000 ecx=2077e96f edx=ffffffff esi=0012fb74 edi=0012fdc4
eip=0041e0ad esp=0012fb74 ebp=0012fdc4 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2sample!DataWriter+0xded:
0041e0ad 3bf4 cmp esi,esp
0:000> kb
ChildEBP RetAddr Args to Child
0012fdc4 0041f369 00000001 00000000 00000000 imapi2sample!DataWriter+0xded [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 1801]
0012ff48 0042c226 00000005 01151248 011513a8 imapi2sample!wmain+0x109 [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 2039]
0012ff98 0042c06d 0012ffac 768a3833 7ffde000 imapi2sample!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffa0 768a3833 7ffde000 0012ffec 775da9bd imapi2sample!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012ffac 775da9bd 7ffde000 001252ba 00000000 kernel32!BaseThreadInitThunk+0xe
0012ffec 00000000 004113ac 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x23
0:000>
eax=00000000 ebx=00000000 ecx=768a7cc3 edx=00000007 esi=008b2a88 edi=0012f9fc
eip=768a7cc3 esp=0012f9b8 ebp=0012fa00 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
kernel32!DeviceIoControl+0x193:
768a7cc3 c22000 ret 20h
0:000>
eax=00000000 ebx=00000000 ecx=768a7cc3 edx=00000007 esi=008b2a88 edi=0012f9fc
eip=6e375940 esp=0012f9dc ebp=0012fa00 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2!CMsftDiscRecorder2::SaferDeviceIoControl+0x55:
6e375940 8bf8 mov edi,eax
0:000>
eax=00000000 ebx=00000000 ecx=768a7cc3 edx=00000007 esi=008b2a88 edi=00000000
eip=6e375942 esp=0012f9dc ebp=0012fa00 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2!CMsftDiscRecorder2::SaferDeviceIoControl+0x57:
6e375942 3bfb cmp edi,ebx
0:000>
eax=00000000 ebx=00000000 ecx=768a7cc3 edx=00000007 esi=008b2a88 edi=00000000
eip=6e375944 esp=0012f9dc ebp=0012fa00 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2!CMsftDiscRecorder2::SaferDeviceIoControl+0x59:
6e375944 be00903a6e mov esi,offset imapi2!WPP_GLOBAL_Control (6e3a9000)
0:000>
eax=00000000 ebx=00000000 ecx=768a7cc3 edx=00000007 esi=6e3a9000 edi=00000000
eip=6e375949 esp=0012f9dc ebp=0012fa00 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2!CMsftDiscRecorder2::SaferDeviceIoControl+0x5e:
6e375949 0f8457790000 je imapi2!CMsftDiscRecorder2::SaferDeviceIoControl+0x64 (6e37d2a6) [br=1]
0:000>
eax=00000000 ebx=00000000 ecx=768a7cc3 edx=00000007 esi=6e3a9000 edi=00000000
eip=6e37d2a6 esp=0012f9dc ebp=0012fa00 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2!CMsftDiscRecorder2::SaferDeviceIoControl+0x64:
6e37d2a6 ff15a012376e call dword ptr [imapi2!_imp__GetLastError (6e3712a0)] ds:0023:6e3712a0={kernel32!GetLastError (768a8129)}
0:000>
eax=00000000 ebx=00000000 ecx=768a7cc3 edx=00000007 esi=6e3a9000 edi=00000000
eip=768a8129 esp=0012f9d8 ebp=0012fa00 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
kernel32!GetLastError:
768a8129 64a118000000 mov eax,dword ptr fs:[00000018h] fs:003b:00000018=7ffdf000
0:000>
eax=7ffdf000 ebx=00000000 ecx=768a7cc3 edx=00000007 esi=6e3a9000 edi=00000000
eip=768a812f esp=0012f9d8 ebp=0012fa00 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
kernel32!GetLastError+0x6:
768a812f 8b4034 mov eax,dword ptr [eax+34h] ds:0023:7ffdf034=00000006
0:000>
eax=00000006 ebx=00000000 ecx=768a7cc3 edx=00000007 esi=6e3a9000 edi=00000000
eip=768a8132 esp=0012f9d8 ebp=0012fa00 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
kernel32!GetLastError+0x9:
768a8132 c3 ret
0:000> kb
ChildEBP RetAddr Args to Child
0012f9d4 6e37d2ac 008b2a88 0002c05c 00000000 kernel32!GetLastError+0x9
0012fa00 6e391951 00000110 0002c05c 0012fa48 imapi2!CMsftDiscRecorder2::SaferDeviceIoControl+0x6a
0012fa94 6e378a2e 008b2a88 00000001 002d6994 imapi2!CMsftDiscRecorder2::AcquireExclusiveAccess+0x38a
0012fb64 0041e0ad 008b2530 0254f8d4 0012fdf0 imapi2!CMsftDiscFormat2Data::Write+0x42b
0012fdc4 0041f369 00000001 00000000 00000000 imapi2sample!DataWriter+0xded [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 1801]
0012ff48 0042c226 00000005 01151248 011513a8 imapi2sample!wmain+0x109 [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 2039]
0012ff98 0042c06d 0012ffac 768a3833 7ffde000 imapi2sample!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffa0 768a3833 7ffde000 0012ffec 775da9bd imapi2sample!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012ffac 775da9bd 7ffde000 001252ba 00000000 kernel32!BaseThreadInitThunk+0xe
0012ffec 00000000 004113ac 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x23
0:000> kb
ChildEBP RetAddr Args to Child
0012f9d0 6e375958 0012f9f8 008b2a88 0002c05c imapi2!Imapi2Utility::CloseHandleAndNull+0x2
0012fa00 6e391951 00000110 0002c05c 0012fa48 imapi2!CMsftDiscRecorder2::SaferDeviceIoControl+0x208
0012fa94 6e378a2e 008b2a88 00000001 002d6994 imapi2!CMsftDiscRecorder2::AcquireExclusiveAccess+0x38a
0012fb64 0041e0ad 008b2530 0254f8d4 0012fdf0 imapi2!CMsftDiscFormat2Data::Write+0x42b
0012fdc4 0041f369 00000001 00000000 00000000 imapi2sample!DataWriter+0xded [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 1801]
0012ff48 0042c226 00000005 01151248 011513a8 imapi2sample!wmain+0x109 [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 2039]
0012ff98 0042c06d 0012ffac 768a3833 7ffde000 imapi2sample!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffa0 768a3833 7ffde000 0012ffec 775da9bd imapi2sample!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012ffac 775da9bd 7ffde000 001252ba 00000000 kernel32!BaseThreadInitThunk+0xe
0012ffec 00000000 004113ac 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x23
0:000>
eax=80070006 ebx=00000000 ecx=00000001 edx=ffffffff esi=008b2a88 edi=0002c05c
eip=6e37595e esp=0012fa04 ebp=0012fa94 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2!CMsftDiscRecorder2::SaferDeviceIoControl+0x20e:
6e37595e c21c00 ret 1Ch
0:000> kb
ChildEBP RetAddr Args to Child
0012fa94 6e378a2e 008b2a88 00000001 002d6994 imapi2!CMsftDiscRecorder2::SaferDeviceIoControl+0x20e
0012fb64 0041e0ad 008b2530 0254f8d4 0012fdf0 imapi2!CMsftDiscFormat2Data::Write+0x42b
0012fdc4 0041f369 00000001 00000000 00000000 imapi2sample!DataWriter+0xded [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 1801]
0012ff48 0042c226 00000005 01151248 011513a8 imapi2sample!wmain+0x109 [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 2039]
0012ff98 0042c06d 0012ffac 768a3833 7ffde000 imapi2sample!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffa0 768a3833 7ffde000 0012ffec 775da9bd imapi2sample!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012ffac 775da9bd 7ffde000 001252ba 00000000 kernel32!BaseThreadInitThunk+0xe
0012ffec 00000000 004113ac 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x23
0:000> kb
ChildEBP RetAddr Args to Child
0012fa94 6e378a2e 008b2a88 00000001 002d6994 imapi2!CMsftDiscRecorder2::AcquireExclusiveAccess+0x483
0012fb64 0041e0ad 008b2530 0254f8d4 0012fdf0 imapi2!CMsftDiscFormat2Data::Write+0x42b
0012fdc4 0041f369 00000001 00000000 00000000 imapi2sample!DataWriter+0xded [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 1801]
0012ff48 0042c226 00000005 01151248 011513a8 imapi2sample!wmain+0x109 [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 2039]
0012ff98 0042c06d 0012ffac 768a3833 7ffde000 imapi2sample!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffa0 768a3833 7ffde000 0012ffec 775da9bd imapi2sample!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012ffac 775da9bd 7ffde000 001252ba 00000000 kernel32!BaseThreadInitThunk+0xe
0012ffec 00000000 004113ac 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x23
0:000>
eax=80070006 ebx=008b2530 ecx=2077e96f edx=ffffffff esi=00000000 edi=6e37599c
eip=6e371682 esp=0012fa2c ebp=0012fa94 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2!__security_check_cookie+0x6:
6e371682 0f85d2020300 jne imapi2!__report_gsfailure (6e3a195a) [br=0]
0:000>
eax=80070006 ebx=008b2530 ecx=2077e96f edx=ffffffff esi=00000000 edi=6e37599c
eip=6e371688 esp=0012fa2c ebp=0012fa94 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2!__security_check_cookie+0x8:
6e371688 f3c3 rep ret
0:000> t
eax=80070006 ebx=008b2530 ecx=2077e96f edx=ffffffff esi=00000000 edi=6e37599c
eip=6e391a4f esp=0012fa30 ebp=0012fa94 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2!CMsftDiscRecorder2::AcquireExclusiveAccess+0x488:
6e391a4f c9 leave
0:000> kb
ChildEBP RetAddr Args to Child
0012fa94 6e378a2e 008b2a88 00000001 002d6994 imapi2!CMsftDiscRecorder2::AcquireExclusiveAccess+0x488
0012fb64 0041e0ad 008b2530 0254f8d4 0012fdf0 imapi2!CMsftDiscFormat2Data::Write+0x42b
0012fdc4 0041f369 00000001 00000000 00000000 imapi2sample!DataWriter+0xded [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 1801]
0012ff48 0042c226 00000005 01151248 011513a8 imapi2sample!wmain+0x109 [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 2039]
0012ff98 0042c06d 0012ffac 768a3833 7ffde000 imapi2sample!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffa0 768a3833 7ffde000 0012ffec 775da9bd imapi2sample!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012ffac 775da9bd 7ffde000 001252ba 00000000 kernel32!BaseThreadInitThunk+0xe
0012ffec 00000000 004113ac 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x23
0:000> kb
ChildEBP RetAddr Args to Child
0012fb64 0041e0ad 008b2530 0254f8d4 0012fdf0 imapi2!CMsftDiscFormat2Data::Write+0x913
0012fdc4 0041f369 00000001 00000000 00000000 imapi2sample!DataWriter+0xded [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 1801]
0012ff48 0042c226 00000005 01151248 011513a8 imapi2sample!wmain+0x109 [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 2039]
0012ff98 0042c06d 0012ffac 768a3833 7ffde000 imapi2sample!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffa0 768a3833 7ffde000 0012ffec 775da9bd imapi2sample!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012ffac 775da9bd 7ffde000 001252ba 00000000 kernel32!BaseThreadInitThunk+0xe
0012ffec 00000000 004113ac 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x23
ChildEBP RetAddr Args to Child
0012fb64 0041e0ad 008b2530 0254f8d4 0012fdf0 imapi2!CMsftDiscFormat2Data::Write+0x249a
0012fdc4 0041f369 00000001 00000000 00000000 imapi2sample!DataWriter+0xded [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 1801]
0012ff48 0042c226 00000005 01151248 011513a8 imapi2sample!wmain+0x109 [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 2039]
0012ff98 0042c06d 0012ffac 768a3833 7ffde000 imapi2sample!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffa0 768a3833 7ffde000 0012ffec 775da9bd imapi2sample!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012ffac 775da9bd 7ffde000 001252ba 00000000 kernel32!BaseThreadInitThunk+0xe
0012ffec 00000000 004113ac 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x23
0:000> kb
ChildEBP RetAddr Args to Child
0012fa8c 6e37aabe 008b2a88 00000000 80070006 imapi2!Imapi2Utility::LogSQMFormatSession
0012fb64 0041e0ad 008b2530 0254f8d4 0012fdf0 imapi2!CMsftDiscFormat2Data::Write+0x24c2
0012fdc4 0041f369 00000001 00000000 00000000 imapi2sample!DataWriter+0xded [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 1801]
0012ff48 0042c226 00000005 01151248 011513a8 imapi2sample!wmain+0x109 [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 2039]
0012ff98 0042c06d 0012ffac 768a3833 7ffde000 imapi2sample!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffa0 768a3833 7ffde000 0012ffec 775da9bd imapi2sample!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012ffac 775da9bd 7ffde000 001252ba 00000000 kernel32!BaseThreadInitThunk+0xe
0012ffec 00000000 004113ac 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x23
0:000> kb
ChildEBP RetAddr Args to Child
0012fa40 6e3a4e0a 6e37599c 008b2530 008b2530 ntdll!WinSqmIsOptedIn+0x77
0012fa8c 6e37aabe 008b2a88 00000000 80070006 imapi2!Imapi2Utility::LogSQMFormatSession+0x3d
0012fb64 0041e0ad 008b2530 0254f8d4 0012fdf0 imapi2!CMsftDiscFormat2Data::Write+0x24c2
0012fdc4 0041f369 00000001 00000000 00000000 imapi2sample!DataWriter+0xded [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 1801]
0012ff48 0042c226 00000005 01151248 011513a8 imapi2sample!wmain+0x109 [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 2039]
0012ff98 0042c06d 0012ffac 768a3833 7ffde000 imapi2sample!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffa0 768a3833 7ffde000 0012ffec 775da9bd imapi2sample!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012ffac 775da9bd 7ffde000 001252ba 00000000 kernel32!BaseThreadInitThunk+0xe
0012ffec 00000000 004113ac 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x23
0:000> kb
ChildEBP RetAddr Args to Child
0012fa40 6e3a4e19 6e37599c 008b2530 008b2530 imapi2!CMsftDiscInformation::~CMsftDiscInformation+0x5
0012fa8c 6e37aabe 008b2a88 00000000 80070006 imapi2!Imapi2Utility::LogSQMFormatSession+0x4c
0012fb64 0041e0ad 008b2530 0254f8d4 0012fdf0 imapi2!CMsftDiscFormat2Data::Write+0x24c2
0012fdc4 0041f369 00000001 00000000 00000000 imapi2sample!DataWriter+0xded [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 1801]
0012ff48 0042c226 00000005 01151248 011513a8 imapi2sample!wmain+0x109 [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 2039]
0012ff98 0042c06d 0012ffac 768a3833 7ffde000 imapi2sample!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffa0 768a3833 7ffde000 0012ffec 775da9bd imapi2sample!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012ffac 775da9bd 7ffde000 001252ba 00000000 kernel32!BaseThreadInitThunk+0xe
0012ffec 00000000 004113ac 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x23
0:000> kb
ChildEBP RetAddr Args to Child
0012fb64 0041e0ad 008b2530 0254f8d4 0012fdf0 imapi2!CMsftDiscFormat2Data::Write+0x24e8
0012fdc4 0041f369 00000001 00000000 00000000 imapi2sample!DataWriter+0xded [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 1801]
0012ff48 0042c226 00000005 01151248 011513a8 imapi2sample!wmain+0x109 [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 2039]
0012ff98 0042c06d 0012ffac 768a3833 7ffde000 imapi2sample!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffa0 768a3833 7ffde000 0012ffec 775da9bd imapi2sample!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012ffac 775da9bd 7ffde000 001252ba 00000000 kernel32!BaseThreadInitThunk+0xe
0012ffec 00000000 004113ac 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x23
0:000> t
eax=80070006 ebx=7ffde000 ecx=2077e96f edx=ffffffff esi=0012fb74 edi=0012fdc4
eip=6e37167c esp=0012fab0 ebp=0012fb64 iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000206
imapi2!__security_check_cookie:
6e37167c 3b0d08913a6e cmp ecx,dword ptr [imapi2!__security_cookie (6e3a9108)] ds:0023:6e3a9108=2077e96f
0:000>
eax=80070006 ebx=7ffde000 ecx=2077e96f edx=ffffffff esi=0012fb74 edi=0012fdc4
eip=6e371682 esp=0012fab0 ebp=0012fb64 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2!__security_check_cookie+0x6:
6e371682 0f85d2020300 jne imapi2!__report_gsfailure (6e3a195a) [br=0]
0:000>
eax=80070006 ebx=7ffde000 ecx=2077e96f edx=ffffffff esi=0012fb74 edi=0012fdc4
eip=6e371688 esp=0012fab0 ebp=0012fb64 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2!__security_check_cookie+0x8:
6e371688 f3c3 rep ret
0:000>
eax=80070006 ebx=7ffde000 ecx=2077e96f edx=ffffffff esi=0012fb74 edi=0012fdc4
eip=6e37aae9 esp=0012fab4 ebp=0012fb64 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2!CMsftDiscFormat2Data::Write+0x24ed:
6e37aae9 c9 leave
0:000> kb
ChildEBP RetAddr Args to Child
0012fb64 0041e0ad 008b2530 0254f8d4 0012fdf0 imapi2!CMsftDiscFormat2Data::Write+0x24ed
0012fdc4 0041f369 00000001 00000000 00000000 imapi2sample!DataWriter+0xded [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 1801]
0012ff48 0042c226 00000005 01151248 011513a8 imapi2sample!wmain+0x109 [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 2039]
0012ff98 0042c06d 0012ffac 768a3833 7ffde000 imapi2sample!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffa0 768a3833 7ffde000 0012ffec 775da9bd imapi2sample!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012ffac 775da9bd 7ffde000 001252ba 00000000 kernel32!BaseThreadInitThunk+0xe
0012ffec 00000000 004113ac 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x23
0:000> t
eax=80070006 ebx=7ffde000 ecx=2077e96f edx=ffffffff esi=0012fb74 edi=0012fdc4
eip=6e37aaea esp=0012fb68 ebp=0012fdc4 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2!CMsftDiscFormat2Data::Write+0x24ee:
6e37aaea c20800 ret 8
0:000> t
eax=80070006 ebx=7ffde000 ecx=2077e96f edx=ffffffff esi=0012fb74 edi=0012fdc4
eip=0041e0ad esp=0012fb74 ebp=0012fdc4 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
imapi2sample!DataWriter+0xded:
0041e0ad 3bf4 cmp esi,esp
0:000> kb
ChildEBP RetAddr Args to Child
0012fdc4 0041f369 00000001 00000000 00000000 imapi2sample!DataWriter+0xded [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 1801]
0012ff48 0042c226 00000005 01151248 011513a8 imapi2sample!wmain+0x109 [c:\program files\microsoft sdks\windows\v6.0\samples\winbase\imapi\imapi2sample\imapi2sample.cpp @ 2039]
0012ff98 0042c06d 0012ffac 768a3833 7ffde000 imapi2sample!__tmainCRTStartup+0x1a6 [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 594]
0012ffa0 768a3833 7ffde000 0012ffec 775da9bd imapi2sample!wmainCRTStartup+0xd [f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 414]
0012ffac 775da9bd 7ffde000 001252ba 00000000 kernel32!BaseThreadInitThunk+0xe
0012ffec 00000000 004113ac 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x23
Hello Paul Russell,
It definitely looks like you were seeing an issue that is somehow causing an ERROR_INVALID_HANDLE under the covers somewhere. If you could follow the instructions in the thread in this forum on collecting a software trace of IMAPIv2, I can take a look at the log and see where things are going wrong. Unfortunately, there area few different places in this area of the code where I believe that error could occur, so I can't narrow it down and I don't reproduce the issue locally...
If you could send the log to optissue@microsoft.com, I'll let you know what I find, and hopefully we can resolve your issue!
thanks,
Garrett Jacobson
SDE, Optical Platform Group