添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
不拘小节的紫菜  ·  python ...·  4 月前    · 
沉稳的手链  ·  NumPy库frompyfunc与vecto ...·  5 月前    · 
仗义的莲藕  ·  执行openstack network ...·  5 月前    · 
好帅的小熊猫  ·  🔥2024安全体育平台·  5 月前    · 

[pywin32-bugs] [ pywin32-Bugs-1380832 ] win32file.DeviceIoControl can't do OVERLAPPED with output OLD project page for the Python extensions for Windows Brought to you by: mhammond
  • Old Bugs - new issues at https://github.com/mhammond/pywin32/issues
  • Old Patches - new patches via https://github.com/mhammond/pywin32/pulls
  • Old Feature Requests - new issues at https://github.com/mhammond/pywin32/issues
  • From: SourceForge.net <no...@so...> - 2005-12-14 22:12:18
    Bugs item #1380832, was opened at 2005-12-15 08:13
    Message generated for change (Comment added) made by mhammond
    You can respond by visiting: 
    https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1380832&group_id=78018
    Please note that this message will contain a full copy of the comment thread,
    including the initial issue submission, for this request,
    not just the latest update.
    Category: win32
    Group: None
    Status: Open
    Resolution: None
    Priority: 5
    Submitted By: Siggi (sigurasg)
    Assigned to: Nobody/Anonymous (nobody)
    Summary: win32file.DeviceIoControl can't do OVERLAPPED with output
    Initial Comment:
    In the case where win32file.DeviceIoControl is called
    on an async IOCTL with output, and an OVERLAPPED
    structure is called, 
    it'll do the wrong thing.
    In this case win32 function will return FALSE, and
    ::GetLastError will return ERROR_IO_PENDING. 
    In this case it's the caller's responsibility to keep
    the output buffer (readData) around until the IO
    completes or is cancelled, but the code below
    deallocates it.
        ok = DeviceIoControl(hDevice,
                             dwIoControlCode,
                             writeData,
                             writeSize,
                             readData, 
                             readSize, 
                             &numRead,
                             pOverlapped);
        Py_END_ALLOW_THREADS
        if (!ok) {
            free(readData);
            return PyWin_SetAPIError("DeviceIoControl");
    Also, given the current interface, there's no way to
    retrieve the output of an overlapped IOCTL. This'd
    require much the same output convention as
    win32file.ReadFile.
    ----------------------------------------------------------------------
    >Comment By: Mark Hammond (mhammond)
    Date: 2005-12-15 09:12
    Message:
    Logged In: YES 
    user_id=14198
    That sounds correct.  Patches gratefully accepted (or even
    just something I could add to the test suite!)
    ----------------------------------------------------------------------
    You can respond by visiting: 
    https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1380832&group_id=78018
    Click URL instructions:
    Right-click on the ad, choose "Copy Link", then paste here →
    (This may not be possible with some types of ads) More information about our ad policies

    Please provide the ad click URL, if possible: