I can't call assembly function in visual c. Can you help me? ^^
Perhaps the easiest way it to wrap your code inside a dll, then invoke it from C like any other. The next way is to define the asm procs as PUBLIC, then compile to an obj. When you link your C code, include the asm object file. You'll also have to tell the C compiler the proc is externally defined (I don't know that directive). If you're really good at playing with the studio build menu, you can get it to also compile the asm for you.
To make the IDE compile your asm file, you add it to your proyect and go to the Custom Build tab of the Settings dialog for that file, and add something like this: X:\Path to MASM\ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(OUTDIR)\$(InputName).asm Then you add this obj file to the linker's command line (don't remember where, but it's there) and you're all set. That adds the file to your exe/dll. To call some functions in the asm you add this to the file from where you call the asm function, or it's header: extern _cdecl ret_type SomeFunc(...); (you may have to use stdcall insted of _cdecl, depending on the convension your compiler is using (which is probably stdcall)).
try compling your code into a lib like the masm32.lib, you will probably have to create your own .h file manualy. I am only guessing here, but, look at the .bat file in the m32lib directory in masm on the way to complie a lib file. By the way, a lib file is very much like a dll, except, it when assembling/linking, the code is combined into the final image, not an exe/dll combonation
lib files are not like dll's! For one thing, lib files need not contain any code at all -- just names and RVA's for the Windows loader to patch. (libs created from def files are of this type.) Also, lib files often contain decorated names; the decoration is done by the compiler so that the linker has unique names in order to accommodate overloading in C++. dll files never contain decorated names. The decorated names in a lib file indicate the signature of the function (e.g., __controlfp@8 takes two DWORD args). Also, C++ functions have decorations telling which class they come from. dll's contain no information about function signatures.