ReactOS 0.4.17-dev-116-ga4b6fe9
netsh_undoc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

VOID WINAPI FreeQuotedString (_In_ LPWSTR pszQuotedString)
 
VOID WINAPI FreeString (_In_ LPWSTR pszString)
 
LPWSTR WINAPI MakeQuotedString (_In_ LPWSTR pszString)
 
LPWSTR CDECL MakeString (_In_ HANDLE hModule, _In_ DWORD dwMsgId,...)
 
DWORD WINAPI MatchTagsInCmdLine (_In_ HANDLE hModule, _Inout_ LPWSTR *ppwcArguments, _In_ DWORD dwCurrentIndex, _In_ DWORD dwArgCount, _In_ TAG_TYPE *pttTags, _In_ DWORD dwTagCount, _Out_ DWORD *pdwTagType)
 
DWORD WINAPI NsGetFriendlyNameFromIfName (_In_ DWORD dwParam1, _In_ PWSTR pszIfName, _Inout_ PWSTR pszFriendlyName, _Inout_ PDWORD pdwFriendlyName)
 

Function Documentation

◆ FreeQuotedString()

VOID WINAPI FreeQuotedString ( _In_ LPWSTR  pszQuotedString)

Definition at line 270 of file netsh.c.

272{
273 DPRINT("FreeQuotedString(%S)\n", pszQuotedString);
274 HeapFree(GetProcessHeap(), 0, pszQuotedString);
275}
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
#define DPRINT
Definition: sndvol32.h:73

◆ FreeString()

VOID WINAPI FreeString ( _In_ LPWSTR  pszString)

Definition at line 279 of file netsh.c.

281{
282 DPRINT("FreeString(%S)\n", pszString);
283 LocalFree(pszString);
284}
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594

Referenced by CreateProcessInternalW(), IKsFilterFactory_fnInitialize(), and LoadLibraryExW().

◆ MakeQuotedString()

LPWSTR WINAPI MakeQuotedString ( _In_ LPWSTR  pszString)

Definition at line 288 of file netsh.c.

290{
291 LPWSTR pszQuotedString;
292
293 DPRINT("MakeQuotedString(%S)\n", pszString);
294
295 pszQuotedString = HeapAlloc(GetProcessHeap(), 0, (wcslen(pszString) + 3) * sizeof(WCHAR));
296 if (pszQuotedString == NULL)
297 return NULL;
298
299 _swprintf(pszQuotedString, L"\"%s\"", pszString);
300
301 return pszQuotedString;
302}
#define NULL
Definition: types.h:112
#define HeapAlloc
Definition: compat.h:733
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2983
#define L(x)
Definition: resources.c:13
#define _swprintf(buf, format,...)
Definition: sprintf.c:56
short WCHAR
Definition: pedump.c:58
uint16_t * LPWSTR
Definition: typedefs.h:56

◆ MakeString()

LPWSTR CDECL MakeString ( _In_ HANDLE  hModule,
_In_ DWORD  dwMsgId,
  ... 
)

Definition at line 306 of file netsh.c.

310{
311 LPCWSTR pszStr;
312 LPWSTR pszInBuffer, pszOutBuffer = NULL;
314 va_list ap;
315
316 DPRINT("MakeString(%p %lu ...)\n", hModule, dwMsgId);
317
318 dwLength = LoadStringW(hModule, dwMsgId, (LPWSTR)&pszStr, 0);
319 if (dwLength == 0)
320 return NULL;
321
322 /* Allocate and copy the resource string, NUL-terminated */
323 pszInBuffer = HeapAlloc(GetProcessHeap(), 0, (dwLength + 1) * sizeof(WCHAR));
324 if (pszInBuffer == NULL)
325 return NULL;
326 CopyMemory(pszInBuffer, pszStr, dwLength * sizeof(WCHAR));
327 pszInBuffer[dwLength] = UNICODE_NULL;
328
329 va_start(ap, dwMsgId);
331 pszInBuffer,
332 0,
333 0,
334 (LPWSTR)&pszOutBuffer,
335 0,
336 &ap);
337 va_end(ap);
338
339 HeapFree(GetProcessHeap(), 0, pszInBuffer);
340
341 return pszOutBuffer;
342}
HMODULE hModule
Definition: animate.c:44
static DWORD DWORD * dwLength
Definition: fusion.c:86
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:583
#define va_end(v)
Definition: stdarg.h:28
#define va_start(v, l)
Definition: stdarg.h:26
char * va_list
Definition: vadefs.h:50
unsigned long DWORD
Definition: ntddk_ex.h:95
#define CopyMemory
Definition: minwinbase.h:29
#define UNICODE_NULL
#define LoadStringW
Definition: utils.h:64
const uint16_t * LPCWSTR
Definition: typedefs.h:57
#define FORMAT_MESSAGE_FROM_STRING
Definition: winbase.h:398
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Definition: winbase.h:396
void int int ULONGLONG int va_list * ap
Definition: winesup.h:36

