Ivan
Thu Feb 07 12:11:41 CST 2008
I can't repro with the following minimal example.
///////////////////////////////////////////////
#include <stdio.h>
#include <stdlib.h>
#include <strsafe.h>
#include <memory>
#include <map>
class TestClass {
private:
BYTE Array[256];
public:
TestClass();
virtual ~TestClass();
};
TestClass::TestClass(){
DbgPrintEx(DPFLTR_TERMSRV_ID,DPFLTR_ERROR_LEVEL,
"%s",__FUNCTION__);
}
TestClass::~TestClass(){
DbgPrintEx(DPFLTR_TERMSRV_ID,DPFLTR_ERROR_LEVEL,
"%s",__FUNCTION__);
}
int __cdecl
wmain( __in int argc,
__in_ecount(argc) WCHAR ** argv)
/*++
--*/
{
TestClass * p = new TestClass;
DbgBreakPoint();
delete p;
return 0;
}
////////////////////////////////////////////////////////////////////////
TARGETNAME=basictest
TARGETPATH=obj
TARGETTYPE=PROGRAM
BUFFER_OVERFLOW_CHECKS=NTDLL
TARGETLIBS=\
$(SDK_LIB_PATH)\ntdll.lib \
$(SDK_LIB_PATH)\kernel32.lib
_NT_TARGET_VERSION = $(_NT_TARGET_VERSION_WINXP)
USE_MSVCRT=1
USE_NATIVE_EH=1
USE_STL=1
STL_VER=70
UMENTRY=wmain
UMTYPE=console
INCLUDES=\
$(DDK_INC_PATH);\
MSC_WARNING_LEVEL=/W3 /WX
C_DEFINES=$(C_DEFINES) -DUNICODE -D_UNICODE
SOURCES=\
fopen.rc\
fopen.cpp
--
--
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
"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:uFANIXVaIHA.4180@TK2MSFTNGP06.phx.gbl...
> There is a heap of several SOURCES and SOURCES.INC included to them. It
> was
> originally built using 2003 DDK, now moving to WDK.
>
> The conflict is caused by:
> 1) USE_MSVCRT=1
> AND
> 2) USE_STL=1 (this assumes STL 7.0)
> AND
> 3) having a class ever created by "new" without the class-local
> "delete", and without the redefined global "delete".
>
> This causes a clash between ntstc_msvcrt.lib and msvcrt.lib on
> "operator
> delete".
>
> Defining "delete" within the class solves the issue.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
>
http://www.storagecraft.com
>
> "Ivan Brugiolo [MSFT]" <ivanbrug@online.microsoft.com> wrote in message
> news:eRw2FiQaIHA.5128@TK2MSFTNGP05.phx.gbl...
>> Can you show a full SOURCES file that exibits the problem ?
>> Certain macros and LINKLIBS have sometimes to be kept in sync manually,
>> and there is a blessed order of those things to get predictable results.
>>
>> --
>>
>> --
>> 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
>>
>>
>> "Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
>> news:%23NUptdPaIHA.5768@TK2MSFTNGP03.phx.gbl...
>> > Who of us uses DDK/WDK for user mode builds too, like me?
>> >
>> > I have an issue using WDK 6001 for user-mode builds.
>> >
>> > The thing is that, if I define USE_STL (now a must to use STL), then
>> > WDK
>> > tries to link ntstc_msvcrt.lib (is it STL?), which _clashes_ with the
>> > msvcrt.lib import library on "operator delete".
>> >
>> > Is there any ways of solving this except defining my own "operator
>> > delete"
>> > in one of the .CPP files?
>> >
>> > --
>> > Maxim Shatskih, Windows DDK MVP
>> > StorageCraft Corporation
>> > maxim@storagecraft.com
>> >
http://www.storagecraft.com
>> >
>>
>>
>