20 TRACE(
"FindPort(%S)\n", pwszName);
74 TRACE(
"InitializePortList()\n");
109 ERR(
"DllAllocSplMem failed!\n");
117 bReturnValue = ((
LPMONITOREX)pPrintMonitor->
pMonitor)->Monitor.pfnEnumPorts(
NULL, 1, (
PBYTE)pPortInfo1, cbNeeded, &cbNeeded, &dwReturned);
129 for (
i = 0;
i < dwReturned;
i++)
138 ERR(
"DllAllocSplMem failed!\n");
174 TRACE(
"LocalEnumPorts(%S, %lu, %p, %lu, %p, %p)\n",
pName,
Level, pPorts, cbBuf,
pcbNeeded, pcReturned);
181 cbCallBuffer = cbBuf;
182 pCallBuffer = pPorts;
196 bReturnValue = ((
LPMONITOREX)pPrintMonitor->
pMonitor)->Monitor.pfnEnumPorts(
pName,
Level, pCallBuffer, cbCallBuffer, &cbNeeded, &dwReturned);
200 *pcReturned += dwReturned;
203 if (cbNeeded < cbCallBuffer)
204 cbCallBuffer -= cbNeeded;
210 pCallBuffer += cbNeeded;
241 if ((!
pi) || (!lpMonitorName) || (!lpMonitorName[0]))
303 if (!pMonitorName[0])
331 DWORD cbNeeded, cReturned,
i;
344 for (
i = 0;
i < cReturned;
i++ )
368 FIXME(
"LocalConfigurePort(%S, %p, %S)\n",
pName,
hWnd, pPortName);
467 TRACE(
"LocalSetPort(%S, %S, %lu, %p)\n",
pName, pPortName, dwLevel, pPortInfo);
477 if ((dwLevel < 1) || (dwLevel > 2))
496 FIXME(
"Add Status Support to Local Ports!\n");
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
#define ERROR_INVALID_PARAMETER
#define ERROR_NOT_SUPPORTED
#define ERROR_INVALID_NAME
static const WCHAR Cleanup[]
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define InitializeListHead(ListHead)
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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
PLOCAL_PRINT_MONITOR FindPrintMonitor(PCWSTR pwszName)
LIST_ENTRY PrintMonitorList
struct _MONITOR2 * PMONITOR2
struct _MONITOREX * LPMONITOREX
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
base of all file and directory entries
struct _LIST_ENTRY * Flink
PLOCAL_PRINT_MONITOR pPrintMonitor
#define CONTAINING_RECORD(address, type, field)
BOOL WINAPI DllFreeSplMem(PVOID pMem)
PVOID WINAPI DllAllocSplMem(DWORD dwBytes)
BOOL WINAPI LocalSetPort(PWSTR pName, PWSTR pPortName, DWORD dwLevel, PBYTE pPortInfo)
BOOL WINAPI LocalConfigurePort(PWSTR pName, HWND hWnd, PWSTR pPortName)
BOOL WINAPI LocalAddPort(LPWSTR pName, HWND hWnd, LPWSTR pMonitorName)
BOOL CreatePortEntry(PCWSTR pwszName, PLOCAL_PRINT_MONITOR pPrintMonitor)
BOOL InitializePortList(void)
BOOL WINAPI LocalDeletePort(PWSTR pName, HWND hWnd, PWSTR pPortName)
static LIST_ENTRY _PortList
PLOCAL_PORT FindPort(PCWSTR pwszName)
BOOL WINAPI LocalAddPortEx(PWSTR pName, DWORD Level, PBYTE lpBuffer, PWSTR lpMonitorName)
BOOL WINAPI LocalEnumPorts(PWSTR pName, DWORD Level, PBYTE pPorts, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
LONG copy_servername_from_name(LPCWSTR name, LPWSTR target)
DWORD WINAPI GetLastError(void)
_In_ DWORD _Out_ PDWORD pcbNeeded
#define ERROR_INVALID_LEVEL
#define ERROR_UNKNOWN_PORT
struct _PORT_INFO_3W * PPORT_INFO_3W
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level