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. COM
  4. Can we calculate/extract Virtual Table address some how from DIA SDK?

Can we calculate/extract Virtual Table address some how from DIA SDK?

Scheduled Pinned Locked Moved COM
question
6 Posts 2 Posters 2 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.
  • G Offline
    G Offline
    glitteringsound
    wrote on last edited by
    #1

    Hello, Can we calculate/extract Virtual Table address some how from DIA SDK? Regards, Usman

    L 1 Reply Last reply
    0
    • G glitteringsound

      Hello, Can we calculate/extract Virtual Table address some how from DIA SDK? Regards, Usman

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      The original pointer you receive on CoCreateInstance()[^] points to the vtbl. However since this is an internal COM object you cannot rely on any of its contents if accessed other than through the proper COM calls.

      Just say 'NO' to evaluated arguments for diadic functions! Ash

      G 1 Reply Last reply
      0
      • L Lost User

        The original pointer you receive on CoCreateInstance()[^] points to the vtbl. However since this is an internal COM object you cannot rely on any of its contents if accessed other than through the proper COM calls.

        Just say 'NO' to evaluated arguments for diadic functions! Ash

        G Offline
        G Offline
        glitteringsound
        wrote on last edited by
        #3

        I have Simple Win32 type which have some virtual functions. I want access the base pointer of virtual table. Some how If I can pass type and it returns the existing vtable's start address...?

        L 1 Reply Last reply
        0
        • G glitteringsound

          I have Simple Win32 type which have some virtual functions. I want access the base pointer of virtual table. Some how If I can pass type and it returns the existing vtable's start address...?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          I am afraid I am a bit confused now. As I said before the vtbl pointer of a COM object is returned to the caller from CoCreatInstance(). I don't understand what this has to do with virtual functions in your Win32 application; perhaps you could clarify.

          Just say 'NO' to evaluated arguments for diadic functions! Ash

          G 1 Reply Last reply
          0
          • L Lost User

            I am afraid I am a bit confused now. As I said before the vtbl pointer of a COM object is returned to the caller from CoCreatInstance(). I don't understand what this has to do with virtual functions in your Win32 application; perhaps you could clarify.

            Just say 'NO' to evaluated arguments for diadic functions! Ash

            G Offline
            G Offline
            glitteringsound
            wrote on last edited by
            #5

            Let me clarify now.! Forget about COM. I have Win32 Type say.. (MyStruct) and it contains some virtual functions. Now this type would contains an extra member(hidden) i.e vpVtable that's pointing to some vtable's base address which this type contains because it has some virtual functions. Right...? Now I want to access some how this vtable's base address or some how the rva to this vtable's address. I have read the documentation of DIA SDK. and it gives you every information what pdb file contains. Now I am giving the pdb file of that binary(WIN32 Dll/EXE) which contains a type(i.e struct namely MyStruct) which in turns contains some virtual functions. So If some how I can point "MyStruct" and can get its contained vtable's base address. If still any confusion in understanding the context, do let me know then..

            L 1 Reply Last reply
            0
            • G glitteringsound

              Let me clarify now.! Forget about COM. I have Win32 Type say.. (MyStruct) and it contains some virtual functions. Now this type would contains an extra member(hidden) i.e vpVtable that's pointing to some vtable's base address which this type contains because it has some virtual functions. Right...? Now I want to access some how this vtable's base address or some how the rva to this vtable's address. I have read the documentation of DIA SDK. and it gives you every information what pdb file contains. Now I am giving the pdb file of that binary(WIN32 Dll/EXE) which contains a type(i.e struct namely MyStruct) which in turns contains some virtual functions. So If some how I can point "MyStruct" and can get its contained vtable's base address. If still any confusion in understanding the context, do let me know then..

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              OK, I think I understand your problem. However, I'm afraid I have never looked into PDB file so cannot offer any suggestions on that. You may find this article[^] useful as he goes into the structure of vtables in C and how they match with C++ classes.

              Just say 'NO' to evaluated arguments for diadic functions! Ash

              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