I guess your driver is compiled with __cpluplus defined.
That would #define REFGUID differently.
It is not clear (unless you analyze the output of `cl.exe /showIncludes`)
who first defines _REFGUID_DEFINED and/or if your precompiled header
can be wrapped with #ifndef __cplusplus/extern "C" {/#endif.
Try to have the header that first defines REFGUID
to be trated as a C compilation unit.
Good Luck with header reshuffling.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"John Bond" <> wrote in message
news:55F6CB4D-9543-40CA-9EA5-...
> Thx Doron, but I still get the same compile error:
>
> ----------------------------------------------------code
> snippet-----------------------------
> //SwrxDriver.cpp -- driver entry points for SmartWORKS updated for KMDF
> driver model
>
> //Created 21 August 2009, Copyright (c) 2009 AudioCodes, Inc. All rights
> reserved.
> // Started with shell of MT2HAdriver which used pcidrv and plx9x5x
> example
> code from the WDF samples
> // Updated 18 September 2009 with code to create single fixed-name IOCTL
> target for the driver.
>
> //include the precompiled header file
> #include "precomp.h"
> #define WPP_GLOBALLOGGER
>
> //*.tmh - trace message headers generated by the WPP preprocessor must
> preceed WPP macro calls
> // which requires that WPP_CONTROL_GUIDS macro be defined earlier, see
> precomp.h
> // This is required to support TraceEvents(level, flags, msg, ...) trace
> statements.
> // The name "TraceEvents" is defined in the sources file under the
> RUN_WPP
> build directive
> extern "C" {
> #include "SwrxDriver.tmh"
> }
> ------------------------------------------------end code
> snippet-----------------------------
>
> -----------------------SwrxDriver.tmh generated header
> snippet-------------------------
> #ifdef WPP_GLOBALLOGGER
> #define DEFAULT_GLOBAL_LOGGER_KEY L"WMI\\GlobalLogger\\"
> #define WPP_TEXTGUID_LEN 38
> #define GREGVALUENAMELENGTH (18 + WPP_TEXTGUID_LEN) //
> wslen(L"WMI\\GlobalLogger\\") + GUIDLENGTH
>
> WPPINIT_EXPORT
> void WppInitGlobalLogger(
> __in LPCGUID ControlGuid,
> __out PTRACEHANDLE LoggerHandle,
> __out PULONG Flags,
> __out PUCHAR Level
> )
> {
> WCHAR GRegValueName[GREGVALUENAMELENGTH];
> RTL_QUERY_REGISTRY_TABLE Parms[3];
> ULONG CurrentFlags = 0;
> ULONG CurrentLevel = 0;
> ULONG Start = 0;
> NTSTATUS Status;
> ULONG Zero = 0;
> UNICODE_STRING GuidString;
>
>
> PAGED_CODE();
>
> WppDebug(0,("WPP checking Global Logger\n"));
>
>
> //
> // Fill in the query table to find out if the Global Logger is Started
> //
> // Trace Flags
> Parms[0].QueryRoutine = NULL;
> Parms[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
> Parms[0].Name = L"Start";
> Parms[0].EntryContext = &Start;
> Parms[0].DefaultType = REG_DWORD;
> Parms[0].DefaultData = &Zero;
> Parms[0].DefaultLength = sizeof(ULONG);
> // Termination
> Parms[1].QueryRoutine = NULL;
> Parms[1].Flags = 0;
> //
> // Perform the query
> //
>
> Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL |
> RTL_REGISTRY_OPTIONAL,
> DEFAULT_GLOBAL_LOGGER_KEY,
> Parms,
> NULL,
> NULL);
> if (!NT_SUCCESS(Status) || Start == 0 ) {
> return;
> }
>
> // Fill in the query table to find out if we should use the Global
> logger
> //
> // Trace Flags
> Parms[0].QueryRoutine = NULL;
> Parms[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
> Parms[0].Name = L"Flags";
> Parms[0].EntryContext = &CurrentFlags;
> Parms[0].DefaultType = REG_DWORD;
> Parms[0].DefaultData = &Zero;
> Parms[0].DefaultLength = sizeof(ULONG);
> // Trace level
> Parms[1].QueryRoutine = NULL;
> Parms[1].Flags = RTL_QUERY_REGISTRY_DIRECT;
> Parms[1].Name = L"Level";
> Parms[1].EntryContext = &CurrentLevel;
> Parms[1].DefaultType = REG_DWORD;
> Parms[1].DefaultData = &Zero;
> Parms[1].DefaultLength = sizeof(UCHAR);
> // Termination
> Parms[2].QueryRoutine = NULL;
> Parms[2].Flags = 0;
>
>
> RtlCopyMemory(GRegValueName, DEFAULT_GLOBAL_LOGGER_KEY,
> (wcslen(DEFAULT_GLOBAL_LOGGER_KEY)+1) *sizeof(WCHAR));
>
> Status = RtlStringFromGUID(ControlGuid, &GuidString);
> ----------------------------------------end at line 2048 of
> SwrxDriver.tmh----------------
>
> The last line is the point of the compile error... hope this helps.
>
> John Bond