◆ MatchTagsInCmdLine()

DWORD WINAPI MatchTagsInCmdLine ( _In_ HANDLE  hModule,
_Inout_ LPWSTR ppwcArguments,
_In_ DWORD  dwCurrentIndex,
_In_ DWORD  dwArgCount,
_In_ TAG_TYPE pttTags,
_In_ DWORD  dwTagCount,
_Out_ DWORD pdwTagType 
)

Definition at line 374 of file netsh.c.

382{
383 DWORD i;
384
385 DPRINT1("MatchTagsInCmdLine(%p %p %lu %lu %p %lu %p) stub!\n",
387 pttTags, dwTagCount, pdwTagType);
388
389 for (i = dwCurrentIndex; i < dwArgCount; i++)
390 {
391 DPRINT1("Argument %lu: %S\n", i, ppwcArguments[i]);
392 }
393
394 for (i = 0; i < dwTagCount; i++)
395 {
396 DPRINT1("Tag %lu: %S\n", i, pttTags[i].pwszTag);
397 }
398
399 return 0;
400}
#define DPRINT1
Definition: precomp.h:8
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
_In_ LPWSTR * ppwcArguments
Definition: netsh.h:114
_In_ LPWSTR _In_ DWORD dwArgCount
Definition: netsh.h:115
_In_ LPWSTR _In_ DWORD dwCurrentIndex
Definition: netsh.h:139

◆ NsGetFriendlyNameFromIfName()

DWORD WINAPI NsGetFriendlyNameFromIfName ( _In_ DWORD  dwParam1,
_In_ PWSTR  pszIfName,
_Inout_ PWSTR  pszFriendlyName,
_Inout_ PDWORD  pdwFriendlyName 
)

Definition at line 418 of file netsh.c.

423{
424 UNICODE_STRING UnicodeIfName;
427 DWORD ret;
428
429 DPRINT("NsGetFriendlyNameFromIfName(%lx %S %p %p)\n",
430 dwUnknown1, pszIfName, pszFriendlyName, pdwFriendlyName);
431
432 RtlInitUnicodeString(&UnicodeIfName, pszIfName);
433 Status = RtlGUIDFromString(&UnicodeIfName,
435 if (!NT_SUCCESS(Status))
436 {
437 DPRINT1("RtlGUIDFromString failed 0x%08lx\n", Status);
439 }
440
442 pszFriendlyName,
443 pdwFriendlyName,
444 0, 0);
445 if (ret != ERROR_SUCCESS)
446 {
447 DPRINT1("NhGetInterfaceNameFromDeviceGuid() failed %lu\n", ret);
448 }
449
450 return ret;
451}
LONG NTSTATUS
Definition: precomp.h:26
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
return ret
Definition: mutex.c:146
Status
Definition: gdiplustypes.h:25
DWORD WINAPI NhGetInterfaceNameFromDeviceGuid(_In_ const GUID *pInterfaceGUID, _Out_writes_bytes_to_(*pOutBufLen, *pOutBufLen) PWCHAR pInterfaceName, _Inout_ PULONG pOutBufLen, DWORD dwUnknown4, DWORD dwUnknown5)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING, GUID *)
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
static const GUID InterfaceGuid
Definition: wlanapi.c:25