CFMessagePort.CreateLocalPort Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a local message port that receives messages.
public static CoreFoundation.CFMessagePort? CreateLocalPort(string? name, CoreFoundation.CFMessagePort.CFMessagePortCallBack callback, CoreFoundation.CFAllocator? allocator = default);
static member CreateLocalPort : string * CoreFoundation.CFMessagePort.CFMessagePortCallBack * CoreFoundation.CFAllocator -> CoreFoundation.CFMessagePort
Parameters
- name
- String
The name to register, or null to create an unnamed port.
- callback
- CFMessagePort.CFMessagePortCallBack
The callback that handles received messages.
- allocator
- CFAllocator
The allocator to use, or null to use the default allocator.
Returns
A local message port, or null if the port could not be created.
Exceptions
callback is null.
Remarks
If another local port with the same name already exists in the process, Core Foundation returns that port and continues to use its original callback.