none
[MS-OLEDS] 2.1.6 DEVMODEA RRS feed

  • Question

  • in [MS-RPRN] it says dmDeviceName occupies 64 bytes(sizeof(wchar_t) * 32),

    in [MS-OLEDS] it says dmDeviceName occupies 4 bytes(before the colon), and explains that it is a 32-element array of 8-bit ANSI characters(which occupies 32 bytes) later.

    (1) Is dmDeviceName an ANSI string or a Unicode string?

    (2) What's the type of dmFormName? It wasn't mentioned in [MS-RPRN].

    (3) Is dmDeviceName a pointer(4 bytes) or an array(32 bytes/64 bytes)?


    • Edited by whisperzzzz Tuesday, October 17, 2017 2:45 AM
    Tuesday, October 17, 2017 2:44 AM

Answers

  • Hi Whisperzzz,

    Thank you for questions.  We can answer the follow-up on MS-OLEDS here as it is in scope.  The question Offvis is not something that we can address however here in how the tool works.  The Offvis was provided as-is without support.

    For dmDeviceName and dmFormName in MS-OLEDS,  this does indeed need a change in DEVMODEA documentation.  The dmDeviceName and also dmFormName in DEVMODEA is 32 bytes total versus 4 bytes.  We will get a documentation update process for MS-OLEDS.

    Thanks,

    Nathan

    Wednesday, October 18, 2017 12:25 PM
    Moderator

All replies

  • Hi Whisperzzzz,

    Thank you for your Windows Protocols question. One of our engineers will respond soon.

    Thanks,


    Jeff McCashland | Microsoft Protocols Open Specifications Team

    Tuesday, October 17, 2017 4:35 PM
    Moderator
  • Hi Whisperzzzz,

    Thank you for your Windows Protocols question.   To answer question #2 first, the MS-RPRN document was updated recently.  The most recent document is from September 15, 2017 at version 30.0 for use.

    For the type of dmFormName mentioned in MS-RPRN in section 2.2.2.1 _DEVMODE which is unicode.   The size is defined as:

           dmFormName (64 bytes)

    For the other two questions in regards to MS-OLEDS, the correct way to understand this is these are indeed different.   Here is what is stated in the latest MS-OLEDS documentation in regards to the fields in section 2.1.6 in MS-OLEDS :

            2.1.6 DEVMODEA
            This structure is identical to the DEVMODE structure specified in [MS-RPRN] section 2.2.1.1.1, except
            for the dmDeviceN
    ame and dmFormName fields

    Which is indeed different as defined in MS-OLEDS since it is DEVMODEA  vs.  DEVMODE  (no A, which is Unicode structure in MS-RPRN).   In MS-OLEDS, the types are referencing DEVMODEA

         dmDeviceName (4 bytes): This field is a 32-element array of 8-bit ANSI characters.


         dmFormName (4 bytes): This field is a 32-element array of 8-bit ANSI characters.

         

    Thanks,


    Nathan Manis | Microsoft Protocols Open Specifications Team

    Tuesday, October 17, 2017 5:20 PM
    Moderator
  • dmDeviceName (4 bytes): This field is a 32-element array of 8-bit ANSI characters.

    dmFormName (4 bytes): This field is a 32-element array of 8-bit ANSI characters.

    I mean, if it is an array of 8-bit ANSI characters, each character will take 1 byte(8-bit), and 32 elements will take 32 bytes exactly, not 4 bytes.

    Or should I understand it in this way: it is an array which takes 32 bits, each ANSI character takes 8 bits, so dmDeviceName just contains 4 ANSI characters?

    Wednesday, October 18, 2017 2:28 AM
  • By the way, how does the Offvis "defragment" work?

    It just works like magic...

    Is it a way to use Offvis under command line?

    Wednesday, October 18, 2017 2:47 AM
  • Hi Whisperzzz,

    Thank you for questions.  We can answer the follow-up on MS-OLEDS here as it is in scope.  The question Offvis is not something that we can address however here in how the tool works.  The Offvis was provided as-is without support.

    For dmDeviceName and dmFormName in MS-OLEDS,  this does indeed need a change in DEVMODEA documentation.  The dmDeviceName and also dmFormName in DEVMODEA is 32 bytes total versus 4 bytes.  We will get a documentation update process for MS-OLEDS.

    Thanks,

    Nathan

    Wednesday, October 18, 2017 12:25 PM
    Moderator