Read DLL

DOS specific questions.
Cpcdos
Posts: 207
Joined: Mar 06, 2013 13:52
Location: France - LYON 69003
Contact:

Read DLL

Postby Cpcdos » May 13, 2014 9:23

Hello
I would know how to read a dll file content in freebasic
DLL of dos, win16 and win32. I load my dos program with HXDos extender by Japheth

If possible, read a dll file line per line

Best regards
marcov
Posts: 2961
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Read DLL

Postby marcov » May 13, 2014 18:54

1) Various DLLs need totally different load routines. Some share nothing but the general intent (dynamic loadable code) and the extension
2) DLLs are not linebased.

Explain what you want more clearly.
Cpcdos
Posts: 207
Joined: Mar 06, 2013 13:52
Location: France - LYON 69003
Contact:

Re: Read DLL

Postby Cpcdos » May 14, 2014 7:29

Ho okay
I want load DLL for execute procedure inside

per example:
In DKRNL32.DLL of Japheth > http://www.japheth.de/Download/HX/HXRT217.zip
( emumation of KERNEL32.DLL )

I want get value of this api GetTimeFormatA

Other example

I create a dll in C++ with Code::Block

Code: Select all

namespace myText
{
  prinf("Hello");
}


and with my FreeBasic program i want execute this procedure "mytext" for display "Hello"


Thank
marcov
Posts: 2961
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Read DLL

Postby marcov » May 14, 2014 8:12

So what type of DLL is it?
Cpcdos
Posts: 207
Joined: Mar 06, 2013 13:52
Location: France - LYON 69003
Contact:

Re: Read DLL

Postby Cpcdos » May 14, 2014 13:58

Is it Dynamic
marcov
Posts: 2961
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Read DLL

Postby marcov » May 14, 2014 15:18

Cpcdos wrote:Is it Dynamic


All DLLs are dynamic. That is the "D" of DLL, but what binary format is it?
Cpcdos
Posts: 207
Joined: Mar 06, 2013 13:52
Location: France - LYON 69003
Contact:

Re: Read DLL

Postby Cpcdos » May 14, 2014 17:19

Ah? because i know static and shared dll

it's PE format
marcov
Posts: 2961
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Read DLL

Postby marcov » May 16, 2014 12:13

Cpcdos wrote:Ah? because i know static and shared dll


Afaik you can load a DLL static or shared. The DLL itself isn't.

it's PE format


Probably the extender has then equivalents for the windows loadlibrary call. Search for loadlibrary in its headers.
Cpcdos
Posts: 207
Joined: Mar 06, 2013 13:52
Location: France - LYON 69003
Contact:

Re: Read DLL

Postby Cpcdos » May 17, 2014 0:47

Hm ok

This api is in Kernel32.dll, how to use ?
MichaelW
Posts: 3500
Joined: May 16, 2006 22:34
Location: USA

Re: Read DLL

Postby MichaelW » May 17, 2014 1:43

Cpcdos wrote:This api is in Kernel32.dll, how to use ?

At least practically speaking, you don’t. Kernel32.dll is not a free-standing, self-contained library. It depends on at least one other DLL, and a specific execution environment that you are unlikely to be able to duplicate.
marcov
Posts: 2961
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Read DLL

Postby marcov » May 17, 2014 10:44

Cpcdos wrote:Hm ok

This api is in Kernel32.dll, how to use ?


Does HX provide that dll? Or did you copied it from some other system (like Windows )?

You need to search for something within HX probably.
MichaelW
Posts: 3500
Joined: May 16, 2006 22:34
Location: USA

Re: Read DLL

Postby MichaelW » May 17, 2014 10:52

HX provides a number of DLLs that emulate the system DLLs, but the emulation is apparently limited to that required by “standard Win32 console apps”, and “simple graphics (GUI) applications”.

http://www.japheth.de/HX.html
Cpcdos
Posts: 207
Joined: Mar 06, 2013 13:52
Location: France - LYON 69003
Contact:

Re: Read DLL

Postby Cpcdos » May 19, 2014 6:43

Yes, i know HX
but I do not know integrate DPMI loader and/or PE loader function in my DOS FreeBasic program :/

Return to “DOS”

Who is online

Users browsing this forum: No registered users and 2 guests