Author Topic: How does one make an app Dependent of a Dynamin Link Library?  (Read 1109 times)

xandaz

  • Member
  • ****
  • Posts: 529
  • I luv you babe
    • My asm examples
How does one make an app Dependent of a Dynamin Link Library?
« on: November 17, 2021, 04:42:22 AM »
    Hello fellows. I removed some of the procedures in this app i'm working on and put it on a .LIB. Then I transformed it into a .DLL. No matter if it's there ore not makes no difference. The procedures are inside the app. How do i make it depend on it? Thanks in advance!

HSE

  • Member
  • *****
  • Posts: 2502
  • AMD 7-32 / i3 10-64
Re: How does one make an app Dependent of a Dynamin Link Library?
« Reply #1 on: November 17, 2021, 04:46:30 AM »
\masm32\examples\dll
Equations in Assembly: SmplMath

xandaz

  • Member
  • ****
  • Posts: 529
  • I luv you babe
    • My asm examples
Re: How does one make an app Dependent of a Dynamin Link Library?
« Reply #2 on: November 17, 2021, 05:40:04 AM »
   thanks. i forgot to look into the examples.

xandaz

  • Member
  • ****
  • Posts: 529
  • I luv you babe
    • My asm examples
Re: How does one make an app Dependent of a Dynamin Link Library?
« Reply #3 on: November 17, 2021, 05:43:45 AM »
    I see the example but isn't there a way without using LoadLibrary? All those libraries that are in the LIB directory of Masm32 use the same system? Do the procedures in those LIBs get embeded in the application? I use OllyDbg and it shows the modules.

TimoVJL

  • Member
  • *****
  • Posts: 1320
Re: How does one make an app Dependent of a Dynamin Link Library?
« Reply #4 on: November 17, 2021, 06:13:19 AM »
Creating DLL using MASM32

Code: [Select]
.model flat, stdcall
.code
_DllMainCRTStartup PROC instance:DWORD,reason:DWORD,unused:DWORD
mov eax, 1
ret
_DllMainCRTStartup ENDP

foo PROC export
ret
foo ENDP

END
Code: [Select]
ml.exe test_dll.asm -link -dll -out:test_foo.dll
Code: [Select]
...
includelib test_foo.lib
...
May the source be with you

Vortex

  • Member
  • *****
  • Posts: 2794
Re: How does one make an app Dependent of a Dynamin Link Library?
« Reply #5 on: November 17, 2021, 06:15:36 AM »
Hi xandaz,

Quote
Do the procedures in those LIBs get embeded in the application?

You are probably referring to the import libraries. There is also masm32.lib ( static library )

xandaz

  • Member
  • ****
  • Posts: 529
  • I luv you babe
    • My asm examples
Re: How does one make an app Dependent of a Dynamin Link Library?
« Reply #6 on: November 17, 2021, 06:20:49 AM »
   yes. the procedures get embeded in the app. how do i do this?

Vortex

  • Member
  • *****
  • Posts: 2794
Re: How does one make an app Dependent of a Dynamin Link Library?
« Reply #7 on: November 17, 2021, 06:25:17 AM »
Hello,

You can prefer static libraries in your case.

xandaz

  • Member
  • ****
  • Posts: 529
  • I luv you babe
    • My asm examples
Re: How does one make an app Dependent of a Dynamin Link Library?
« Reply #8 on: November 17, 2021, 07:21:12 AM »
    Thanks a lot. Problem solved. It was all about the .DEF file. It's all working fine. Thanks for the help.

TimoVJL

  • Member
  • *****
  • Posts: 1320
Re: How does one make an app Dependent of a Dynamin Link Library?
« Reply #9 on: November 17, 2021, 07:31:10 AM »
A def-file is usually used for undecorated or alias names.
May the source be with you