OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Trouble with new operator

From: Kim Gräsman (kimMVPS.ORG)
Date: Fri Nov 12 2004 - 11:08:33 CST


Hi Henrik,

You haven't provided enough info (for me, at least)...

> I get the following access error:
>
> HEAP[HardwareInterface.exe]: Invalid Address specified to
> RtlSizeHeap( 130000, 15c04c ) First-chance exception in
> HardwareInterface.exe (NTDLL.DLL): 0xC0000005:
> Access Violation.
> First-chance exception in HardwareInterface.exe
> (KERNEL32.DLL): 0xE06D7363:
> Microsoft C++ Exception.

At which exact line do you get the Access violation? And just to be sure -
is HardwareInterface.exe your server, or your client?

> Is it impossible to use "new" in the interface proxy class.

I don't know what you mean by "interface proxy class" - you mean the
implementation of your interface? If so, then sure it's possible, unless you
attempt to return a pointer to that memory to clients.

> It looks from the debugger as the constructor i executed for
> every DCOM- call. If that a correct obervation?

Which constructor? CMyInterface::CMyInterface()? If CMyInterface is the
implementation of a COM interface, and you create an instance over DCOM, and
call several methods on said interface, then the answer is no. Your
implementation class is not re-created for every call.

Kim

----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.html
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM