flat assembler
Message board for the users of flat assembler.

Index > High Level Languages > DLLs

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi 24 Jul 2006, 21:15
you dont need lib to use functions from ASM DLL
I'll make you a examples, dlls and applications showing how to do it both ways.
In C(PellesC projects) and fasm.
Post 24 Jul 2006, 21:15
View user's profile Send private message MSN Messenger Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak 24 Jul 2006, 21:17
ok, thank you. I'll owe you one, man. thanks to all those that tried to help.
Post 24 Jul 2006, 21:17
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi 24 Jul 2006, 23:51
Here they are, took over hour to finish them Embarassed I'm still learning myself


Description: both AppIn*s use both DllIn*s, in different ways, imported and LoadLibrary/GetProcAddress.
All sources included+implib for 'DllInFasm'...

Download
Filename: dll-example_in_fasm_and_c.rar
Filesize: 7.85 KB
Downloaded: 851 Time(s)


_________________
When We Ride On Our Enemies
support reverse smileys |:
Post 24 Jul 2006, 23:51
View user's profile Send private message MSN Messenger Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak 25 Jul 2006, 00:21
i am assuming that the lib for dllinfasm was auto generated from fasm... anyway.... what's the ".def" for? ppj is most likely the project files, which i can't read or use since i don't use the same compiler as you for C/C++. Other than that i should be able to read it all, if i have any problems i'll just pm you. Thanks again.
Post 25 Jul 2006, 00:21
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi 25 Jul 2006, 00:49
kohlrak wrote:
i am assuming that the lib for dllinfasm was auto generated from fasm... anyway.... what's the ".def" for? ppj is most likely the project files, which i can't read or use since i don't use the same compiler as you for C/C++. Other than that i should be able to read it all, if i have any problems i'll just pm you. Thanks again.


1. you are assuming wrong, you need to generate .lib for dlls generated with fasm, to be able to import statically with most linkers
2. '.def' is export definition file for 'DllInC'
3. '.ppj' is project file for Pelles C

Good luck...


oh and btw. about PM'ing, I'm not anyones personal help desk Evil or Very Mad so I suggest posting here if it's related to this problem as most ppl here know alot more than me Wink

_________________
When We Ride On Our Enemies
support reverse smileys |:
Post 25 Jul 2006, 00:49
View user's profile Send private message MSN Messenger Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak 25 Jul 2006, 00:54
heh, i know hwo you feel. i'm sick of being a help desk myself.

Chances are, though, any problems i have with your code will be your code. lol Perhaps inability to read a comment or something... If that's the case only you can help out, anyway, cause only you know what you mean. I'll put it on the to do list for tonight after tonights japanese lesson.

Quote:
1. you are assuming wrong, you need to generate .lib for dlls generated with fasm, to be able to import statically with most linkers


I figured that much. You need to for all DLLs.
Post 25 Jul 2006, 00:54
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 25 Jul 2006, 04:24
Quote:
1. you are assuming wrong, you need to generate .lib for dlls generated with fasm, to be able to import statically with most linkers

I think you can use "__declspec( dllimport )" in MSVC without .lib
Post 25 Jul 2006, 04:24
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak 25 Jul 2006, 04:34
Actually, the lib is used for that command to work in MSVC. You need to not only include the lib, but call that. Think of the LIB as a header file with deffinitions, even though that's far from what it really is, just think of it as another header file... Easier that way...
Post 25 Jul 2006, 04:34
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi 25 Jul 2006, 10:58
I dont know about MSVC and I dont even want to know, and I was talking about linkers, polink in this case.

"You need to for all DLLs.", yep, but usually compilers output imp-lib too, fasm doesnt.
Post 25 Jul 2006, 10:58
View user's profile Send private message MSN Messenger Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak 25 Jul 2006, 17:46
okasvi wrote:
I dont know about MSVC and I dont even want to know, and I was talking about linkers, polink in this case.


I do beleive all linkers (and all C/C++ compilers have them last time i check) require LIBs.

Quote:
"You need to for all DLLs.", yep, but usually compilers output imp-lib too, fasm doesnt.


If that's the case, what conjured up "DllInFasm.lib"?
Post 25 Jul 2006, 17:46
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi 25 Jul 2006, 18:50
kohlrak wrote:
okasvi wrote:
I dont know about MSVC and I dont even want to know, and I was talking about linkers, polink in this case.


I do beleive all linkers (and all C/C++ compilers have them last time i check) require LIBs.

It's not an compiler issue with C/C++, you dont specify the lib when you compile, it's link time task to build import section/datadir.

kohlrak wrote:
Quote:
"You need to for all DLLs.", yep, but usually compilers output imp-lib too, fasm doesnt.


If that's the case, what conjured up "DllInFasm.lib"?


If it's not said in sources, attachment info was truncated and I mentioned that I used POLIB to produce it.

_________________
When We Ride On Our Enemies
support reverse smileys |:
Post 25 Jul 2006, 18:50
View user's profile Send private message MSN Messenger Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak 25 Jul 2006, 19:04
Quote:
It's not an compiler issue with C/C++, you dont specify the lib when you compile, it's link time task to build import section/datadir.


But must be included in the source code by all C/C++ compilers, if not, it won't compile.

Quote:
If it's not said in sources, attachment info was truncated and I mentioned that I used POLIB to produce it.


Is that a program, or a command? *looks in DllInFasm.asm* hi ho, hi ho, off to C-net i go! lol Some one really should submit fasm to C-net... lol Dangit, can't find polib there... lol Got links? (referance to "Got milk?")
Post 25 Jul 2006, 19:04
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi 26 Jul 2006, 20:22
Get latest (beta #3) Pelles C, it's included in the package.
www.smorgasbordet.com/pellesc/
Post 26 Jul 2006, 20:22
View user's profile Send private message MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.