https://github.com/compnerd/swift-com
Swift/COM+
https://github.com/compnerd/swift-com
compiler swift windows
Last synced: 12 months ago
JSON representation
Swift/COM+
- Host: GitHub
- URL: https://github.com/compnerd/swift-com
- Owner: compnerd
- License: bsd-3-clause
- Created: 2020-09-27T17:54:08.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-11-23T00:18:03.000Z (over 3 years ago)
- Last Synced: 2025-05-29T20:49:40.894Z (about 1 year ago)
- Topics: compiler, swift, windows
- Language: Swift
- Homepage:
- Size: 209 KB
- Stars: 69
- Watchers: 5
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Swift/COM
Swift/COM bridges COM interfaces to Swift by generating Swift interfaces for the COM interface.
```swift
import SwiftCOM
import WinSDK
try! CoInitializeEx(COINIT_MULTITHREADED)
if let pFD = try? IFileDialog.CreateInstance(class: CLSID_FileOpenDialog) {
try pFD.Show(nil)
}
```
The current approach is to manually construct high-level interfaces to a handful of COM+ interfaces to enable reflection into the system. It would then allow for the generation of Swift bindings to the COM interface via C. These interfaces can then be wrapped for more idiomatic access.