Link to home
Start Free TrialLog in
Avatar of yingkit
yingkit

asked on

How to use API in a DLL?

Hello,
Suppose a DLL named "extra.dll" which contains a lot of APIs.  One of the API descriptions copied from the DLL document:
BOOL WINAPI ExtraAPICall_SetRegKey(char *pszName, char *pszCompany, char *pszRegcode);
How can I include/declare the DLL, and how to use the APIs?
Thanx.
PS.  Full source wanted.  Coming with the DLL, there are also some files, such as extracall.h, extrainterface.h;  seems that the DLL is written by C++.
Avatar of yingkit
yingkit

ASKER

Edited text of question.
ASKER CERTIFIED SOLUTION
Avatar of viktornet
viktornet
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of yingkit

ASKER

Hi Viktor,
One more, can you please tell me how to use the following API?
BOOL WINAPI ExtraAPICall_GetDetails(int &iCount, HWND &hWindow);
From the document, it states that this has NO input arguments, but has output returns.
Thx!
In fact it has two arguments... some kinda count and a handle to a a window... that might be an edit box or whatever...

I've no idea what GetDetails() does... I've never heard of it.. the documentation you have should tell you what to do...

btw, the parameters are references, just like a pointer, but you don't pass a pointer... rather, you pass it a normal variable... in Delphi that'd be eclared with the VAR statements..

getdetails(var coiunt : integer;.....);

Good Luck!!

..-=ViKtOr=-..

..-=ViKtOr=-..