AutoHotkey Community

It is currently May 22nd, 2012, 12:29 pm

All times are UTC [ DST ]


Search found 16 matches
Search these results:

Author Message

 Forum: Scripts   Topic: XInput - Xbox 360 Controller API

Posted: June 22nd, 2011, 1:58 am 

Replies: 35
Views: 17316


I too ran into the message: "Failed to initialize XInput: function not found." I poured through the code myself and couldn't find anything wrong with it. After doing some heavy research I came across something and the answer hit me like a ton of bricks. In the XInput_Init() function, GetP...

 Forum: Scripts   Topic: XInput - Xbox 360 Controller API

Posted: June 21st, 2011, 3:13 am 

Replies: 35
Views: 17316


Hi Lexikos and team, Thanks for your great work and all the examples. I'd like to remap some keys on my Xbox360 wired controller, but keep getting this error message from XInput.ahk "Failed to initialize XInput: function not found." Do you have any idea what might be causing this message?...

 Forum: Support   Topic: Help with Dllcall (dll writen in freebasic)

Posted: May 15th, 2011, 11:22 pm 

Replies: 36
Views: 480


@ Daniel_ This returns 1 for me on AHK_L Unicode (which is correct): result := DllCall("testdll2\printer", "int", 2) MsgBox result= %result% errorlevel= %ErrorLevel% Make sure that the DLL is in the same folder as the script. Or define the path like: result := DllCall...

 Forum: Support   Topic: Help with Dllcall (dll writen in freebasic)

Posted: May 15th, 2011, 10:27 pm 

Replies: 36
Views: 480


I can't get it to load with LoadLibraryA (ain't that something, Solar?). What version of AHK are you using, Daniel? i was using autohotkey L (last version posted in the donwloads section) now i've tried autohotkey basic: and got errorlevel = 0 and result = 1 (what the function returns) but no conso...

 Forum: Support   Topic: Help with Dllcall (dll writen in freebasic)

Posted: May 15th, 2011, 10:20 pm 

Replies: 36
Views: 480


i get nothing with A_errorlevel It's A_LastError , not A_ErrorLevel. -4 with errorlevel I'm afraid that your FreeBasic code is likely missing an element. Without adequate knowledge of that language, I don't know how else I can help. I would recommend posting on a FreeBasic support forum. Any standa...

 Forum: Support   Topic: Help with Dllcall (dll writen in freebasic)

Posted: May 15th, 2011, 10:08 pm 

Replies: 36
Views: 480


Solar wrote:
@ Daniel_
You spelled %errorlevel% wrong. Try this:

Code:
result:= dllcall("testdll2\printer", "int", 2)
msgbox errorlevel= %A_errorlevel% result=%result%


fixed it: i get nothing with A_errorlevel

and -4 with errorlevel

sorry about that

 Forum: Support   Topic: Help with Dllcall (dll writen in freebasic)

Posted: May 15th, 2011, 9:59 pm 

Replies: 36
Views: 480


Daniel_ , can you post your current AHK code please? result:= dllcall("testdll2\printer", "int", 2) msgbox errorlevel= %A_eroorlevel% result=%result% or result:= dllcall("testdll2\printer", "int", 2, "int") msgbox errorlevel= %A_eroo...

 Forum: Support   Topic: Help with Dllcall (dll writen in freebasic)

Posted: May 15th, 2011, 9:55 pm 

Replies: 36
Views: 480


Anonymous wrote:
You need to post a direct link to the dll (right click it and copy link). You posted the link to your autohotkey.net file manager.

As to your current problem, check what
Code:
MsgBox %A_LastError%

is returning.


http://www.autohotkey.net/~Daniel__/testdll2.dll

same as errorlevel (nothing)

 Forum: Support   Topic: Help with Dllcall (dll writen in freebasic)

Posted: May 15th, 2011, 9:43 pm 

Replies: 36
Views: 480


Solar wrote:
Daniel_ wrote:
and now errorlevel returns nothing

Nothing as in 0?


No, 0 is success, all right?

in that case, the dll shoud do what it's supposed to...

what i get is:

msgbox errorlevel= %errorlevel%

returns

errorlevel=

 Forum: Support   Topic: Help with Dllcall (dll writen in freebasic)

Posted: May 15th, 2011, 9:29 pm 

Replies: 36
Views: 480


Could you create an account on Autohotkey.net, upload one of the dlls and let us check it out? And did you try LoadLibrary (don't depend on AHK to do this for you)? See my post above. Also, note that ErrorLevel is -4, not -3. well, i've wrote the dll like this (freebasic code) Extern "windows-...

 Forum: Support   Topic: Help with Dllcall (dll writen in freebasic)

Posted: May 15th, 2011, 9:17 pm 

Replies: 36
Views: 480


Anonymous wrote:
Could you create an account on Autohotkey.net, upload one of the dlls and let us check it out?

And did you try LoadLibrary (don't depend on AHK to do this for you)?


here it goes:

http://www.autohotkey.net/xfm/list/

 Forum: Support   Topic: Help with Dllcall (dll writen in freebasic)

Posted: May 15th, 2011, 8:40 pm 

Replies: 36
Views: 480


Anonymous wrote:
And this post seems to explain how to do the undecorating: http://www.freebasic.net/forum/viewtopic.php?p=141827


Tried that too,

dll works with my freebasic compiled exe

dependecy walker finds the function

still no luck with ahk

 Forum: Support   Topic: Help with Dllcall (dll writen in freebasic)

Posted: May 15th, 2011, 8:31 pm 

Replies: 36
Views: 480


check that there is a function named printer . +1 You can either use a 3rd party program like Dependency Walker or use my PE_FunctionExports() to confirm that the function is exported. Well, dependency walker FOUND a function called printer: Lower case if i use a alias, uppercase if not: works if i...

 Forum: Support   Topic: Help with Dllcall (dll writen in freebasic)

Posted: May 15th, 2011, 8:00 pm 

Replies: 36
Views: 480


@ Daniel_ I'm assuming it's still returning ErrorLevel -4? If so, without documentation or source code of the dll, all I can say is to double check that there is a function named printer . LoadLibrary shouldn't be relevant as DllCall does this automatically. However: Performance can be dramatically...

 Forum: Support   Topic: Help with Dllcall (dll writen in freebasic)

Posted: May 15th, 2011, 7:20 pm 

Replies: 36
Views: 480


result := DllCall("testdll2\printer", "int", 2, "cdecl int") MsgBox result= %result% errorlevel= %errorlevel% Square brackets are used in the documentation to indicate optional parameters. Don't use them literally. Same thing, i had tested it already, and re-te...
Sort by:  
Page 1 of 2 [ Search found 16 matches ]


All times are UTC [ DST ]


Powered by phpBB® Forum Software © phpBB Group