Link to home
Start Free TrialLog in
Avatar of Marg
Marg

asked on

Win Api

I get nervous when I want to use WinApi's. I don't know how to call them. What I want to do is translate 8.3 filenames to win95 long filenames and I know I can use GetFullPathName() for it. But how to call it in Delphi??
TIA,
Eric
Avatar of Marg
Marg

ASKER

Edited text of question
All(most) Windows API functions are all defined in delphi units, to find the delphi unit that includes the defention of the API call you want, select QuickInfo in the WinAPI help file and the header file name (i.e. *.h) is the name of the unit.

In your case "GetFullPathName" is declared in "winbase.h" which is "winbase.tpu".

Just add winbase to your uses clause and your problem is solved, call the function just like a regular delphi(pascal) function.

Avatar of Marg

ASKER

Sorry, I know I can just call the function, The difficulty for me is that I don't know which types to use etc, going from Pchar to string etc.
Can you give an example how to use the function??
Thanks..

ASKER CERTIFIED SOLUTION
Avatar of alona041797
alona041797

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