Skip to content

fix(win32): ignore ERROR_CLASS_ALREADY_EXISTS#37

Merged
Berrysoft merged 2 commits into
masterfrom
fix/win32-class-conflict
Jul 1, 2025
Merged

fix(win32): ignore ERROR_CLASS_ALREADY_EXISTS#37
Berrysoft merged 2 commits into
masterfrom
fix/win32-class-conflict

Conversation

@Berrysoft
Copy link
Copy Markdown
Member

Closes #35

The window class we register has nothing special. If we ignore the conflict error, some others might register the window class before us. I don't know if it will cause an attack.

The window class name is changed (the old name contains some history of my code...) and appended with the crate version.

@Berrysoft Berrysoft self-assigned this Jul 1, 2025
@Berrysoft Berrysoft force-pushed the fix/win32-class-conflict branch from f7bbd11 to 8492dd9 Compare July 1, 2025 17:37
@Berrysoft
Copy link
Copy Markdown
Member Author

Guard it behind a non-default feature, because I'm not sure about the consequences.

@Berrysoft Berrysoft merged commit 67c295c into master Jul 1, 2025
9 checks passed
@Berrysoft Berrysoft deleted the fix/win32-class-conflict branch July 1, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using multiple winio instances in the same process will cause panic

1 participant