Hi.
I am implementing a driver and I opted for the object oriented desing. So I am implementing classes in my driver.
By now I am just using my classes without dynamic memory allocation. Because I would have to redefine new and delete operators. So I have to remove the virtual destructors of my classes.
I tried to redefine delete operator like this:
void operator delete(void * p);
I got this error:
error C2373: ‘delete’ : redefinition; different type modifiers
How should I redefine operator delete.
I tried to redefine delete operator like this:
void operator delete(void * p, unsigned int size);
And I got this error:
error LNK2001: unresolved external symbol “void __cdecl operator delete(void *)” (??xxxxx@YAXPAX@Z)
These two links should give you enough information.
http://www.compuware.co.jp/products/driverstudio/tech_papers/c++support.asp
http://www.compuware.co.jp/products/driverstudio/utilfiles/cpprt.h
Rob Linegar
Software Engineer
Data Encryption Systems Limited
www.des.co.uk | www.deslock.co.uk
-----Original Message-----
From: Ratmil Torres [mailto:xxxxx@seg.inf.cu]
Sent: 13 November 2003 16:27
To: Windows File Systems Devs Interest List
Subject: [ntfsd] classes in a driver
Hi.
I am implementing a driver and I opted for the object oriented desing. So I
am implementing classes in my driver.
By now I am just using my classes without dynamic memory allocation. Because
I would have to redefine new and delete operators. So I have to remove the
virtual destructors of my classes.
I tried to redefine delete operator like this:
void operator delete(void * p);
I got this error:
error C2373: ‘delete’ : redefinition; different type modifiers
How should I redefine operator delete.
I tried to redefine delete operator like this:
void operator delete(void * p, unsigned int size);
And I got this error:
error LNK2001: unresolved external symbol “void __cdecl operator delete(void
*)” (??xxxxx@YAXPAX@Z)
You are currently subscribed to ntfsd as: xxxxx@des.co.uk
To unsubscribe send a blank email to xxxxx@lists.osr.com
DDK uses __stdcall as default calling convention. Specify __cdecl
explicitely to make linker happy.
-htfv
“Ratmil Torres” wrote in message news:xxxxx@ntfsd…
Hi.
I am implementing a driver and I opted for the object oriented desing. So I
am implementing classes in my driver.
By now I am just using my classes without dynamic memory allocation. Because
I would have to redefine new and delete operators. So I have to remove the
virtual destructors of my classes.
I tried to redefine delete operator like this:
void operator delete(void * p);
I got this error:
error C2373: ‘delete’ : redefinition; different type modifiers
How should I redefine operator delete.
I tried to redefine delete operator like this:
void operator delete(void * p, unsigned int size);
And I got this error:
error LNK2001: unresolved external symbol “void __cdecl operator delete(void
*)” (??xxxxx@YAXPAX@Z)
Now I get it. Thanks.
Well, anyway I used the files I downloaded from the links Rob gave me and
that was what I needed.
Thanks, Rob.
----- Original Message -----
From: “Alexey Logachyov”
Newsgroups: ntfsd
To: “Windows File Systems Devs Interest List”
Sent: Thursday, November 13, 2003 2:50 PM
Subject: [ntfsd] Re: classes in a driver
> DDK uses stdcall as default calling convention. Specify cdecl
> explicitely to make linker happy.
>
> -htfv
>
>
> “Ratmil Torres” wrote in message news:xxxxx@ntfsd…
> Hi.
> I am implementing a driver and I opted for the object oriented desing. So
I
> am implementing classes in my driver.
> By now I am just using my classes without dynamic memory allocation.
Because
> I would have to redefine new and delete operators. So I have to remove
the
> virtual destructors of my classes.
>
> I tried to redefine delete operator like this:
> void operator delete(void * p);
>
> I got this error:
>
> error C2373: ‘delete’ : redefinition; different type modifiers
>
> How should I redefine operator delete.
>
> I tried to redefine delete operator like this:
> void operator delete(void * p, unsigned int size);
>
> And I got this error:
>
> error LNK2001: unresolved external symbol “void __cdecl operator
delete(void
> *)” (??xxxxx@YAXPAX@Z)
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@seg.inf.cu
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>