For Programmers: Free Programming Magazines  


Home > Archive > VC Language > June 2005 > 64 bit porting issue









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author 64 bit porting issue
Albert

2005-05-27, 4:03 pm

Hi All,

The following code compiles for 32 bit

BOOL WINAPI WlxGetConsoleSwitchCredentials( PVOID pWlxContext, PVOID
pCredInfo )
{
BOOL bSuccess;
bSuccess = WlxGetConsoleSwitchCredentials ?
WlxGetConsoleSwitchCredentials(pWlxConte
xt, pCredInfo) : FALSE; // error is
occuring at this line
return (bSuccess);
}

but when i compile it with 64 bit MSSDK i am getting the following error:-

C-style cast or function-style cast
file.cpp(814) : error C4551: function call missing argument list
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'for' : return code '0x2'
Stop.

Any help in this regard would be of great help.

Thanks in advance

Regards,
Albert

Victor Bazarov

2005-05-27, 4:03 pm

Albert wrote:
> The following code compiles for 32 bit
>
> BOOL WINAPI WlxGetConsoleSwitchCredentials( PVOID pWlxContext, PVOID
> pCredInfo )
> {
> BOOL bSuccess;
> bSuccess = WlxGetConsoleSwitchCredentials ?

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Did you mean to use a function name here? What's the point of it?

> WlxGetConsoleSwitchCredentials(pWlxConte
xt, pCredInfo) : FALSE; // error is
> occuring at this line
> return (bSuccess);
> }
>
> but when i compile it with 64 bit MSSDK i am getting the following error:-
>
> C-style cast or function-style cast
> file.cpp(814) : error C4551: function call missing argument list
> NMAKE : fatal error U1077: 'cl' : return code '0x2'
> Stop.
> NMAKE : fatal error U1077: 'for' : return code '0x2'
> Stop.
>
> Any help in this regard would be of great help.
>
> Thanks in advance
>
> Regards,
> Albert
>



--
Please remove capital As from my address when replying by mail
Tim Roberts

2005-05-28, 8:58 pm

Albert <Albert@discussions.microsoft.com> wrote:
>
>The following code compiles for 32 bit
>
>BOOL WINAPI WlxGetConsoleSwitchCredentials( PVOID pWlxContext, PVOID
>pCredInfo )
>{
> BOOL bSuccess;
> bSuccess = WlxGetConsoleSwitchCredentials ?
> WlxGetConsoleSwitchCredentials(pWlxConte
xt, pCredInfo) : FALSE; // error is
>occuring at this line
> return (bSuccess);
>}


This can't be the actual code. WlxGetConsoleSwitchCredentials will always
evaluate to non-zero, since you are referring to the function being
defined. Thus, it will always take the first alternative, which results in
a recursive call to itself. This will loop infinitely until the stack
overflows.

Try again.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc
Simon Trew

2005-05-31, 9:00 pm

"Tim Roberts" <timr@probo.com> wrote in message
news:ploh91pvijeohtj6qt69gojia83p1vm6lk@
4ax.com...
> Albert <Albert@discussions.microsoft.com> wrote:
>
> This can't be the actual code. WlxGetConsoleSwitchCredentials will always
> evaluate to non-zero, since you are referring to the function being
> defined.


True.

> Thus, it will always take the first alternative


True.

> which results in
> a recursive call to itself.


False.

> This will loop infinitely until the stack
> overflows.


Thus, false.

> Try again.



Victor Bazarov

2005-06-01, 4:00 am

Simon Trew wrote:
> "Tim Roberts" <timr@probo.com> wrote in message
> news:ploh91pvijeohtj6qt69gojia83p1vm6lk@
4ax.com...
>
> True.
>
>
> True.
>
>
> False.


Could you elaborate on this one? Thanks.
[color=darkred]
>
> Thus, false.
>


Simon Trew

2005-06-02, 4:02 am

"Victor Bazarov" <v.Abazarov@comAcast.net> wrote in message
news:%230PCH3kZFHA.2664@TK2MSFTNGP15.phx.gbl...
> Could you elaborate on this one? Thanks.


I misread it. Of course it is a recursive call (taking the code at face
value).


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com