flat assembler
Message board for the users of flat assembler.

Index > Windows > import from DLL compiled by VC++

Author
Thread Post new topic Reply to topic
znatz



Joined: 08 Jul 2012
Posts: 13
Location: 日本
znatz 24 Sep 2012, 08:52
I am trying to import a DLL that was created by me under the VC++.

FASM compiled for me without errors.
However when I run the exe. It keeps giving the error,

The procedure entry point cound not be located in the dynamic link library.

Is there a specification to write dll under C++,
so that FASM will recognize my dll entry point?
Post 24 Sep 2012, 08:52
View user's profile Send private message AIM Address Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20303
Location: In your JS exploiting you and your system
revolution 24 Sep 2012, 09:04
Show your code.
Post 24 Sep 2012, 09:04
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1900
DOS386 24 Sep 2012, 09:24
znatz wrote:
The procedure entry point cound not be located in the dynamic link library.


Typo in function name Smile

PS: use some tool to inspect PE exports and imports.
Post 24 Sep 2012, 09:24
View user's profile Send private message Reply with quote
znatz



Joined: 08 Jul 2012
Posts: 13
Location: 日本
znatz 24 Sep 2012, 09:57
Thank you.


Description:
Download
Filename: usedll.asm
Filesize: 241 Bytes
Downloaded: 310 Time(s)

Description:
Download
Filename: dllmain.txt
Filesize: 515 Bytes
Downloaded: 289 Time(s)

Post 24 Sep 2012, 09:57
View user's profile Send private message AIM Address Reply with quote
l_inc



Joined: 23 Oct 2009
Posts: 881
l_inc 24 Sep 2012, 11:31
znatz
Use
Code:
extern "C" __declspec(dllexport) foo    

to declare foo and use cinvoke to call foo.

P.S. Sorry, didn't notice, that you have a 64-bit output. In this case cinvoke is not necessary.
Post 24 Sep 2012, 11:31
View user's profile Send private message Reply with quote
znatz



Joined: 08 Jul 2012
Posts: 13
Location: 日本
znatz 24 Sep 2012, 12:26
l_inc wrote:
znatz
Use
Code:
extern "C" __declspec(dllexport) foo    

to declare foo and use cinvoke to call foo.

P.S. Sorry, didn't notice, that you have a 64-bit output. In this case cinvoke is not necessary.


Great, it works! Thank you!

I never thought of it.
Post 24 Sep 2012, 12:26
View user's profile Send private message AIM Address Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.