source: trunk/src/wnetap32/service.cpp@ 10366

Last change on this file since 10366 was 6676, checked in by phaller, 24 years ago

.

File size: 5.2 KB
Line 
1/* $Id: service.cpp,v 1.1 2001-09-07 08:20:58 phaller Exp $ */
2
3/*
4 *
5 * Project Odin Software License can be found in LICENSE.TXT
6 *
7 */
8/*
9 * NETAPI32 service manager APIs
10 *
11 * Copyright 1998 Patrick Haller
12 *
13 * Note: functions that return structures/buffers seem to append strings
14 * at the end of the buffer. Currently, we just allocate the strings
15 * "normally". Therefore a caller that just does a NetApiBufferFree() on the
16 * returned buffer will leak all allocated strings.
17 *
18 */
19
20
21/****************************************************************************
22 * Includes *
23 ****************************************************************************/
24
25#include <odin.h>
26#include <odinwrap.h>
27#include <os2win.h>
28#include <misc.h>
29#include <unicode.h>
30#include <heapstring.h>
31#include <string.h>
32#include <winconst.h>
33
34#include "oslibnet.h"
35#include "lanman.h"
36
37ODINDEBUGCHANNEL(WNETAP32-SERVICE)
38
39
40/****************************************************************************
41 * Module Global Variables *
42 ****************************************************************************/
43
44#define NCBNAMSZ 16
45#define MAX_LANA 254
46
47
48/*****************************************************************************
49 * Name : NET_API_STATUS NetServiceControl
50 * Purpose : controls operations of network services
51 * Parameters: LPWSTR lpServerName
52 * LPWSTR lpService
53 * DWORD dwOpcode
54 * DWORD dwArgument
55 * LPBYTE* bufptr
56 * Variables :
57 * Result :
58 * Remark :
59 * Status : UNTESTED STUB
60 *
61 * Author : Patrick Haller [Thu, 1999/08/18 00:15]
62 *****************************************************************************/
63
64ODINFUNCTION5(NET_API_STATUS, OS2NetServiceControl,
65 LPWSTR, lpServerName,
66 LPWSTR, lpService,
67 DWORD, dwOpcode,
68 DWORD, dwArgument,
69 LPBYTE*, bufptr)
70{
71 dprintf(("NETAPI32: NetServiceControl(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented\n",
72 lpServerName,
73 lpService,
74 dwOpcode,
75 dwArgument,
76 bufptr));
77
78 return (NERR_BASE);
79}
80
81
82/*****************************************************************************
83 * Name : NET_API_STATUS NetServiceEnum
84 * Purpose : retrieves information about all started services
85 * Parameters: LPWSTR lpServerName
86 * DWORD dwLevel
87 * LPBYTE* bufptr
88 * DWORD dwPrefMaxLen
89 * LPDWORD lpdEntriesRead
90 * LPDWORD lpdTotalEntries
91 * LPDWORD lpdResumeHandle
92 * Variables :
93 * Result :
94 * Remark :
95 * Status : UNTESTED STUB
96 *
97 * Author : Patrick Haller [Thu, 1999/08/18 00:15]
98 *****************************************************************************/
99
100ODINFUNCTION7(NET_API_STATUS, OS2NetServiceEnum,
101 LPWSTR, lpServerName,
102 DWORD, dwLevel,
103 LPBYTE*, bufptr,
104 DWORD, dwPrefMaxLen,
105 LPDWORD, lpdEntriesRead,
106 LPDWORD, lpdTotalEntries,
107 LPDWORD, lpdResumeHandle)
108{
109 dprintf(("NETAPI32: NetServiceEnum(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented\n",
110 lpServerName,
111 dwLevel,
112 bufptr,
113 dwPrefMaxLen,
114 lpdEntriesRead,
115 lpdTotalEntries,
116 lpdResumeHandle));
117
118 return (NERR_BASE);
119}
120
121
122/*****************************************************************************
123 * Name : NET_API_STATUS NetServiceGetInfo
124 * Purpose : retrieves information about a particular started service
125 * Parameters: LPWSTR lpServerName
126 * LPWSTR lpService
127 * DWORD dwLevel
128 * LPBYTE* bufptr
129 * Variables :
130 * Result :
131 * Remark :
132 * Status : UNTESTED STUB
133 *
134 * Author : Patrick Haller [Thu, 1999/08/18 00:15]
135 *****************************************************************************/
136
137ODINFUNCTION4(NET_API_STATUS, OS2NetServiceGetInfo,
138 LPWSTR, lpServerName,
139 LPWSTR, lpService,
140 DWORD, dwLevel,
141 LPBYTE*, bufptr)
142{
143 dprintf(("NETAPI32: NetServiceGetInfo(%08xh,%08xh,%08xh,%08xh) not implemented\n",
144 lpServerName,
145 lpService,
146 dwLevel,
147 bufptr));
148
149 return (NERR_BASE);
150}
151
152
153/*****************************************************************************
154 * Name : NET_API_STATUS NetServiceInstall
155 * Purpose : starts a network service
156 * Parameters: LPWSTR lpServerName
157 * LPWSTR lpService
158 * DWORD argc
159 * LPWSTR argv[]
160 * LPBYTE* bufptr
161 * Variables :
162 * Result :
163 * Remark :
164 * Status : UNTESTED STUB
165 *
166 * Author : Patrick Haller [Thu, 1999/08/18 00:15]
167 *****************************************************************************/
168
169ODINFUNCTION5(NET_API_STATUS, OS2NetServiceInstall,
170 LPWSTR, lpServerName,
171 LPWSTR, lpService,
172 DWORD, argc,
173 LPWSTR*, argv,
174 LPBYTE*, bufptr)
175{
176 dprintf(("NETAPI32: NetServiceInstall not implemented\n"));
177
178 return (NERR_BASE);
179}
Note: See TracBrowser for help on using the repository browser.