Good, at least now we're getting somewhere... i thought that was a bit odd
but the thing is if I try using InterlockedExchange it doesn't compile, even
the IntelliSense won't pick it up!... I know it's there, but it won't
compile. Is there anything that I should do to insure that VC is not
targeting 64 bit OS.. or to force it to use the InterlockedExchange instead
or hte 64 one ?!
Thanks a lot,

Signature
Mikk,
mikkanu@community.nospam
"Jeffrey Tan[MSFT]" - 27 Sep 2005 09:27 GMT
Hi Mikk,
I am not sure why you believe your problem has something to do with 64bit
OS. Have you tried to create a VC.net Windows Forms application? Then, do
the following:
#include<windows.h>
private: System::Void Form1_Load(System::Object * sender,
System::EventArgs * e)
{
long lv;
::InterlockedExchange(&lv, 4);
}
Can you do this successfully?
If you can not, I suggest you try another machine, then we can determine if
this issue is machine-specific.
Thanks
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Mikanu - 27 Sep 2005 21:00 GMT
So,
it seems I was able to somehow make a new win32 lib project and get it to
copile with the ::InterlockedExchange(), not he 64 version. But what is still
strange is that the intellisense will not pick-up the InterlockedExchange()
but it will InterlockedExchange64(). to me, that's still a little strange.
And also I'm concerned because I don't know exactly why it didn't work
before... and like everybody is saying... how in the world, I got it to
compile with the 64 version. That's still a mistery.

Signature
Mikk,
mikkanu@community.nospam
> Hi Mikk,
>
[quoted text clipped - 21 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
"Jeffrey Tan[MSFT]" - 28 Sep 2005 03:35 GMT
Hi Mikk,
Thanks for your feedback.
Yes, it is somewhat strange. However, based on my knowledge this maybe a
IDE issue. The quickest way to workaround IDE related issue is creating a
new project and porting the old project into the new project.
If you want to troubleshoot out the root cause, I think contacting
Microsoft PSS should be a correct way.
Thanks
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Mikanu - 28 Sep 2005 04:54 GMT
Hi Jeff,
Switching to the non-64 versions seems to have fixed the problem.
I can now load the assembly in the Evaluate Assembly tool and it says
"Urestricted". I'm no longer getting that "Can't Load Assembly" error, so
it's on to trying it into the main project.
Thanks,

Signature
Mikk,
mikkanu@community.nospam
"Jeffrey Tan[MSFT]" - 28 Sep 2005 06:55 GMT
Cool, it seems that it is still the configuration issue.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Willy Denoyette [MVP] - 27 Sep 2005 11:32 GMT
> Good, at least now we're getting somewhere... i thought that was a bit odd
> but the thing is if I try using InterlockedExchange it doesn't compile,
[quoted text clipped - 6 lines]
>
> Thanks a lot,
VS2003 cannot target 64bit Windows OS, the InterlockedExchange64 and
InterlockedExchange are both declared in winbase.h, InterlockedExchange64
can only be found if you explicitely target X64 or IA64 in your project, so
I guess you have your project settings wrong, check the command line
arguments for both the compile and the link step.
Willy.