Windows OLE declarations for thread-local COM initialization and uninitialization.
Imported functions
Stack effects list a C function's parameters with the first parameter on top; see importFunction.
CoInitialize
(pvReserved -- result) Initializes COM on the current thread in single-threaded-apartment mode.Inputs
pvReserved:Natxreserved address; pass0nx.
Outputs
result:Int320when COM is newly initialized on the thread,1when it was already initialized in the same mode, or a negative error code on failure.
CoUninitialize
(--) Uninitializes the COM library for the current thread.Inputs
- None.
Outputs
- None.
Remarks
- Each successful
CoInitializecall, including one returning1, requires oneCoUninitializecall on the same thread.
Signature examples
Printing imported names during compilation shows the exact imported signatures.
"control" use
"windows/ole32" use
{} Int32 {} [
@CoInitialize printStack _:;
@CoUninitialize printStack _:;
0
] "main" exportFunction
Expected Output During Compilation
{pvReserved: Natx;} Int32 {convention: "";} codeRef
{} () {convention: "";} codeRef
See also
- windows/shell32: Shell folder path declarations.
- windows/user32: User32 windowing, message, cursor, monitor, and device-context declarations.