Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Calling Dll function from assembler code?

Calling Dll function from assembler code?

Scheduled Pinned Locked Moved C / C++ / MFC
data-structureshelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mvworld
    wrote on last edited by
    #1

    Hi, My problem is that I have to write a function that will at runtime accept a name of a dll and a name of a function contained in that dll and then call that function. The obvious problem is that a compile time we don't know the return type of a function be be called and the number and types of arguments to be passed to the dll. My guess is that we'd have to use assembler code in __asm blocks to pass any number of parameters of any types by manually pushing them into the stack. But then of what type do I declare the function pointer that will take the adress of function returned by GetProcAddress? Any Answers/Suggestions? Thanks in advance, Mvworld

    M 1 Reply Last reply
    0
    • M mvworld

      Hi, My problem is that I have to write a function that will at runtime accept a name of a dll and a name of a function contained in that dll and then call that function. The obvious problem is that a compile time we don't know the return type of a function be be called and the number and types of arguments to be passed to the dll. My guess is that we'd have to use assembler code in __asm blocks to pass any number of parameters of any types by manually pushing them into the stack. But then of what type do I declare the function pointer that will take the adress of function returned by GetProcAddress? Any Answers/Suggestions? Thanks in advance, Mvworld

      M Offline
      M Offline
      Masaaki Onishi
      wrote on last edited by
      #2

      Hello, the codegurus around the world.;) In fact, I don't know what your assembler code does? But, if the assembler code can call Java class, you can use JINI to call DLL file which you created.:cool: Have a nice day! -Masaaki Onishi-

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups