DEBUG.C
资源名称:MSDN_VC98.zip [点击查看]
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:25k
源码类别:
Windows编程
开发平台:
Visual C++
- //THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- //ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- //THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- // PARTICULAR PURPOSE.
- //
- // Copyright 1994-1997 Microsoft Corporation. All Rights Reserved.
- //
- // FILE:
- // DEBUG.C
- //
- // PURPOSE:
- // Debugging routines.
- //
- // PLATFORMS:
- // Windows 95, Windows NT
- //
- // SPECIAL INSTRUCTIONS: N/A
- //
- // Windows Header Files:
- #pragma warning(disable:4001) // Single-line comment warnings
- #pragma warning(disable:4115) // Named type definition in parentheses
- #pragma warning(disable:4201) // Nameless struct/union warning
- #pragma warning(disable:4214) // Bit field types other than int warnings
- #pragma warning(disable:4514) // Unreferenced inline function has been removed
- // Windows Header Files:
- #include <Windows.h>
- #include <WindowsX.h>
- #include <icm.h>
- // Restore the warnings--leave the single-line comment warning OFF
- #pragma warning(default:4115) // Named type definition in parentheses
- #pragma warning(default:4201) // Nameless struct/union warning
- #pragma warning(default:4214) // Bit field types other than int warnings
- #pragma warning(default:4514) // Unreferenced inline function has been removed
- // C RunTime Header Files
- #include <stdio.h>
- #include <TCHAR.H>
- #include <stdlib.h>
- // Local Header Files
- #include "icmview.h"
- #include "dibinfo.h"
- #define I_AM_DEBUG
- #include "Debug.h"
- #undef I_AM_DEBUG
- // local definitions
- // default settings
- // external functions
- // external data
- // public data
- // private data
- // public functions
- // private functions
- //////////////////////////////////////////////////////////////////////////
- // Function: _Assert
- //
- // Description:
- // Replacement assertion function
- //
- // Parameters:
- // LPSTR Name of file
- // UINT Line number@@@
- //
- // Returns:
- // void
- //
- // Comments:
- //
- //
- //////////////////////////////////////////////////////////////////////////
- void _Assert(LPSTR strFile, UINT uiLine)
- {
- // Local variables
- char stAssert[255];
- // Initialize variables
- wsprintfA(stAssert, "Assertion failed %s, line %urn", strFile, uiLine);
- OutputDebugStringA(stAssert);
- } // End of function _Assert
- ///////////////////////////////////////////////////////////////////////////
- //
- // FUNCTION: DebugMsg
- //
- // PURPOSE:
- // To provide a printf type DebugMsg function.
- //
- // PARAMETERS:
- // LPTSTR Format string
- // <variable arguments> printf-style arguments
- //
- // RETURN VALUE:
- // void
- //
- // COMMENTS:
- //
- ///////////////////////////////////////////////////////////////////////////
- void DebugMsg (LPTSTR lpszMessage,...)
- {
- #ifdef _DEBUG
- va_list VAList;
- TCHAR szMsgBuf[256];
- // Pass the variable parameters to wvsprintf to be formated.
- va_start(VAList, lpszMessage);
- wvsprintf(szMsgBuf, lpszMessage, VAList);
- va_end(VAList);
- ASSERT(lstrlen((LPTSTR)szMsgBuf) < MAX_DEBUG_STRING);
- OutputDebugString(szMsgBuf);
- #endif
- lpszMessage = lpszMessage; // Eliminates 'unused formal parameter' warning
- }
- void DebugMsgA (LPSTR lpszMessage,...)
- {
- #ifdef _DEBUG
- va_list VAList;
- char szMsgBuf[256];
- // Pass the variable parameters to wvsprintf to be formated.
- va_start(VAList, lpszMessage);
- wvsprintfA(szMsgBuf, lpszMessage, VAList);
- va_end(VAList);
- ASSERT(strlen((LPSTR)szMsgBuf) < MAX_DEBUG_STRING);
- OutputDebugStringA(szMsgBuf);
- #endif
- lpszMessage = lpszMessage; // Eliminates 'unused formal parameter' warning
- }
- ///////////////////////////////////////////////////////////////////////////
- //
- // FUNCTION: ErrMsg
- //
- // PURPOSE:
- // To provide a printf type error message box.
- //
- // PARAMETERS:
- // LPTSTR wsprintf-style format string
- // ... formatting information
- //
- // RETURN VALUE:
- // Value from MessageBox function; 0 if failure, non-zero
- // otherwise. For specific values, see MessageBox.
- //
- // COMMENTS:
- //
- ///////////////////////////////////////////////////////////////////////////
- int ErrMsg (HWND hwndOwner, LPTSTR lpszMessage,...)
- {
- va_list VAList;
- TCHAR szMsgBuf[256];
- // Pass the variable parameters to wvsprintf to be formated.
- va_start(VAList, lpszMessage);
- wvsprintf(szMsgBuf, lpszMessage, VAList);
- va_end(VAList);
- ASSERT(lstrlen((LPTSTR)szMsgBuf) < MAX_DEBUG_STRING);
- return(MessageBox(hwndOwner, (LPCTSTR)szMsgBuf, (LPCTSTR)__TEXT("Error"), MB_ICONSTOP|MB_APPLMODAL));
- }
- //////////////////////////////////////////////////////////////////////////
- // Function: DumpMemory
- //
- // Description:
- // Dumps values at specified memory.
- //
- // Parameters:
- // LPVOID Pointer to memory
- // UINT Size of each element, i.e. 8 or 16
- // UINT Number of elements to dump.
- //
- // Returns:
- // void
- //
- // Comments:
- // -Need to add validation of uiElementSize.
- // -uiElementSize * uiNumElements should not exceed the size
- // of the buffer; otherwise, wacky and wonderful events will
- // take place.
- //
- //////////////////////////////////////////////////////////////////////////
- void DumpMemory(LPBYTE lpbMem, UINT uiElementSize, UINT uiNumElements)
- {
- // Local variables
- UINT uiIdx;
- uiElementSize = uiElementSize; // Eliminates 'unused formal parameters'
- // Initialize variables
- for (uiIdx = 0; uiIdx < uiNumElements; uiIdx++)
- {
- if (uiIdx == 0 || ((uiIdx % 16) == 0))
- {
- DebugMsg(__TEXT("rn0x%08Xt"), (DWORD)(lpbMem + (uiIdx)));
- }
- DebugMsg(__TEXT("%02x "), (WORD)*(lpbMem + uiIdx));
- }
- } // End of function DumpMemory
- //////////////////////////////////////////////////////////////////////////
- // Function: DumpProfile
- //
- // Description:
- // Dumps the PROFILE structure provided.
- //
- // Parameters:
- // PPROFILE Pointer to the profile.
- //
- // Returns:
- // void
- //
- // Comments:
- //////////////////////////////////////////////////////////////////////////
- void DumpProfile(PPROFILE pProfile)
- {
- // Local variables
- TCHAR stProfileType[MAX_PATH];
- // Initialize variables
- if (pProfile == NULL)
- {
- DebugMsg(__TEXT("DEBUG.C : DumpProfile : NULL pProfilern"));
- return;
- }
- // Set type string
- _tcscpy(stProfileType, __TEXT("UNKNOWN"));
- if (PROFILE_FILENAME == pProfile->dwType)
- {
- _tcscpy(stProfileType, __TEXT("FILE"));
- }
- if (PROFILE_MEMBUFFER == pProfile->dwType)
- {
- _tcscpy(stProfileType, __TEXT("MEMBUFFER"));
- }
- DebugMsg(__TEXT("***** PROFILE *****rn"));
- DebugMsg(__TEXT("pProfile 0x%08lXrn"), pProfile);
- DebugMsg(__TEXT("dwType %srn"), stProfileType);
- DebugMsg(__TEXT("pProfileData 0x%08lXrn"), pProfile->pProfileData);
- if (PROFILE_FILENAME == pProfile->dwType)
- {
- DebugMsg(__TEXT("Filename %srn"), pProfile->pProfileData);
- }
- DebugMsg(__TEXT("cbDataSize %ldrnrn"), pProfile->cbDataSize);
- } // End of function DumpMemory
- //////////////////////////////////////////////////////////////////////////
- // Function: DumpRectangle
- //
- // Description:
- // Dumps the coordinates of a rectangle structure
- //
- // Parameters:
- // LPTSTR Comment
- // LPRECT Rectangle to dump
- //
- // Returns:
- // void
- //
- // Comments:
- //
- //
- //////////////////////////////////////////////////////////////////////////
- void DumpRectangle(LPTSTR lpszDesc, LPRECT lpRect)
- {
- DebugMsg(__TEXT("%s: %ld, %ld, %ld, %ldrn"), lpszDesc, lpRect->left, lpRect->top, lpRect->right,
- lpRect->bottom);
- } // End of function DumpRectangle
- //////////////////////////////////////////////////////////////////////////
- // Function: SafeFree
- //
- // Description:
- // Debug Free routine which checks lock counts and return codes.
- //
- // Parameters:
- // @@@
- //
- // Returns:
- // HGLOBAL
- //
- // Comments:
- // This function assumes that the HGLOBAL object has been unlocked;
- // if not, the item will still be freed, but a warning message will
- // be displayed. This is useful for tracking down items which have
- // been locked without being unlocked.
- //
- // The last error value will be preserved if no error occurs in this
- // function. If an error does occur, it will be passed to the calling
- // function.
- //
- //////////////////////////////////////////////////////////////////////////
- HGLOBAL SafeFree(LPTSTR lpszFile, UINT uiLine, HGLOBAL hMemory)
- {
- // Local variables
- UINT uiLockCount, uiFlags;
- DWORD dwLastError;
- HGLOBAL hFreed; // Return from GlobalFree
- TCHAR szName[MAX_PATH], szExt[MAX_PATH];
- // Initialize variables
- _tsplitpath(lpszFile, NULL, NULL, szName, szExt);
- wsprintf(lpszFile,__TEXT("%s%s"), szName, szExt);
- if (NULL == hMemory)
- {
- DebugMsg(__TEXT("%s(%lu) : SafeFree: NULL hMem!!! This will cause an exception!!!! Fix it!!!rn"), lpszFile, uiLine);
- DebugBreak();
- return(NULL);
- }
- SetLastError(0);
- hFreed = GlobalFree(hMemory);
- if (NULL != hFreed) // unsuccessful free
- {
- dwLastError = GetLastError();
- uiFlags = GlobalFlags(hMemory);
- uiLockCount = uiFlags & GMEM_LOCKCOUNT;
- uiFlags = HIBYTE(LOWORD(uiFlags));
- DebugMsg(__TEXT("SafeFree : <%s(%lu)> failedtLastError = %ld, Flags = %lu, Lock Count = %lurn"),
- lpszFile, uiLine, dwLastError, uiFlags, uiLockCount);
- }
- return(hFreed);
- } // End of function SafeFree
- //////////////////////////////////////////////////////////////////////////
- // Function: SafeUnlock
- //
- // Description:
- // Unlocks handle and displays the lock count and flags information.
- //
- // Parameters:
- // @@@
- //
- // Returns:
- // BOOL
- //
- // Comments:
- //
- //
- //////////////////////////////////////////////////////////////////////////
- BOOL SafeUnlock(LPTSTR lpszFile, UINT uiLine, HGLOBAL hMemory)
- {
- // Local variables
- BOOL bUnlocked;
- UINT uiLockCount, uiFlags;
- DWORD dwLastError;
- TCHAR szName[MAX_PATH], szExt[MAX_PATH];
- // Initialize variables
- _tsplitpath(lpszFile, NULL, NULL, szName, szExt);
- wsprintf(lpszFile, __TEXT("%s%s"), szName, szExt);
- if (NULL == hMemory)
- {
- DebugMsg(__TEXT("%s(%lu) : SafeUnlock: NULL hMemrn"), lpszFile, uiLine);
- return(0);
- }
- SetLastError(0);
- bUnlocked = GlobalUnlock(hMemory);
- dwLastError = GetLastError();
- uiFlags = GlobalFlags(hMemory);
- uiLockCount = uiFlags & GMEM_LOCKCOUNT;
- if (0 != dwLastError)
- {
- uiFlags = HIBYTE(LOWORD(uiFlags));
- }
- DebugMsg(__TEXT("SafeUnlock : <%s(%lu)>tGlobalUnlock(0x%08lX) returned %4d w/LastError = %4ld, Lock Count = %4lu, Flags = %4lurn"),
- lpszFile, uiLine, hMemory, bUnlocked, dwLastError, uiLockCount, uiFlags);
- return(bUnlocked);
- } // End of function SafeUnlock
- //////////////////////////////////////////////////////////////////////////
- // Function: SafeLock
- //
- // Description:
- // Locks memory and reports lock count.
- //
- // Parameters:
- // @@@
- //
- // Returns:
- // LPVOID
- //
- // Comments:
- //
- //
- //////////////////////////////////////////////////////////////////////////
- LPVOID SafeLock(LPTSTR lpszFile, UINT uiLine, HGLOBAL hMemory)
- {
- // Local variables
- LPVOID lpMem;
- UINT uiLockCount, uiFlags;
- DWORD dwLastError;
- TCHAR szName[MAX_PATH], szExt[MAX_PATH];
- // Initialize variables
- _tsplitpath(lpszFile, NULL, NULL, szName, szExt);
- wsprintf(lpszFile, __TEXT("%s%s"), szName, szExt);
- if (NULL == hMemory)
- {
- DebugMsg(__TEXT("%s(%lu) : SafeLock: NULL hMemrn"), lpszFile, uiLine);
- return((LPVOID)NULL);
- }
- SetLastError(0);
- lpMem = GlobalLock(hMemory);
- dwLastError = GetLastError();
- uiFlags = GlobalFlags(hMemory);
- uiLockCount = uiFlags & GMEM_LOCKCOUNT;
- uiFlags = HIBYTE(LOWORD(uiFlags));
- DebugMsg(__TEXT("SafeLock : <%s(%lu)>tGlobalLock(0x%08lX) returned 0x%08lX w/LastError = %ld, Lock Count = %lu, Flags = %lurn"),
- lpszFile, uiLine, hMemory, lpMem, dwLastError, uiLockCount, uiFlags);
- return(lpMem);
- } // End of function SafeLock
- //////////////////////////////////////////////////////////////////////////
- // Function: FormatLastError
- //
- // Description:
- // Allocates and formats a string of LastError's text-equivalent message.
- // If the caller requests, the message will be displayed and the memory
- // will be deallocated.
- //
- // Parameters:
- // LPTSTR Name of file where error occured
- // UINT Line of file at which point error occured
- // DWORD Numeric value of LastError
- // UINT Display and free indicator
- // LASTERROR_NOALLOC Display via DebugMsg and deallocate
- // LASTERROR_ALLOC Return pointer to allocated string
- //
- // Returns:
- // BOOL
- //
- // Comments:
- // Caller must free memory returned by this function.
- //
- //////////////////////////////////////////////////////////////////////////
- LPTSTR FormatLastError(LPTSTR lpszFile, UINT uiLine, UINT uiOutput, DWORD dwLastError)
- {
- // Local variables
- LPTSTR lpszLastErrorMsg;
- LPTSTR lpszDebugMsg;
- DWORD cbBytes;
- // Initialize variables
- lpszLastErrorMsg = NULL;
- cbBytes = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER
- | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- dwLastError,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), //The user default language
- (LPTSTR) &lpszLastErrorMsg,
- 0,
- NULL );
- if (0 == cbBytes) // Error occured in FormatMessage
- {
- SetLastError(dwLastError); // restore the last error to time of call
- }
- // Create the error message
- lpszDebugMsg = GlobalAlloc(GPTR, ((cbBytes + 512) * sizeof(TCHAR)));
- ASSERT(NULL != lpszDebugMsg);
- wsprintf(lpszDebugMsg, __TEXT("<%s(%lu)>:rntLastError(ld, lu) = (%ld, %lu)rntt%srn"),
- lpszFile,
- uiLine,
- dwLastError,
- dwLastError,
- NULL != lpszLastErrorMsg ? lpszLastErrorMsg : __TEXT("UNKNOWN LASTERROR"));
- // Free the buffer memory if requested
- if (LASTERROR_NOALLOC == uiOutput)
- {
- DebugMsg(lpszDebugMsg);
- GlobalFree(lpszDebugMsg);
- }
- // Always free the string created by FormatMessage
- if (NULL != lpszLastErrorMsg)
- {
- GlobalFree(lpszLastErrorMsg);
- }
- return(lpszDebugMsg);
- } // End of function FormatLastError
- //////////////////////////////////////////////////////////////////////////
- // Function: DumpBITMAPFILEHEADER
- //
- // Description:
- // Dumps the contents of a BITMAPFILEHEADER.
- //
- // Parameters:
- // @@@
- //
- // Returns:
- // void
- //
- // Comments:
- //
- //
- //////////////////////////////////////////////////////////////////////////
- void DumpBITMAPFILEHEADER(LPBITMAPFILEHEADER lpBmpFileHeader)
- {
- // Local variables
- DebugMsg(__TEXT("////////////////// BITMAPFILEHEADER ///////////////////rn"));
- DebugMsg(__TEXT("sizeof(BITMAPFILEHEADER) %ldrn"), sizeof(BITMAPFILEHEADER));
- DebugMsg(__TEXT("bfType 0x%04xrn"), lpBmpFileHeader->bfType);
- DebugMsg(__TEXT("bfSize %ldrn"), lpBmpFileHeader->bfSize);
- DebugMsg(__TEXT("bfReserved1 %drn"), lpBmpFileHeader->bfReserved1);
- DebugMsg(__TEXT("bfReserved2 %drn"), lpBmpFileHeader->bfReserved1);
- DebugMsg(__TEXT("bfOffBits %ldrn"), lpBmpFileHeader->bfOffBits);
- DebugMsg(__TEXT("///////////////////////////////////////////////////////rn"));
- // Initialize variables
- } // End of function DumpBITMAPFILEHEADER
- //////////////////////////////////////////////////////////////////////////
- // Function: DumpBITMAPINFOHEADER
- //
- // Description:
- // Dumps a BITMAPINFO header structure.
- //
- // Parameters:
- // @@@
- //
- // Returns:
- // void
- //
- // Comments:
- //
- //
- //////////////////////////////////////////////////////////////////////////
- void DumpBmpHeader(LPVOID lpvBmpHeader)
- {
- // Local variables
- LPBITMAPV5HEADER lpBmpV5Header;
- TCHAR stNumText[MAX_PATH];
- // Initialize variables
- lpBmpV5Header = (LPBITMAPV5HEADER)lpvBmpHeader;
- switch (lpBmpV5Header->bV5Size)
- {
- case sizeof(BITMAPCOREHEADER):
- _tcscpy(stNumText,__TEXT("BITMAPCOREHEADER"));
- break;
- case sizeof(BITMAPINFOHEADER):
- _tcscpy(stNumText, __TEXT("BITMAPINFOHEADER"));
- break;
- case sizeof(BITMAPV4HEADER):
- _tcscpy(stNumText, __TEXT("BITMAPV4HEADER"));
- break;
- case sizeof(BITMAPV5HEADER):
- _tcscpy(stNumText,__TEXT("BITMAPV5HEADER"));
- break;
- default:
- _tcscpy(stNumText, __TEXT("UNKNOWN HEADER SIZE"));
- break;
- }
- DebugMsg(__TEXT("/////////////////// %s /////////////////////rn"), stNumText);
- DebugMsg(__TEXT("HeaderSize %ldrn"), lpBmpV5Header->bV5Size);
- DebugMsg(__TEXT("Width %lurn"), lpBmpV5Header->bV5Width);
- DebugMsg(__TEXT("Height %lurn"), lpBmpV5Header->bV5Height);
- DebugMsg(__TEXT("Planes %drn"), lpBmpV5Header->bV5Planes);
- DebugMsg(__TEXT("BitCount %drn"), lpBmpV5Header->bV5BitCount);
- if ( sizeof(BITMAPCOREHEADER)== lpBmpV5Header->bV5Size) goto End;
- switch (lpBmpV5Header->bV5Compression)
- {
- case BI_RGB:
- _tcscpy(stNumText, __TEXT("BI_RGB"));
- break;
- case BI_RLE8:
- _tcscpy(stNumText, __TEXT("BI_RLE8"));
- break;
- case BI_RLE4:
- _tcscpy(stNumText,__TEXT("BI_RLE4"));
- break;
- case BI_BITFIELDS:
- _tcscpy(stNumText, __TEXT("BI_BITFIELDS"));
- break;
- default:
- _tcscpy(stNumText,__TEXT("Unknown Compression"));
- break;
- }
- DebugMsg(__TEXT("Compression %srn"), stNumText);
- DebugMsg(__TEXT("SizeImage %ldrn"), lpBmpV5Header->bV5SizeImage);
- DebugMsg(__TEXT("XPelsPerMeter %ldrn"), lpBmpV5Header->bV5XPelsPerMeter);
- DebugMsg(__TEXT("YPelsPerMeter %ldrn"), lpBmpV5Header->bV5YPelsPerMeter);
- DebugMsg(__TEXT("ClrUsed %ldrn"), lpBmpV5Header->bV5ClrUsed);
- DebugMsg(__TEXT("ClrImportant %ldrn"), lpBmpV5Header->bV5ClrImportant);
- if (sizeof(BITMAPINFOHEADER) == lpBmpV5Header->bV5Size) goto End;
- DebugMsg(__TEXT("Red Mask 0x%08lxrn"), lpBmpV5Header->bV5RedMask);
- DebugMsg(__TEXT("Green Mask 0x%08lxrn"), lpBmpV5Header->bV5GreenMask);
- DebugMsg(__TEXT("Blue Mask 0x%08lxrn"), lpBmpV5Header->bV5BlueMask);
- DebugMsg(__TEXT("Alpha Mask 0x%08lxrn"), lpBmpV5Header->bV5AlphaMask);
- DebugMsg(__TEXT("CS Type "));
- switch (lpBmpV5Header->bV5CSType)
- {
- case PROFILE_LINKED:
- DebugMsg(__TEXT("LINKEDrn"));
- break;
- case PROFILE_EMBEDDED:
- DebugMsg(__TEXT("EMBEDDEDrn"));
- break;
- default:
- DebugMsg(__TEXT("0x%08lxrn"), lpBmpV5Header->bV5CSType);
- break;
- }
- DebugMsg(__TEXT("Gamma Red %ldrn"), lpBmpV5Header->bV5GammaRed);
- DebugMsg(__TEXT("Gamma Green %ldrn"), lpBmpV5Header->bV5GammaGreen);
- DebugMsg(__TEXT("Gamma Blue %ldrn"), lpBmpV5Header->bV5GammaBlue);
- if (sizeof(BITMAPV4HEADER) == lpBmpV5Header->bV5Size) goto End;
- DebugMsg(__TEXT("Intent %ldrn"), lpBmpV5Header->bV5Intent);
- DebugMsg(__TEXT("ProfileData %ldrn"), lpBmpV5Header->bV5ProfileData);
- DebugMsg(__TEXT("ProfileSize %ldrn"), lpBmpV5Header->bV5ProfileSize);
- DebugMsg(__TEXT("Reserved %ldrn"), lpBmpV5Header->bV5Reserved);
- End:
- DebugMsg(__TEXT("///////////////////////////////////////////////////////rn"));
- } // End of function DumpBITMAPINFOHEADER
- //////////////////////////////////////////////////////////////////////////
- // Function: DumpLogColorSpace
- //
- // Description:
- // Dumps a LOGCOLORSPACE structure.
- //
- // Parameters:
- // @@@
- //
- // Returns:
- // void
- //
- // Comments:
- //
- //
- //////////////////////////////////////////////////////////////////////////
- void DumpLogColorSpace(LPLOGCOLORSPACE pColorSpace)
- {
- DebugMsg(__TEXT("/////////////////// LOGCOLORSPACE /////////////////////rn"));
- DebugMsg(__TEXT("lcsSignature %#lxrn"), pColorSpace->lcsSignature);
- DebugMsg(__TEXT("lcsVersion %#lxrn"), pColorSpace->lcsVersion);
- DebugMsg(__TEXT("lcsSize %#lxrn"), pColorSpace->lcsSize);
- DebugMsg(__TEXT("lcsCSType %#lxrn"), pColorSpace->lcsCSType);
- DebugMsg(__TEXT("lcsIntent %#lxrn"), pColorSpace->lcsIntent);
- DebugMsg(__TEXT("lcsEndpoints.ciexyzRed.ciexyzX %#lxrn"), pColorSpace->lcsEndpoints.ciexyzRed.ciexyzX);
- DebugMsg(__TEXT("lcsEndpoints.ciexyzRed.ciexyzY %#lxrn"), pColorSpace->lcsEndpoints.ciexyzRed.ciexyzY);
- DebugMsg(__TEXT("lcsEndpoints.ciexyzRed.ciexyzZ %#lxrn"), pColorSpace->lcsEndpoints.ciexyzRed.ciexyzZ);
- DebugMsg(__TEXT("lcsEndpoints.ciexyzGreen.ciexyzX %#lxrn"), pColorSpace->lcsEndpoints.ciexyzGreen.ciexyzX);
- DebugMsg(__TEXT("lcsEndpoints.ciexyzGreen.ciexyzY %#lxrn"), pColorSpace->lcsEndpoints.ciexyzGreen.ciexyzY);
- DebugMsg(__TEXT("lcsEndpoints.ciexyzGreen.ciexyzZ %#lxrn"), pColorSpace->lcsEndpoints.ciexyzGreen.ciexyzZ);
- DebugMsg(__TEXT("lcsEndpoints.ciexyzBlue.ciexyzX %#lxrn"), pColorSpace->lcsEndpoints.ciexyzBlue.ciexyzX);
- DebugMsg(__TEXT("lcsEndpoints.ciexyzBlue.ciexyzY %#lxrn"), pColorSpace->lcsEndpoints.ciexyzBlue.ciexyzY);
- DebugMsg(__TEXT("lcsEndpoints.ciexyzBlue.ciexyzZ %#lxrn"), pColorSpace->lcsEndpoints.ciexyzBlue.ciexyzZ);
- DebugMsg(__TEXT("lcsGammaRed %#lxrn"), pColorSpace->lcsGammaRed);
- DebugMsg(__TEXT("lcsGammaGreen %#lxrn"), pColorSpace->lcsGammaGreen);
- DebugMsg(__TEXT("lcsGammaBlue %#lxrn"), pColorSpace->lcsGammaBlue);
- DebugMsg(__TEXT("lcsFilename %srn"), pColorSpace->lcsFilename);
- DebugMsg(__TEXT("///////////////////////////////////////////////////////rn"));
- }
- //////////////////////////////////////////////////////////////////////////
- // Function: DumpCOLORMATCHSETUP
- //
- // Description:
- // Dumps COLORMATCHSETUP structure
- //
- // Parameters:
- // @@@
- //
- // Returns:
- // void
- //
- // Comments:
- //
- //
- //////////////////////////////////////////////////////////////////////////
- void DumpCOLORMATCHSETUP(LPCOLORMATCHSETUP lpCM)
- {
- // Local variables
- // ASSERTs and parameter validations
- DebugMsg(__TEXT("***** COLORMATCHSETUP 0x%08lxrn"), lpCM);
- DebugMsg(__TEXT("dwSize %ldrn"), lpCM->dwSize);
- DebugMsg(__TEXT("dwVersion 0x%08lxrn"), lpCM->dwVersion);
- DebugMsg(__TEXT("dwFlags 0x%08lxrn"), lpCM->dwFlags);
- DebugMsg(__TEXT("hwndOwner 0x%08lxrn"), lpCM->hwndOwner);
- DebugMsg(__TEXT("pSourceName 0x%08lX <%s>rn"), lpCM->pSourceName , lpCM->pSourceName ? lpCM->pSourceName : __TEXT("NULL PTR"));
- DebugMsg(__TEXT("pDisplayName 0x%08lX <%s>rn"), lpCM->pDisplayName , lpCM->pDisplayName ? lpCM->pDisplayName : __TEXT("NULL PTR"));
- DebugMsg(__TEXT("pPrinterName 0x%08lX <%s>rn"), lpCM->pPrinterName , lpCM->pPrinterName ? lpCM->pPrinterName : __TEXT("NULL PTR"));
- DebugMsg(__TEXT("dwRenderIntent %ldrn"), lpCM->dwRenderIntent);
- DebugMsg(__TEXT("dwProofingIntent %ldrn"), lpCM->dwProofingIntent);
- DebugMsg(__TEXT("pMonitorProfile 0x%08lX <%s>rn"), lpCM->pMonitorProfile , lpCM->pMonitorProfile ? lpCM->pMonitorProfile : __TEXT("NULL PTR"));
- DebugMsg(__TEXT("ccMonitorProfile %ldrn"), lpCM->ccMonitorProfile);
- DebugMsg(__TEXT("pPrinterProfile 0x%08lX <%s>rn"), lpCM->pPrinterProfile , lpCM->pPrinterProfile ? lpCM->pPrinterProfile : __TEXT("NULL PTR"));
- DebugMsg(__TEXT("ccPrinterProfile %ldrn"), lpCM->ccPrinterProfile);
- DebugMsg(__TEXT("pTargetProfile 0x%08lX <%s>rn"), lpCM->pTargetProfile , lpCM->pTargetProfile ? lpCM->pTargetProfile : __TEXT("NULL PTR"));
- DebugMsg(__TEXT("ccTargetProfile %ldrn"), lpCM->ccTargetProfile);
- DebugMsg(__TEXT("lpfnHook 0x%08lxrn"), lpCM->lpfnHook);
- DebugMsg(__TEXT("lParam 0x%08lxrn"), lpCM->lParam);
- DebugMsg(__TEXT("***** COLORMATCHSETUP 0x%08lxrn"), lpCM);
- } // End of function DumpCOLORMATCHSETUP