44 ERR(
"IPT : _RpcXyzPort failed with exception code %lu!\n", pPortThreadInfo->
dwErrorCode);
126 *pModuleName = SysDir;
144 FIXME(
"GMUIAC : Module pDeviceName %S\n",pDeviceName);
148 ERR(
"GetMonitorUIFullName Failed\n");
238 size_t sXcv, smpn = 0,
Size = 0;
247 if ( pMonitorPortName )
249 smpn =
wcslen( pMonitorPortName );
252 Size = sXcv + smpn + 3;
274 pMonitorPortName ? pMonitorPortName :
L"",
297 BYTE OutputData[1024], InputData[4];
330 ERR(
"GMUI : _RpcXcvData failed with exception code %lu!\n", dwErrorCode);
345 (
PBYTE)pOutputString,
353 ERR(
"GMUI : _RpcXcvData failed with exception code %lu!\n", dwErrorCode);
371 ERR(
"GMUI : Memory error\n");
384 if ( fpInitializePrintMonitorUI )
387 *pmui = (
PMONITORUI)(*fpInitializePrintMonitorUI)();
404 ERR(
"GMUI : Failed to open printer handle\n");
414 FIXME(
"GMUI : Error Code Exit %d\n",dwErrorCode);
480 ERR(
"Level = %d, unsupported!\n",
Level);
488 dwErrorCode =
_RpcAddPortEx(
pName, &PortInfoContainer, &PortVarContainer, lpMonitorName);
569 ERR(
"Level = %d, unsupported!\n",
Level);
596 FIXME(
"AddPortW Error %d\n",dwErrorCode);
612 FIXME(
"AddPortW return StartPortThread\n");
619 Ret = (*pmui->pfnAddPortUI)(
pName,
hWnd, pMonitorName,
NULL );
695 Ret = (*pmui->pfnConfigurePortUI)(
pName,
hWnd, pPortName );
741 DWORD dwErrorCode = 0;
749 FIXME(
"DeletePortW Error %d\n",dwErrorCode);
764 Ret = (*pmui->pfnDeletePortUI)(
pName,
hWnd, pPortName );
780 DWORD numentries = 0;
783 TRACE(
"EnumPortsA(%s, %d, %p, %d, %p, %p)\n",
debugstr_a(
pName),
Level, pPorts, cbBuf,
pcbNeeded, pcReturned);
787 ERR(
"Level = %d, unsupported!\n",
Level);
800 needed = cbBuf *
sizeof(
WCHAR);
815 numentries = pcReturned ? *pcReturned : 0;
837 while (
index < numentries)
864 len = entrysize * numentries;
871 while ((
index < numentries) && pPorts)
906 if (pcReturned) *pcReturned = (
res) ? numentries : 0;
911 TRACE(
"returning %d with %d (%d byte for %d of %d entries)\n",
922 TRACE(
"EnumPortsW(%S, %lu, %p, %lu, %p, %p)\n",
pName,
Level, pPorts, cbBuf,
pcbNeeded, pcReturned);
926 ERR(
"Level = %d, unsupported!\n",
Level);
939 ERR(
"_RpcEnumPorts failed with exception code %lu!\n", dwErrorCode);
966 TRACE(
"SetPortA(%s, %s, %lu, %p)\n",
pName, pPortName, dwLevel, pPortInfo);
970 ERR(
"Level = %d, unsupported!\n", dwLevel);
1014 TRACE(
"SetPortW(%S, %S, %lu, %p)\n",
pName, pPortName, dwLevel, pPortInfo);
1018 ERR(
"Level = %d, unsupported!\n", dwLevel);
1024 PortInfoContainer.
Level = dwLevel;
static const WCHAR nameW[]
DWORD _RpcXcvData(WINSPOOL_PRINTER_HANDLE hXcv, const WCHAR *pszDataName, BYTE *pInputData, DWORD cbInputData, BYTE *pOutputData, DWORD cbOutputData, DWORD *pcbOutputNeeded, DWORD *pdwStatus)
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
#define ERROR_INSUFFICIENT_BUFFER
#define ERROR_INVALID_PARAMETER
#define ERROR_MOD_NOT_FOUND
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define ERROR_NOT_SUPPORTED
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
static void cleanup(void)
VOID WINAPI ReleaseActCtx(IN HANDLE hActCtx)
BOOL WINAPI DeactivateActCtx(IN DWORD dwFlags, IN ULONG_PTR ulCookie)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
BOOL WINAPI ProcessIdToSessionId(IN DWORD dwProcessId, OUT PDWORD pSessionId)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
static const WCHAR Cleanup[]
GLuint GLsizei GLsizei * length
#define EXCEPTION_EXECUTE_HANDLER
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
BOOL WINAPI MarshallUpStructuresArray(DWORD cbSize, PVOID pStructuresArray, DWORD cElements, const MARSHALLING_INFO *pInfo, DWORD cbStructureSize, BOOL bSomeBoolean)
static const WCHAR monitorW[]
struct _MONITORUI * PMONITORUI
#define RpcExceptionCode()
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCatNW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, size_t cchToAppend)
STRSAFEAPI StringCbCatW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
WINSPOOL_PORT_INFO_FF * pPortInfoFF
WINSPOOL_PORT_INFO_3 * pPortInfo3
union _WINSPOOL_PORT_CONTAINER::@3435 PortInfo
WINSPOOL_PORT_INFO_1 * pPortInfo1
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
BOOL WINAPI DllFreeSplMem(PVOID pMem)
PVOID WINAPI DllAllocSplMem(DWORD dwBytes)
BOOL WINAPI SetPortW(PWSTR pName, PWSTR pPortName, DWORD dwLevel, PBYTE pPortInfo)
BOOL WINAPI AddPortExW(PWSTR pName, DWORD Level, PBYTE lpBuffer, PWSTR lpMonitorName)
BOOL WINAPI ConfigurePortW(PWSTR pName, HWND hWnd, PWSTR pPortName)
BOOL WINAPI DeletePortW(PWSTR pName, HWND hWnd, PWSTR pPortName)
BOOL WINAPI EnumPortsW(PWSTR pName, DWORD Level, PBYTE pPorts, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
BOOL WINAPI AddPortW(PWSTR pName, HWND hWnd, PWSTR pMonitorName)
DWORD _RpcConfigurePort(WINSPOOL_HANDLE pName, ULONG_PTR hWnd, WCHAR *pPortName)
DWORD _RpcSetPort(WINSPOOL_HANDLE pName, WCHAR *pPortName, WINSPOOL_PORT_CONTAINER *pPortContainer)
DWORD _RpcAddPortEx(WINSPOOL_HANDLE pName, WINSPOOL_PORT_CONTAINER *pPortContainer, WINSPOOL_PORT_VAR_CONTAINER *pPortVarContainer, WCHAR *pMonitorName)
DWORD _RpcDeletePort(WINSPOOL_HANDLE pName, ULONG_PTR hWnd, WCHAR *pPortName)
DWORD _RpcAddPort(WINSPOOL_HANDLE pName, ULONG_PTR hWnd, WCHAR *pMonitorName)
DWORD _RpcEnumPorts(WINSPOOL_HANDLE pName, DWORD Level, BYTE *pPort, DWORD cbBuf, DWORD *pcbNeeded, DWORD *pcReturned)
struct _PORTTHREADINFO PORTTHREADINFO
struct _PORTTHREADINFO * PPORTTHREADINFO
BOOL WINAPI GetMonitorUIFullName(PWSTR pDeviceName, PWSTR *pModuleName)
DWORD WINAPI GetMonitorUI(PWSTR pName, PWSTR pMonitorPortName, PWSTR pXcvName, PMONITORUI *pmui, PMONITORUIDATA *ppmuid)
BOOL FASTCALL StrNCatBuff(PWSTR ptr, size_t Size, PWSTR args,...)
struct _MONITORUIDATA * PMONITORUIDATA
BOOL WINAPI ConfigurePortA(PSTR pName, HWND hWnd, PSTR pPortName)
VOID FASTCALL FreeMonitorUI(PMONITORUIDATA pmuid)
BOOL WINAPI AddPortExA(PSTR pName, DWORD Level, PBYTE lpBuffer, PSTR lpMonitorName)
DWORD(* PPfpFunction)(LPWSTR, ULONG_PTR, LPWSTR)
struct _MONITORUIDATA MONITORUIDATA
BOOL WINAPI StartPortThread(LPWSTR pName, HWND hWnd, LPWSTR pPortName, PPfpFunction fpFunction)
BOOL WINAPI SetPortA(PSTR pName, PSTR pPortName, DWORD dwLevel, PBYTE pPortInfo)
BOOL WINAPI DeletePortA(PSTR pName, HWND hWnd, PSTR pPortName)
PWSTR WINAPI ConstructXcvName(PWSTR pName, PWSTR pMonitorPortName, PWSTR pXcvName)
VOID WINAPI IntPortThread(PPORTTHREADINFO pPortThreadInfo)
BOOL WINAPI AddPortA(PSTR pName, HWND hWnd, PSTR pMonitorName)
BOOL WINAPI GetMonitorUIActivationContext(PWSTR pDeviceName, PMONITORUIDATA pmuid)
BOOL WINAPI EnumPortsA(PSTR pName, DWORD Level, PBYTE pPorts, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
struct _SPOOLER_HANDLE * PSPOOLER_HANDLE
static const MARSHALLING * pPortInfoMarshalling[]
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentProcessId(void)
DWORD(WINAPI * LPTHREAD_START_ROUTINE)(LPVOID)
_In_ DWORD _Out_ PDWORD pcbNeeded
#define ERROR_INVALID_PRINT_MONITOR
#define ERROR_INVALID_LEVEL
#define ERROR_INVALID_PRINTER_NAME
#define ERROR_UNKNOWN_PORT
struct _PORT_INFO_2A * LPPORT_INFO_2A
struct _PORT_INFO_2W * LPPORT_INFO_2W
#define PRINTER_ATTRIBUTE_QUEUED
struct _PORT_INFO_2A PORT_INFO_2A
WINBOOL WINAPI OpenPrinterW(LPWSTR pPrinterName, LPHANDLE phPrinter, LPPRINTER_DEFAULTSW pDefault)
WINBOOL WINAPI ClosePrinter(HANDLE hPrinter)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI SetForegroundWindow(_In_ HWND)
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level