Difference between revisions of "SRV:RegisterService"

m (Minor fix.)
(Convert to IPC templates)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
=Request=
 
=Request=
{| class="wikitable" border="1"
+
{{IPC/Request|Request}}
|-
+
{{IPC/RequestHeader|0x0003|4|0}}
!  Index Word
+
{{IPC/RequestEntryRange|2|8-byte UTF-8 service name}}
!  Description
+
{{IPC/RequestEntry|Name length}}
|-
+
{{IPC/RequestEntry|Maximum sessions}}
| 0
+
{{IPC/RequestEnd}}
| Header code [0x00030100]
 
|-
 
| 1-2
 
| 8-byte UTF-8 service name
 
|-
 
| 3
 
| Name length
 
|-
 
| 4
 
| Maximum sessions
 
|}
 
  
 
=Response=
 
=Response=
{| class="wikitable" border="1"
+
{{IPC/Request|Response}}
|-
+
{{IPC/RequestHeader|0x0003|1|2}}
!  Index Word
+
{{IPC/RequestEntry|Result code}}
!  Description
+
{{IPC/MoveHandle|1}}
|-
+
{{IPC/MoveHandleEntry|<code>Handle<[[KServerPort]]></code> which will receive incoming connections to the service.}}
| 0
+
{{IPC/RequestEnd}}
| Header code
+
 
|-
+
This function registers a new service which can be accessed using [[SRV:GetServiceHandle]]. The service manager will create a new client-server port pair, registering the [[KPort|client endpoint]] under the given name, and returning the [[KServerPort|server endpoint]] for the service to listen on for incoming connections.
| 1
 
| Result code
 
|-
 
| 3
 
| Service handle
 
|}
 

Latest revision as of 13:54, 18 September 2024

RequestEdit

Request Word Description
0
Header 0x00030100 Cmd 0x0003 Param 4 Xlat 0
1-2 8-byte UTF-8 service name
3 Name length
4 Maximum sessions

ResponseEdit

Response Word Description
0
Header 0x00030042 Cmd 0x0003 Param 1 Xlat 2
1 Result code
2 Descriptor for moving 1 handle
3 Handle<KServerPort> which will receive incoming connections to the service.

This function registers a new service which can be accessed using SRV:GetServiceHandle. The service manager will create a new client-server port pair, registering the client endpoint under the given name, and returning the server endpoint for the service to listen on for incoming connections.