Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Windows 64bit > Help! _VtblGapPlaceHolder1() added during preprocessing

Reply
Thread Tools

Help! _VtblGapPlaceHolder1() added during preprocessing

 
 
yezdived@gmail.com
Guest
Posts: n/a
 
      03-09-2006
Hi,
Yet another problem of different behavior exhibited when building on
Win2k and XP.
Using AMD64 environment (Windows 2003 SDK SP1-April2005 edition - /XP64
/RETAIL options set) and VS2003 IDE to compile a file.
This cpp file is importing a typelibrary like this:

#import "COMLib.tlb"
//.... code
//.... code

When I compile this file in Win2k and generate preprocessor output (/P
option), I see that for an interface definition, two extra methods are
being added (_VtblGapPlaceHolder1( ) and 2..)

struct __declspec(uuid("4730c519-8998-43f6-993b-80befea1d404"))
ITCSpecific : IUnknown
{
HRESULT GetUserKey(/* removed params */ );
HRESULT ReleaseSpace ( );
HRESULT WriteValue (/*removed params*/ );


virtual HRESULT _VtblGapPlaceholder1( ) { return
((HRESULT)0x80004001L); }
virtual HRESULT _VtblGapPlaceholder2( ) { return
((HRESULT)0x80004001L); }
virtual HRESULT __stdcall raw_GetUserKey ( /*deleted other
params*/ ) = 0;
virtual HRESULT __stdcall raw_ReleaseSpace ( ) = 0;
virtual HRESULT __stdcall raw_WriteValue (/*deleted params*/ ) =
0;
};

Under same conditions on Win XP SP2 however, the preprocessor output
does not have these PlaceHolder methods. And my server dll was built on
XP SP2.

so when I build client on Win2K, method invocation is messing up due
to extra 16 bytes added to vtbl offset because of PlaceHoler()
methods. and so instead of invoking GetUserKey(), WriteValue() gets
invoked.

WHY, WHY!! Why is the compiler behaving differently on Win2k and Win XP
SP2. What brings in _vtblGapPlaceHolder1() methods??? I can't ship my
SDK code until it is buildable from Win2K and XP SP2 targeted to 64-bit
environment. (

ved

 
Reply With Quote
 
 
 
 
Andre Da Costa [Extended64]
Guest
Posts: n/a
 
      03-09-2006
Its probably best if you post this issue to:
microsoft.public.vsnet.general
microsoft.public.vsnet.debugging
--
--
Andre
Windows Connect | http://www.windowsconnected.com
Extended64 | http://www.extended64.com
Blog | http://www.extended64.com/blogs/andre
http://spaces.msn.com/members/adacosta

<> wrote in message
news: ups.com...
> Hi,
> Yet another problem of different behavior exhibited when building on
> Win2k and XP.
> Using AMD64 environment (Windows 2003 SDK SP1-April2005 edition - /XP64
> /RETAIL options set) and VS2003 IDE to compile a file.
> This cpp file is importing a typelibrary like this:
>
> #import "COMLib.tlb"
> //.... code
> //.... code
>
> When I compile this file in Win2k and generate preprocessor output (/P
> option), I see that for an interface definition, two extra methods are
> being added (_VtblGapPlaceHolder1( ) and 2..)
>
> struct __declspec(uuid("4730c519-8998-43f6-993b-80befea1d404"))
> ITCSpecific : IUnknown
> {
> HRESULT GetUserKey(/* removed params */ );
> HRESULT ReleaseSpace ( );
> HRESULT WriteValue (/*removed params*/ );
>
>
> virtual HRESULT _VtblGapPlaceholder1( ) { return
> ((HRESULT)0x80004001L); }
> virtual HRESULT _VtblGapPlaceholder2( ) { return
> ((HRESULT)0x80004001L); }
> virtual HRESULT __stdcall raw_GetUserKey ( /*deleted other
> params*/ ) = 0;
> virtual HRESULT __stdcall raw_ReleaseSpace ( ) = 0;
> virtual HRESULT __stdcall raw_WriteValue (/*deleted params*/ ) =
> 0;
> };
>
> Under same conditions on Win XP SP2 however, the preprocessor output
> does not have these PlaceHolder methods. And my server dll was built on
> XP SP2.
>
> so when I build client on Win2K, method invocation is messing up due
> to extra 16 bytes added to vtbl offset because of PlaceHoler()
> methods. and so instead of invoking GetUserKey(), WriteValue() gets
> invoked.
>
> WHY, WHY!! Why is the compiler behaving differently on Win2k and Win XP
> SP2. What brings in _vtblGapPlaceHolder1() methods??? I can't ship my
> SDK code until it is buildable from Win2K and XP SP2 targeted to 64-bit
> environment. (
>
> ved
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solution for posterity: GridView, Datakeys, and "Item has already been added. Key in dictionary: 'CategoryID' Key being added: 'CategoryID'" ASP .Net 2 11-02-2006 04:48 AM
Carriage Return added during return of large string from class method Xeno Campanoli Ruby 0 02-13-2006 08:39 PM
how come user control added to page doesn't get added to codebehind file? Bennett Haselton ASP .Net 1 11-08-2004 09:26 PM
OnClick Handler for Buttons added During Page_PreRender? How? Sky Sigal ASP .Net 0 08-03-2004 07:16 PM
retain controls added to placeholder during postback? Mark ASP .Net 2 07-06-2004 05:53 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57