The code to write a SYN_STREAM attribute value with NDAP is virtually the same as the code to read one (see explanations 1 and 2). The only difference is that a DS_WRITE_STREAM flag is used in the NWDSOpenStream instead of DS_READ_STREAM.