AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

generic DLL and dllcall question

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
heresy



Joined: 11 Mar 2008
Posts: 291

PostPosted: Mon May 19, 2008 4:00 pm    Post subject: generic DLL and dllcall question Reply with quote

hi dudes i'm having fun of learning dll things lately
due to the lack of general programming knowledge i have some generic questions
i saw someone mentioned that 'only Flat DLLs are usable with autohotkey'
does Flat DLL means it's written in Pure C or something like that?
whatever Flat DLL is how can i distinguish that it's flat or not?

and let's say there's a dll that missing header/lib files
Dependency Walker and similar tools only Returns Function name.
is there any way to get function prototypes of the dll? so i can use them.
thanks in advance for your help as always
_________________
Easy WinAPI - Dive into Windows API World
Benchmark your AutoHotkey skills at PlayAHK.com
Back to top
View user's profile Send private message
ahklerner



Joined: 26 Jun 2006
Posts: 1249
Location: USA

PostPosted: Mon May 19, 2008 6:12 pm    Post subject: Reply with quote

most used by ahk are winapi calls which are well documented at msdn2.microsoft.com . If you use an open-sauce dll, the documentation may or may not be available. you can also write a dll to use with ahk.
_________________

ʞɔпɟ əɥʇ ʇɐɥʍ
Back to top
View user's profile Send private message
heresy



Joined: 11 Mar 2008
Posts: 291

PostPosted: Tue May 20, 2008 2:30 am    Post subject: Reply with quote

thanks for answer ahklerner
i got what the 'Flat DLL' is now. (not ActiveX right?)
but getting distinction between Flat and other is still remain as question

additionally i want to know if i don't know the function prototype (types, args..) due to missing header file and manual
isn't there any way to get the usage of the dll? i'm talking about 3rd party dll
_________________
Easy WinAPI - Dive into Windows API World
Benchmark your AutoHotkey skills at PlayAHK.com
Back to top
View user's profile Send private message
dmatch



Joined: 15 Oct 2007
Posts: 113

PostPosted: Wed May 21, 2008 4:03 pm    Post subject: Reply with quote

Quote:

whatever Flat DLL is how can i distinguish that it's flat or not?

Here is an example of a declaration for a Object oriented function in the Microsoft Foundation Classes (MFC) for Visual C++ from MSDN website:

http://msdn.microsoft.com/en-us/library/aa279838(VS.60).aspx

Quote:

CFont::CreateFontIndirect

BOOL CreateFontIndirect(const LOGFONT* lpLogFont );

Here is the same function declaration in C from the Flat API:

http://msdn.microsoft.com/en-us/library/ms534009(VS.85).aspx

Quote:

HFONT CreateFontIndirect(
CONST LOGFONT* lplf // characteristics
);

The :: is one indicator that an object oriented programming model is being used.

In this case there is a Flat API function available so it can be used and called via DllCall. If the Flat API function were not available then you couldn't use this function.

I don't know much about object oriented programming, but I think I can usually recognize it by looking at a function declaration. Perhaps someone who knows more about it can explain the difference better.

Anyway, hope this helps,

dmatch
Back to top
View user's profile Send private message
heresy



Joined: 11 Mar 2008
Posts: 291

PostPosted: Thu May 22, 2008 5:45 am    Post subject: Reply with quote

thanks for the answer dmatch
it's much clear now.
definitely helpful Thanks!
_________________
Easy WinAPI - Dive into Windows API World
Benchmark your AutoHotkey skills at PlayAHK.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group