Visual Studio: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
Added 64 bit dev and how to do external asm layers |
|||
Line 201: | Line 201: | ||
== Express 64 bit compilers == |
|||
You can gain 64 bit compilers by installing the Windows SDK VC++ compilers (please note for VC10 SP1 you need to install the update) |
|||
== Quirks == |
|||
In the 64 bit compilers you '''cannot:''' |
|||
Create naked funnctions |
|||
Do inline assembly |
|||
Do non-fastcall calling |
|||
This is why if you intend to do 64 bit development in MSVC++ you should have an external assembly layer (seperate versions for 32 bit and 64 bit), and if you want to avoid name decoration you need to declare them in a header file like this: |
|||
<source lang="cpp"> |
|||
#ifdef __cplusplus //if this is C++ |
|||
extern "C" { //declare as C functions |
|||
#endif |
|||
//your functions go here (E.G disable()) |
|||
#ifdef __cplusplus |
|||
} //and if it was C++ we need to close the brackets |
|||
#endif |
|||
</source> |
|||
And in your asm layer: |
|||
<source lang="asm"> |
|||
BITS 32 ;32 bit version |
|||
@disable@0 |
|||
;fastcall name decoration (@0 to be replaced by size of args (bytes) |
|||
;Number of bytes is always prefixed by @ |
|||
BITS 64 ;64 bit version |
|||
disable ;No decoration at all |
|||
</source> |
|||
=== See Also === |
=== See Also === |
||
[[C++]] |
[[C++]] |