Lines Matching refs:helper
281 #define CPH_FETCH() php_com_persist_helper *helper = (php_com_persist_helper*)Z_OBJ_P(getThis());
283 #define CPH_NO_OBJ() if (helper->unk == NULL) { php_com_throw_exception(E_INVALIDARG, "No COM obj…
297 static inline HRESULT get_persist_stream(php_com_persist_helper *helper) in get_persist_stream() argument
299 if (!helper->ips && helper->unk) { in get_persist_stream()
300 return IUnknown_QueryInterface(helper->unk, &IID_IPersistStream, &helper->ips); in get_persist_stream()
302 return helper->ips ? S_OK : E_NOTIMPL; in get_persist_stream()
305 static inline HRESULT get_persist_stream_init(php_com_persist_helper *helper) in get_persist_stream_init() argument
307 if (!helper->ipsi && helper->unk) { in get_persist_stream_init()
308 return IUnknown_QueryInterface(helper->unk, &IID_IPersistStreamInit, &helper->ipsi); in get_persist_stream_init()
310 return helper->ipsi ? S_OK : E_NOTIMPL; in get_persist_stream_init()
313 static inline HRESULT get_persist_file(php_com_persist_helper *helper) in get_persist_file() argument
315 if (!helper->ipf && helper->unk) { in get_persist_file()
316 return IUnknown_QueryInterface(helper->unk, &IID_IPersistFile, &helper->ipf); in get_persist_file()
318 return helper->ipf ? S_OK : E_NOTIMPL; in get_persist_file()
335 res = get_persist_file(helper); in CPH_METHOD()
336 if (helper->ipf) { in CPH_METHOD()
337 res = IPersistFile_GetCurFile(helper->ipf, &olename); in CPH_METHOD()
340 zend_string *str = php_com_olestring_to_string(olename, helper->codepage); in CPH_METHOD()
372 res = get_persist_file(helper); in CPH_METHOD()
373 if (helper->ipf) { in CPH_METHOD()
385 olefilename = php_com_string_to_olestring(fullpath, strlen(fullpath), helper->codepage); in CPH_METHOD()
388 res = IPersistFile_Save(helper->ipf, olefilename, remember); in CPH_METHOD()
391 res = IPersistFile_GetCurFile(helper->ipf, &olefilename); in CPH_METHOD()
393 IPersistFile_SaveCompleted(helper->ipf, olefilename); in CPH_METHOD()
398 IPersistFile_SaveCompleted(helper->ipf, olefilename); in CPH_METHOD()
433 res = get_persist_file(helper); in CPH_METHOD()
434 if (helper->ipf) { in CPH_METHOD()
444 olefilename = php_com_string_to_olestring(fullpath, strlen(fullpath), helper->codepage); in CPH_METHOD()
447 res = IPersistFile_Load(helper->ipf, olefilename, (DWORD)flags); in CPH_METHOD()
473 res = get_persist_stream_init(helper); in CPH_METHOD()
474 if (helper->ipsi) { in CPH_METHOD()
475 res = IPersistStreamInit_GetSizeMax(helper->ipsi, &size); in CPH_METHOD()
477 res = get_persist_stream(helper); in CPH_METHOD()
478 if (helper->ips) { in CPH_METHOD()
479 res = IPersistStream_GetSizeMax(helper->ips, &size); in CPH_METHOD()
507 res = get_persist_stream_init(helper); in CPH_METHOD()
508 if (helper->ipsi) { in CPH_METHOD()
509 res = IPersistStreamInit_InitNew(helper->ipsi); in CPH_METHOD()
551 if (helper->unk == NULL) { in CPH_METHOD()
561 res = get_persist_stream_init(helper); in CPH_METHOD()
562 if (helper->ipsi) { in CPH_METHOD()
563 res = IPersistStreamInit_Load(helper->ipsi, stm); in CPH_METHOD()
565 res = get_persist_stream(helper); in CPH_METHOD()
566 if (helper->ips) { in CPH_METHOD()
567 res = IPersistStreamInit_Load(helper->ipsi, stm); in CPH_METHOD()
608 res = get_persist_stream_init(helper); in CPH_METHOD()
609 if (helper->ipsi) { in CPH_METHOD()
610 res = IPersistStreamInit_Save(helper->ipsi, stm, TRUE); in CPH_METHOD()
612 res = get_persist_stream(helper); in CPH_METHOD()
613 if (helper->ips) { in CPH_METHOD()
614 res = IPersistStream_Save(helper->ips, stm, TRUE); in CPH_METHOD()
653 helper->unk = (IUnknown*)V_DISPATCH(&obj->v); in CPH_METHOD()
654 IUnknown_AddRef(helper->unk); in CPH_METHOD()
655 helper->codepage = obj->code_page; in CPH_METHOD()
706 php_com_persist_helper *helper; in helper_new() local
708 helper = emalloc(sizeof(*helper)); in helper_new()
709 memset(helper, 0, sizeof(*helper)); in helper_new()
711 zend_object_std_init(&helper->std, helper_ce); in helper_new()
713 return &helper->std; in helper_new()