Lines Matching refs:stm
45 static void istream_destructor(php_istream *stm);
49 php_istream *stm = (php_istream *)rsrc->ptr; in istream_dtor() local
50 istream_destructor(stm); in istream_dtor()
54 php_istream *stm = (php_istream*)This; \
55 if (GetCurrentThreadId() != stm->engine_thread) \
59 php_istream *stm = (php_istream*)This; \
60 if (GetCurrentThreadId() != stm->engine_thread) \
73 InterlockedIncrement(&stm->refcount); in stm_queryinterface()
85 return InterlockedIncrement(&stm->refcount); in stm_addref()
93 ret = InterlockedDecrement(&stm->refcount); in stm_release()
96 if (stm->res) in stm_release()
97 zend_list_delete(stm->res); in stm_release()
107 nread = (ULONG)php_stream_read(stm->stream, pv, cb); in stm_read()
123 nwrote = php_stream_write(stm->stream, pv, cb); in stm_write()
157 ret = php_stream_seek(stm->stream, offset, whence); in stm_seek()
174 if (php_stream_truncate_supported(stm->stream)) { in stm_set_size()
175 int ret = php_stream_truncate_set_size(stm->stream, (size_t)libNewSize.QuadPart); in stm_set_size()
197 php_stream_flush(stm->stream); in stm_commit()
248 static void istream_destructor(php_istream *stm) in istream_destructor() argument
250 if (stm->refcount > 0) { in istream_destructor()
251 CoDisconnectObject((IUnknown*)stm, 0); in istream_destructor()
254 zend_list_delete(stm->stream->res); in istream_destructor()
256 CoTaskMemFree(stm); in istream_destructor()
262 php_istream *stm = (php_istream*)CoTaskMemAlloc(sizeof(*stm)); in php_com_wrapper_export_stream() local
264 if (stm == NULL) in php_com_wrapper_export_stream()
267 memset(stm, 0, sizeof(*stm)); in php_com_wrapper_export_stream()
268 stm->engine_thread = GetCurrentThreadId(); in php_com_wrapper_export_stream()
269 stm->lpVtbl = &php_istream_vtbl; in php_com_wrapper_export_stream()
270 stm->refcount = 1; in php_com_wrapper_export_stream()
271 stm->stream = stream; in php_com_wrapper_export_stream()
274 stm->res = zend_register_resource(stm, le_istream); in php_com_wrapper_export_stream()
276 return (IStream*)stm; in php_com_wrapper_export_stream()
527 IStream *stm = NULL; in CPH_METHOD() local
542 stm = php_com_wrapper_export_stream(stream); in CPH_METHOD()
543 if (stm == NULL) { in CPH_METHOD()
555 res = OleLoadFromStream(stm, &IID_IDispatch, &disp); in CPH_METHOD()
563 res = IPersistStreamInit_Load(helper->ipsi, stm); in CPH_METHOD()
567 res = IPersistStreamInit_Load(helper->ipsi, stm); in CPH_METHOD()
571 IStream_Release(stm); in CPH_METHOD()
585 IStream *stm = NULL; in CPH_METHOD() local
602 stm = php_com_wrapper_export_stream(stream); in CPH_METHOD()
603 if (stm == NULL) { in CPH_METHOD()
610 res = IPersistStreamInit_Save(helper->ipsi, stm, TRUE); in CPH_METHOD()
614 res = IPersistStream_Save(helper->ips, stm, TRUE); in CPH_METHOD()
618 IStream_Release(stm); in CPH_METHOD()