# Call \`OleInitialize\` to fix \`DirectWrite\` in \`TestPlatform\` on windows \(\#12289\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/e54455bcad35759c11c629a99840e518e5a68962)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: e54455bcad35759c11c629a99840e518e5a68962

Requested commit: e54455bcad35759c11c629a99840e518e5a68962

Commit: e54455bcad35759c11c629a99840e518e5a68962

Tree: 935c32cad6820609553196ec8e7c9d2c19e01f2f

Author: Jakob Hellermann

Committer: GitHub

## Message

````
Call `OleInitialize` to fix `DirectWrite` in `TestPlatform` on windows (#12289)

Running the tests on windows currently fails for every gpui test using
the `TestPlatform` with

```rs
called `Result::unwrap()` on an `Err` value: CoInitialize has not been called. (0x800401F0)
```
trying to call `CoCreateInstance`in the `DirectWriteComponent`.

The `WindowsPlatform` calls
[`OleInitialize`](https://learn.microsoft.com/de-de/windows/win32/api/ole2/nf-ole2-oleinitialize)
which internally calls `CoInitializeEx` so I just copied that to the
`TestPlatform`.

Release Notes:

- N/A
````

## Parents

- [9cc5ba86d1b7c0c26ee19229001627877ec7bd7b](https://git.cafe/gitcafe/zed/commit/9cc5ba86d1b7c0c26ee19229001627877ec7bd7b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/e54455bcad35759c11c629a99840e518e5a68962?format=markdown)
