mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
* Fix GH-17658: COMPersistHelper::LoadFromStream() can segfault The actual fix is trivial, but to be able to test the behavior we have to introduce an own COM object, since existing persistable objects likely implement `IPersistInit`, not only `IPersist`. We also want to avoid further test dependencies on possibly unavailable objects, such as `Word.Application`. To this purposes, we add a small COM in-process server, which may be extended for other testing purposes. We keep it simple by implementing it in C++, but without using any more sophisticated frameworks like ATL. This component needs to be built explicitly (`nmake comtest.dll`), and also needs to be explicitly registered (`nmake register_comtest`). When no longer needed, it is possible to unregister the component (`nmake unregister_comtest`).
24 lines
555 B
Plaintext
24 lines
555 B
Plaintext
[ uuid(AE8685BE-3758-4BDA-91DB-1459EBA24747),
|
|
helpstring("PHP COM Test Library"),
|
|
version(1.0) ]
|
|
library ComTest
|
|
{
|
|
importlib("stdole32.tlb");
|
|
|
|
[ object,
|
|
uuid(66177FCA-36B3-436B-B475-BE4249DDE0A0),
|
|
dual ]
|
|
interface IDocument : IDispatch
|
|
{
|
|
[id(1), propget] HRESULT Content([out, retval] BSTR* retvalue);
|
|
[id(1), propput] HRESULT Content(BSTR newvalue);
|
|
}
|
|
|
|
[ uuid(B13FE324-D595-44C7-97D7-82CE20EDF878) ]
|
|
coclass Document
|
|
{
|
|
interface IDocument;
|
|
interface IPersistStream;
|
|
}
|
|
}
|