Lines Matching refs:helper

274 #define CPH_FETCH()				php_com_persist_helper *helper = (php_com_persist_helper*)Z_OBJ_P(ZEND_THIS);
276 #define CPH_NO_OBJ() if (helper->unk == NULL) { php_com_throw_exception(E_INVALIDARG, "No COM obj…
290 static inline HRESULT get_persist_stream(php_com_persist_helper *helper) in get_persist_stream() argument
292 if (!helper->ips && helper->unk) { in get_persist_stream()
293 return IUnknown_QueryInterface(helper->unk, &IID_IPersistStream, &helper->ips); in get_persist_stream()
295 return helper->ips ? S_OK : E_NOTIMPL; in get_persist_stream()
298 static inline HRESULT get_persist_stream_init(php_com_persist_helper *helper) in get_persist_stream_init() argument
300 if (!helper->ipsi && helper->unk) { in get_persist_stream_init()
301 return IUnknown_QueryInterface(helper->unk, &IID_IPersistStreamInit, &helper->ipsi); in get_persist_stream_init()
303 return helper->ipsi ? S_OK : E_NOTIMPL; in get_persist_stream_init()
306 static inline HRESULT get_persist_file(php_com_persist_helper *helper) in get_persist_file() argument
308 if (!helper->ipf && helper->unk) { in get_persist_file()
309 return IUnknown_QueryInterface(helper->unk, &IID_IPersistFile, &helper->ipf); in get_persist_file()
311 return helper->ipf ? S_OK : E_NOTIMPL; in get_persist_file()
328 res = get_persist_file(helper); in CPH_METHOD()
329 if (helper->ipf) { in CPH_METHOD()
330 res = IPersistFile_GetCurFile(helper->ipf, &olename); in CPH_METHOD()
333 zend_string *str = php_com_olestring_to_string(olename, helper->codepage); in CPH_METHOD()
365 res = get_persist_file(helper); in CPH_METHOD()
366 if (helper->ipf) { in CPH_METHOD()
378 olefilename = php_com_string_to_olestring(fullpath, strlen(fullpath), helper->codepage); in CPH_METHOD()
381 res = IPersistFile_Save(helper->ipf, olefilename, remember); in CPH_METHOD()
384 res = IPersistFile_GetCurFile(helper->ipf, &olefilename); in CPH_METHOD()
386 IPersistFile_SaveCompleted(helper->ipf, olefilename); in CPH_METHOD()
391 IPersistFile_SaveCompleted(helper->ipf, olefilename); in CPH_METHOD()
426 res = get_persist_file(helper); in CPH_METHOD()
427 if (helper->ipf) { in CPH_METHOD()
437 olefilename = php_com_string_to_olestring(fullpath, strlen(fullpath), helper->codepage); in CPH_METHOD()
440 res = IPersistFile_Load(helper->ipf, olefilename, (DWORD)flags); in CPH_METHOD()
466 res = get_persist_stream_init(helper); in CPH_METHOD()
467 if (helper->ipsi) { in CPH_METHOD()
468 res = IPersistStreamInit_GetSizeMax(helper->ipsi, &size); in CPH_METHOD()
470 res = get_persist_stream(helper); in CPH_METHOD()
471 if (helper->ips) { in CPH_METHOD()
472 res = IPersistStream_GetSizeMax(helper->ips, &size); in CPH_METHOD()
500 res = get_persist_stream_init(helper); in CPH_METHOD()
501 if (helper->ipsi) { in CPH_METHOD()
502 res = IPersistStreamInit_InitNew(helper->ipsi); in CPH_METHOD()
544 if (helper->unk == NULL) { in CPH_METHOD()
554 res = get_persist_stream_init(helper); in CPH_METHOD()
555 if (helper->ipsi) { in CPH_METHOD()
556 res = IPersistStreamInit_Load(helper->ipsi, stm); in CPH_METHOD()
558 res = get_persist_stream(helper); in CPH_METHOD()
559 if (helper->ips) { in CPH_METHOD()
560 res = IPersistStreamInit_Load(helper->ipsi, stm); in CPH_METHOD()
601 res = get_persist_stream_init(helper); in CPH_METHOD()
602 if (helper->ipsi) { in CPH_METHOD()
603 res = IPersistStreamInit_Save(helper->ipsi, stm, TRUE); in CPH_METHOD()
605 res = get_persist_stream(helper); in CPH_METHOD()
606 if (helper->ips) { in CPH_METHOD()
607 res = IPersistStream_Save(helper->ips, stm, TRUE); in CPH_METHOD()
646 helper->unk = (IUnknown*)V_DISPATCH(&obj->v); in CPH_METHOD()
647 IUnknown_AddRef(helper->unk); in CPH_METHOD()
648 helper->codepage = obj->code_page; in CPH_METHOD()
699 php_com_persist_helper *helper; in helper_new() local
701 helper = emalloc(sizeof(*helper)); in helper_new()
702 memset(helper, 0, sizeof(*helper)); in helper_new()
704 zend_object_std_init(&helper->std, helper_ce); in helper_new()
706 return &helper->std; in helper_new()