Results 1 to 9 of 9

Thread: Help - DLL

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    9

    Help - DLL

    okay. i made a mod for word..... but when i inject it into work my mod dont run. just for a test i made a msgbox dll. it dont run when i inject it! how do i make it run a function when i inject the .dll? tyvm for your time

  2. #2
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Help - DLL

    Have u added the reference to ur DLL ?
    Why using DLL?

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    9

    Re: Help - DLL

    reference is what now? uhhh lol. i guess i need more research. i am using dll cuz i like the extension :P could any1 explain what a dll referecne is to me?

  4. #4
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Help - DLL

    Goto Project > References. Then browse for ur dll file to add a reference of it in ur project.

    EDIT: Sorry, that was in VB. It is in Tools > References... IN WORD

  5. #5

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    9

    Re: Help - DLL

    no. you have it backwards. i want it so when i INJECT INTO RUNNING PROCESS it automatically carries out a function. ty for your effort tho.

  6. #6
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    Re: Help - DLL

    You can't inject a VB dll into a running process.
    VB uses apartment threading, and you can't inject it safely into a free threaded process.
    Frans

  7. #7

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    9

    Re: Help - DLL

    so your basically saying my hard work goes to waste?

  8. #8
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Help - DLL

    you can carry out operations in word by referencing word and creating an instance of word, you can then do anything a user can do whilst in word

    pete

  9. #9
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    Re: Help - DLL

    DLL injection is not the way to go.
    This doesn't mean that you cannot use your dll form word.
    From teh Word VBA window, go to Tools --> References, and check your dll.
    If it isn't in the list, you can browse to it.

    Next you can use it like any other object.
    eg. If your project is named myProject, and it contains a class with the name MyClass, you can use it like this:

    VB Code:
    1. Dim x as MyProject.MyClass
    2. Set x = New MyProject.MyClass
    3. 'Set x = CreateObject("MyProject.MyClass") ' the above line can be replaced with this one
    4. Call x.somemethod
    5. Set x = Nothing
    Frans

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width