The following code illustrates how to perform a write to the physical device driver.
#include "os2.h" #include "os2me.h" #include "shdd.h" ULONG ulRC; /* Error return code */ HSTREAM hstream; /* Stream handle */ DDCMDREADWRITE ddcmdpb; /* Parameter block */ PDDCMDFN pddcmdfn; /* Pointer to DDCMD entry */ /* point */ PVOID pBuffer; /* Pointer to buffer */ . . . /*--------------------------------------------------------------------*/ /* Perform a write to the physical device driver. */ /*--------------------------------------------------------------------*/ ddcmdpb.ulFunction = DDCMD_WRITE; ddcmdpb.hstream = hstream; ddcmdpb.pBuffer = pBuffer; ddcmdpb.ulBufferSize = 32768; if (ulRC = pddcmdfn (&ddcmdpb)) return (ulRC); /* error! */