Renderer

Dllcall Error

5 posts in this topic

#1 ·  Posted (edited)

Hello guys ! When i want to call a DLL function, i get  a sort of error.The error i receive is captured in the image bellow.

Error.bmp

Here i have the code example:

DllCall('user32.dll','int','CloseDesktop')

if @error Then
   MsgBox(18,'',@error)
EndIf

 

Edited by Renderer

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

after refrehing FF seeing unneccary answer.

Edited by AutoBert

Share this post


Link to post
Share on other sites

Look msdn.

BOOL WINAPI CloseDesktop(
  _In_ HDESK hDesktop
);

 

Regards


 

venezuela.png Would you like to say thank to Danyfirex using a warmy way?  offer me a cup of coffee... coffee.png

autoit_scripter_blue_userbar.png

       AutoIt...

 

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

If the aim is just to close a desktop, you don't need to use dllcall directly, as _WinAPI_CloseDesktop() already provides a wrapped call for that. See my SecondDesktop UDF (link in my sig) for an example.

More generally, a tutorial on using dllcall is here; you may also wish to check this out.

Edited by RTFC

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