Lines Matching refs:stm

46 static void istream_destructor(php_istream *stm);
50 php_istream *stm = (php_istream *)rsrc->ptr; in istream_dtor() local
51 istream_destructor(stm); in istream_dtor()
55 php_istream *stm = (php_istream*)This; \
56 if (GetCurrentThreadId() != stm->engine_thread) \
60 php_istream *stm = (php_istream*)This; \
61 if (GetCurrentThreadId() != stm->engine_thread) \
74 InterlockedIncrement(&stm->refcount); in stm_queryinterface()
86 return InterlockedIncrement(&stm->refcount); in stm_addref()
94 ret = InterlockedDecrement(&stm->refcount); in stm_release()
97 if (stm->res) in stm_release()
98 zend_list_delete(stm->res); in stm_release()
108 nread = (ULONG)php_stream_read(stm->stream, pv, cb); in stm_read()
124 nwrote = php_stream_write(stm->stream, pv, cb); in stm_write()
158 ret = php_stream_seek(stm->stream, offset, whence); in stm_seek()
175 if (php_stream_truncate_supported(stm->stream)) { in stm_set_size()
176 int ret = php_stream_truncate_set_size(stm->stream, (size_t)libNewSize.QuadPart); in stm_set_size()
198 php_stream_flush(stm->stream); in stm_commit()
249 static void istream_destructor(php_istream *stm) in istream_destructor() argument
251 if (stm->refcount > 0) { in istream_destructor()
252 CoDisconnectObject((IUnknown*)stm, 0); in istream_destructor()
255 zend_list_delete(stm->stream->res); in istream_destructor()
257 CoTaskMemFree(stm); in istream_destructor()
263 php_istream *stm = (php_istream*)CoTaskMemAlloc(sizeof(*stm)); in php_com_wrapper_export_stream() local
265 if (stm == NULL) in php_com_wrapper_export_stream()
268 memset(stm, 0, sizeof(*stm)); in php_com_wrapper_export_stream()
269 stm->engine_thread = GetCurrentThreadId(); in php_com_wrapper_export_stream()
270 stm->lpVtbl = &php_istream_vtbl; in php_com_wrapper_export_stream()
271 stm->refcount = 1; in php_com_wrapper_export_stream()
272 stm->stream = stream; in php_com_wrapper_export_stream()
275 stm->res = zend_register_resource(stm, le_istream); in php_com_wrapper_export_stream()
277 return (IStream*)stm; in php_com_wrapper_export_stream()
532 IStream *stm = NULL; in CPH_METHOD() local
548 stm = php_com_wrapper_export_stream(stream); in CPH_METHOD()
549 if (stm == NULL) { in CPH_METHOD()
561 res = OleLoadFromStream(stm, &IID_IDispatch, &disp); in CPH_METHOD()
569 res = IPersistStreamInit_Load(helper->ipsi, stm); in CPH_METHOD()
573 res = IPersistStreamInit_Load(helper->ipsi, stm); in CPH_METHOD()
577 IStream_Release(stm); in CPH_METHOD()
592 IStream *stm = NULL; in CPH_METHOD() local
610 stm = php_com_wrapper_export_stream(stream); in CPH_METHOD()
611 if (stm == NULL) { in CPH_METHOD()
618 res = IPersistStreamInit_Save(helper->ipsi, stm, TRUE); in CPH_METHOD()
622 res = IPersistStream_Save(helper->ips, stm, TRUE); in CPH_METHOD()
626 IStream_Release(stm); in CPH_METHOD()