Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Greetinx! How can i function wri

Status
Not open for further replies.

Pavlo

Instructor
Apr 25, 2001
106
0
0
RU
Greetinx!

How can i function written in assembly make visible to any other language, in example, to C language? A simple name of operator 'PUBLIC' is insufficient.

Happy programming!))
 
you declare the same function with extern in C. Also if you want function to use from C,in asm the function should begin with _[color] but in C not. John Fill
1c.bmp


ivfmd@mail.md
 
Hello, John!

I have other task. I need to export from dll some functions written in asm. But i cant export them, and i can use them internally only.
Happy programming!))
 
implement asm in lib and C/C++ in dll. Link them toghever but use callings of asm functions from C code. Also you can put inline asm code just in C++ sources.
An other posisibily is to see how is the convension __stdcall. In C++ to make a dll export you should declare with __declspec(dllexport). In asm ou maybe should put something more in .def file. John Fill
1c.bmp


ivfmd@mail.md
 
Hello, John!

I'll try to explain that i want to do. I have some functions written in asm and kept in dll (primary), i want to permit access to them from any other exe of dll program (secondary). Declaring them in 'primary' dll, in which they are kept, i can write fuctions in 'cpp' which will use that asm-functions, in same 'primary' dll. But i cant access them from any other 'secondary' projects, even if i put them to export list of my 'primary' dll. Because that asm-functions are absent in this export list. I dont want to make pseuso-functions in 'cpp' which will call asm-functions.
What should i put something more to .def file?
Happy programming!))
 
Good morning :)
I think you should study WinAPI programming in C at the first. John Fill
1c.bmp


ivfmd@mail.md
 
Hello!

I dont understand! Why!?!))

Happy programming!))
 
Because you will understand better Windows. If you do it in asm you have no advantages, because almost all windows is made in C. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top