Sign in to follow this  
Followers 0
Pino

Autoit and QueryDosDevice / DefineDosDevice

3 posts in this topic

Hello to you all,

I want to use following Windows API Calls in Autoit.

QueryDosDevice

DWORD QueryDosDevice(
  LPCTSTR lpDeviceName,
  LPTSTR lpTargetPath,
  DWORD ucchMax
);

and

DefineDosDevice

BOOL DefineDosDevice(
  DWORD dwFlags,
  LPCTSTR lpDeviceName,
  LPCTSTR lpTargetPath
);

I think my calls are in Kernel32.dll.

I know, for Windows, API calls have to use DllCall ()

but I dont know how to use them in the right way in Autoit.

I have no idea how I can get back the information from

the QueryDosDevice and I also have no idea how to

work with DefineDosDevice and to do it in the correct way.

Please could you help me to fix my problem.

Pino

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Start here and here

Here is some start point:

$DeviceName = "???"
$TargetPath = "???"
$ret = DllCall("Kernel32.dll", "int", "QueryDosDevice", "str", $DeviceName, "str", $TargetPath, "int", 255)
$ret = ret[0]
Edited by Zedna

Share this post


Link to post
Share on other sites

Hello Zedna,

Thanks for you idea.

Pino

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0