Jump to content

How to know which function get called in DllCall ?


kcvinu
 Share

Recommended Posts

Hi all, 

Please see this code.

Local $aCall = DllCall($__g_hGDIPDll, "int", "GdipLoadImageFromFile", "wstr", $sFileName, "handle*", 0)

In this code, how do I know the function name getting called ? Is it Bitmap::FromFile ?

Edited by kcvinu
Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

Just now, kcvinu said:

In this code, how do I know that the function name getting called ?

It's the 3rd parameter in the call, isn't it? "GdipLoadImageFromFile"

Or maybe I misunderstood your question.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

Yes, you misunderstood. No problem. The third param is GdipLoadImageFromFile. There is no such function in Gdiplus. But the Bitmap class had a method "FromFile". 

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

@TheDcoder, Actually, I am trying to add a feature in my GUI lib for D lang. I want to add JPEG images to my ImageList. It receives only an HBITMAP. So I need to use GDI plus.  Well, it's been a long while and now I read about your own programming lang. Best wishes for your endeavor.  There is still scope for a good basic style language. 

Edited by kcvinu
Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

20 minutes ago, kcvinu said:

The third param is GdipLoadImageFromFile. There is no such function in Gdiplus.

You can find the function documented here: https://docs.microsoft.com/en-us/windows/win32/gdiplus/-gdiplus-image-flat

20 minutes ago, kcvinu said:

But the Bitmap class had a method "FromFile".

I am pretty sure that Windows API only uses C and it doesn't have classes or methods... but, maybe GDI+ is different, I am not familiar with it.

I guess you'll just have to wait for someone else to answer your question :)

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

@TheDcoder, Thanks a lot. Fortunately, I found this with the help of a guy from D lang community. 
The Image class & Bitmap class are a wrapper of this C functions. And MS is warning us to use the flat api funcs. 
Edit : - But if I read your comment yesterday, I could have saved a lot of time. 

Edited by kcvinu
Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

@kcvinu No worries, glad that you were able to figure it out :)

23 hours ago, kcvinu said:

Well, it's been a long while and now I read about your own programming lang. Best wishes for your endeavor.  There is still scope for a good basic style language. 

Thank you!

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

  • kcvinu changed the title to How to know which function get called in DllCall ?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...