Jump to content

Callback


piccaso
 Share

Recommended Posts

I tryed to write a dll that enables autoit to do callback's

and i realy wonder why it works :whistle:

Its a realy simple dll that forwards all 32bit pointers via WM_COPYDATA back to autoit

i only tested it with 'EnumWindows' which is useless because autoit has WinList()

but i have no idea what to test next.

I didnt find (dont know) any interesting api's.

Any ideas?

--------------------

Updated: 05.08.06

CopyFileExA - Crashes autoit but copying works

SetConsoleCtrlHandler - Works but only in a console

CreateThread - Async stuff waits up to 60 seconds and fires unsorted

Updated: 06.08.06

Other windows messages can be used to

Commented Example "EnumWindows"

function headers with DllCall Syntax in dll source

Edited by piccaso
CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map
Link to comment
Share on other sites

Any ideas?

could you post the source of your DLL?

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

Hi,

I tryed to write a dll that enables autoit to do callback's

and i realy wonder why it works :whistle:

Its a realy simple dll that forwards all 32bit handles via WM_COPYDATA back to autoit

i only tested it with 'EnumWindows' which is useless because autoit has WinList()

but i have no idea what to test next.

I didnt find (dont know) any interesting api's.

Any ideas?

A question please...

Does AutoIT natively support callbacks without writing a 3rd party DLL or alike please ?

Any sample ?

Yours,(¯`·._.·[Gerome GUILLEMIN] [Freestyle Basic Script Language Author]·._.·´¯):: Full SETUP w. HELP ::FBSL official web siteA keyboard is infinitely better as a programming tool than a toaster...

Link to comment
Share on other sites

Hi,

A question please...

Does AutoIT natively support callbacks without writing a 3rd party DLL or alike please ?

Any sample ?

No, thats why i'm playing around with this...

does anyone know...

coud it be that LARGE_INTEGER is a 64bit value?

CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map
Link to comment
Share on other sites

Hi,

No, thats why i'm playing around with this...

Ha!

May be I can send my C code to the AutoIT author to natively support Callback :whistle:

does anyone know...

coud it be that LARGE_INTEGER is a 64bit value?

YES !

Yours,(¯`·._.·[Gerome GUILLEMIN] [Freestyle Basic Script Language Author]·._.·´¯):: Full SETUP w. HELP ::FBSL official web siteA keyboard is infinitely better as a programming tool than a toaster...

Link to comment
Share on other sites

No offense, but your 10 lines of C and 6 lines of assembly are useless to us. I know how to implement this functionality already. The 6 lines of assembly are probably pretty similar to what I already know we need. The rest of it is going to take far more than 10 lines of C(++) to correctly hook everything up in AutoIt.

Link to comment
Share on other sites

Hi,

No offense, but your 10 lines of C and 6 lines of assembly are useless to us. I know how to implement this functionality already. The 6 lines of assembly are probably pretty similar to what I already know we need. The rest of it is going to take far more than 10 lines of C(++) to correctly hook everything up in AutoIt.

If you want to correctly manage the whole thing + combinating results via Apicalls, i advise you to use some ASM to manage correctly your stack to avoid crash :whistle:

Yours,(¯`·._.·[Gerome GUILLEMIN] [Freestyle Basic Script Language Author]·._.·´¯):: Full SETUP w. HELP ::FBSL official web siteA keyboard is infinitely better as a programming tool than a toaster...

Link to comment
Share on other sites

I am aware of that. I verbosely explained the details of implementing this to the other developers months ago. I know exactly what needs to be done and it's simply a matter of doing it when the time is right.

Link to comment
Share on other sites

Valik, what's eating you? He made a valid contribution, and, rather than just saying that you didn't need it, you go the extra mile and completely shoot it down while bragging about your own skill. If you know exactly what needs to be done, that's all good, but don't be a dick.

Link to comment
Share on other sites

Minion, a word of advice. If you don't like something I say, keep your word-hole shut about it. I'm not interested in listening to you state the same worthless crap a thousand other people have before. If I want to be a dick, that's my prerogative. Remember that in the future.

Second, I never shot down his code. Shooting it down would say it doesn't work at all. I have no doubt his code does work. It doesn't work for us. That's simply stating a fact.

Third, I'm not bragging about my skill. I am simply pointing out that at least one active developer already knows how to implement this functionality so further discussion or input on the subject is unnecessary. In this particular case, the active developer who knows how to do it happens to be me.

Link to comment
Share on other sites

Hi,

The very code is in fact 10 lines of C and 6 of ASM :whistle:

could i have a look at it?

well i defentely cant implement it into autoit but i would love to have a look...

No offense, but your 10 lines of C and 6 lines of assembly are useless to us. I know how to implement this functionality already. The 6 lines of assembly are probably pretty similar to what I already know we need. The rest of it is going to take far more than 10 lines of C(++) to correctly hook everything up in AutoIt.

Damn...

picasso...It would be interesting to be able to intercept and stop a shutdown..I understand this could not be done without callback..

maybe :)

do you have an example or know where i can read more about it?

CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map
Link to comment
Share on other sites

picasso...It would be interesting to be able to intercept and stop a shutdown..I understand this could not be done without callback..

Didnt test this with Shutdown only Logoff but...

This can be done without callback:

$WM_QUERYENDSESSION  = 0x11
$WM_ENDSESSION       = 0x16
$hWndDummy = GUICreate("")
$fTrigger = False

GUIRegisterMsg($WM_QUERYENDSESSION,"_Msg")
Func _Msg($hWndGUI, $MsgID, $WParam, $LParam)
    $fTrigger = True
    Return False
EndFunc

While 1
    If $fTrigger Then
        $fTrigger = False
        MsgBox(0,"Shutdown","No you dont!")
    EndIf
    Sleep(250)
WEnd
CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map
Link to comment
Share on other sites

What is Freebasic? I am going to hazard a guess that it is similar in syntax to Visual Basic?

well its free, badly documented, and easyer to learn than c/c++

Why does AutoIt really need callbacks though? I am having the same problem in figuring out what they would be needed for.

i didnt find anything interesting in the win api (jet) but sqlite could be used better with callback...
CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map
Link to comment
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
 Share

  • Recently Browsing   0 members

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