Changeset 396 for OCO/trunk/drv16/ssm_idc.cpp
- Timestamp:
- Oct 17, 2008, 5:37:44 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OCO/trunk/drv16/ssm_idc.cpp
r33 r396 47 47 48 48 case DDCMD_SETUP: { 49 ddprintf(("DDCMD_SETUP")); 49 50 if (!pstream) 50 51 return ERROR_INVALID_STREAM; … … 61 62 } 62 63 case DDCMD_READ: { 64 ddprintf(("DDCMD_READ")); 63 65 PDDCMDREADWRITE p=(PDDCMDREADWRITE) pCommon; 64 66 … … 73 75 } 74 76 case DDCMD_WRITE: { 75 PDDCMDREADWRITE p=(PDDCMDREADWRITE) pCommon;77 PDDCMDREADWRITE p=(PDDCMDREADWRITE) pCommon; 76 78 77 79 if (!pstream) 78 80 return ERROR_INVALID_STREAM; 79 ulReturnCode = 80 pstream->Write((PSTREAMBUF) p->pBuffer,(unsigned) p->ulBufferSize);81 ulReturnCode = pstream->Write((PSTREAMBUF) p->pBuffer,(unsigned) p->ulBufferSize); 82 ddprintf(("DDCMD_WRITE %lx",p->ulBufferSize)); 81 83 if (ulReturnCode) 82 84 return ulReturnCode; … … 84 86 } 85 87 case DDCMD_STATUS: { 86 88 ddprintf(("DDCMD_STATUS")); 87 89 PDDCMDSTATUS p = (PDDCMDSTATUS) pCommon; 88 90 PSTATUS_PARM p2 = (PSTATUS_PARM) p->pStatus; … … 99 101 switch (p->ulCmd) { 100 102 case DDCMD_START: 101 return pstream->StartStream(); 103 ddprintf(("DDCMD_START")); 104 return pstream->StartStream(); 102 105 case DDCMD_STOP: 103 p->ulParmSize=sizeof(ULONG); 106 ddprintf(("DDCMD_STOP")); 107 p->ulParmSize=sizeof(ULONG); 104 108 return pstream->StopStream((PCONTROL_PARM)p->pParm); 105 109 case DDCMD_PAUSE: 106 p->ulParmSize=sizeof(ULONG); 110 ddprintf(("DDCMD_PAUSE")); 111 p->ulParmSize=sizeof(ULONG); 107 112 return pstream->PauseStream((PCONTROL_PARM)p->pParm); 108 113 case DDCMD_RESUME: 109 return pstream->ResumeStream(); 114 ddprintf(("DDCMD_RESUME")); 115 return pstream->ResumeStream(); 110 116 case DDCMD_ENABLE_EVENT: 111 return pstream->EnableEvent(p); 117 ddprintf(("DDCMD_ENABLE_EVENT")); 118 return pstream->EnableEvent(p); 112 119 case DDCMD_DISABLE_EVENT: 113 return pstream->DisableEvent(p); 120 ddprintf(("DDCMD_DISABLE_EVENT")); 121 return pstream->DisableEvent(p); 114 122 case DDCMD_PAUSE_TIME: 115 return pstream->PauseStreamTime(); 123 ddprintf(("DDCMD_PAUSE_TIME")); 124 return pstream->PauseStreamTime(); 116 125 case DDCMD_RESUME_TIME: 117 return pstream->ResumeStreamTime(); 126 ddprintf(("DDCMD_RESUME_TIME")); 127 return pstream->ResumeStreamTime(); 118 128 default: 119 129 return ERROR_INVALID_REQUEST; … … 121 131 } 122 132 case DDCMD_REG_STREAM: { 133 ddprintf(("DDCMD_REG_STREAM")); 123 134 if (pstream) 124 return ERROR_HNDLR_REGISTERED;135 return ERROR_HNDLR_REGISTERED; 125 136 pstream = FindStream_fromFile(((PDDCMDREGISTER) pCommon)->ulSysFileNum); 126 137 if (!pstream) 127 138 return ERROR_STREAM_CREATION; 128 139 ulReturnCode = pstream->Register((PDDCMDREGISTER) pCommon); 129 dprintf(("DDCMD_EntryPoint: DDCMD_REG_STREAM stream %x returned %d", (USHORT)pCommon->hStream, (USHORT)ulReturnCode));140 //dprintf(("DDCMD_EntryPoint: DDCMD_REG_STREAM stream %x returned %d", (USHORT)pCommon->hStream, (USHORT)ulReturnCode)); 130 141 if (ulReturnCode) 131 142 return ERROR_STREAM_CREATION; … … 133 144 } 134 145 case DDCMD_DEREG_STREAM: 146 ddprintf(("DDCMD_DEREG_STREAM")); 135 147 if (!pstream) 136 148 return ERROR_INVALID_STREAM; … … 138 150 open_strategy = 1UL; // close it really 139 151 pstream->DeRegister(); 140 dprintf(("DDCMD_EntryPoint: DDCMD_DEREG_STREAM stream %x, %ld", (USHORT)pCommon->hStream, open_strategy));152 //dprintf(("DDCMD_EntryPoint: DDCMD_DEREG_STREAM stream %x, %ld", (USHORT)pCommon->hStream, open_strategy)); 141 153 break; 142 default: 154 default: 155 ddprintf(("INVALID DDCMD\n")); 143 156 return ERROR_INVALID_FUNCTION; 144 157 }
Note:
See TracChangeset
for help on using the changeset viewer.