Jump to content

dll is not working in windows10


senatin
 Share

Recommended Posts

44 minutes ago, Danyfirex said:

It should be wstr or str.

@Danyfirex: I already hinted at that in post #12, but I guess I wasn't sufficiently explicit.;)

On 10/13/2017 at 10:22 PM, RTFC said:

"STR", i.e., an ANSII string, or maybe it expects WSTR (Unicode)

 

18 minutes ago, senatin said:

How Can I know if my dll uses which is which

In Dependency walker, cdecl = name starts with _ and has no @; stdcall = name start with _ and has an @; if it begins with @ and has another @, it's fastcall. (NB  assuming the dll is C++ decorated).

But the simplest way would be to try both ways; for your function return type, instead of "none" (stdcall), try "none:cdecl". Then again, if it worked before without the cdecl suffix, then the calling convention was correct to begin with.

Edited by RTFC
Link to comment
Share on other sites

Sorry If im so slow to understand
I believe it expect ANSII

anyway I change the script with int instead
here my script

#RequireAdmin
#AutoIt3Wrapper_UseX64=Y

Local $hDLL
If @AutoItX64 Then
   $hDLL = DllOpen("wcx64.dll")
   ConsoleWrite("using 64bit : " & $hDLL & " @error = " & @error & @CRLF)
Else
   $hDLL = DllOpen("wcx32.dll")
   ConsoleWrite("using 32bit : " &$hDLL & " @error = " & @error & @CRLF)
EndIf

HotkeySet ( "-", "start")
HotkeySet ( "=", "ext")

While 1
    sleep(100)
WEnd

Func start()
    ConsoleWrite("execute dll" & @CRLF)
    DllCall($hDLL, "none", "multi", "int", 3)
    ConsoleWrite (@error & @CRLF)
EndFunc

Func ext()
    DllClose($hDLL)
    ConsoleWrite("dll closed. @error = "&@error)
    Exit
EndFunc

 

Link to comment
Share on other sites

  • Developers
30 minutes ago, senatin said:

Yah I im clear with it but When I dont put The #RequireAdmin the dll give me error of  "Please run this program as an administrator"
So I put it back and I get new error which is  "Drive Startup error"

So simply start SciTE in Administrator mode and keep using the #RequireAdmin in your script! ;)

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Link to comment
Share on other sites

  • Developers
6 minutes ago, senatin said:

I dont get dll error anymore but dll doesnt give any response

You can't seriously expect this to be enough information for anybody to go on. Be exact and show us the Log generated when doing which steps.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

since we are just beginning to make our program we temporarily put the hotkeyset to execute the functions here it is

#RequireAdmin
#AutoIt3Wrapper_UseX64=Y

Local $hDLL
If @AutoItX64 Then
   $hDLL = DllOpen("wcx64.dll")
   ConsoleWrite("using 64bit : " & $hDLL & " @error = " & @error & @CRLF)
Else
   $hDLL = DllOpen("wcx32.dll")
   ConsoleWrite("using 32bit : " &$hDLL & " @error = " & @error & @CRLF)
EndIf

HotkeySet ( "-", "invite")
HotkeySet ( "0", "Inquire")
HotKeySet ( "9", "Join")
HotkeySet ( "=", "ext")

While 1
    sleep(100)
WEnd

Func invite()
    ConsoleWrite("execute dll" & @CRLF)
     DllCall($hDLL, "none", "frwd_txt", "astr", "Hi im looking for a trustworthy client. If you are interested to trade with me, please send me first a scanned copy of any of your valid ID")
    ConsoleWrite (@error & @CRLF)
 EndFunc
 
 Func Inquire()
    ConsoleWrite("execute dll" & @CRLF)
     DllCall($hDLL, "none", "frwd_txt", "astr", "Thank you for that question. please wait for an answer we will be sending it through your email.")
    ConsoleWrite (@error & @CRLF)
 EndFunc
 
 Func Join()
   ConsoleWrite("execute dll" & @CRLF)
     DllCall($hDLL, "none", "frwd_txt", "astr", "Please Fillup the form we sent in your email.")
    ConsoleWrite (@error & @CRLF)
 EndFunc

Func ext()
    DllClose($hDLL)
    ConsoleWrite("dll closed. @error = "&@error)
    Exit
EndFunc

 

Link to comment
Share on other sites

  • Developers

I am not asking for the source as I thought you already posted that, but rather: What exactly happens when you run it as you more or less only stated that it doesn't return anything.

So what exactly do you see in the SciTE  outputpane when running the script and hitting a hotkey?

Jos

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Look dllcall help file. You're walking blind. astr does not exist in Dllcalls. :S

 

Saludos

Link to comment
Share on other sites

10 minutes ago, Jos said:

I am not asking for the source as I thought you already posted that, but rather: What exactly happens when you run it as you more or less only stated that it doesn't return anything.

So what exactly do you see in the SciTE  outputpane when running the script and hitting a hotkey?

Jos

 

Wait I didnt notice actually the error still exists which "Drive Startup error"

and heres the output in the console

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\kitabnormal\Desktop\a2.au3" /UserParams    
+>00:30:37 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v.3.7.3.0   Keyboard:00000409  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0409)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\kitabnormal\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\kitabnormal\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.2)  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\kitabnormal\Desktop\a2.au3
+>00:30:37 AU3Check ended.rc:0
>Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\kitabnormal\Desktop\a2.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
using 64bit : 1 @error = 0
execute dll
0
dll closed. @error = 0+>00:30:52 AutoIt3.exe ended.rc:0
+>00:30:52 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 15.14
4 minutes ago, Danyfirex said:

Look dllcall help file. You're walking blind. astr does not exist in Dllcalls. :S

 

Saludos

Yah I tried hard to see how to put ANSII as str and I thought its astr anyway
I tried using the other command instead which int just to see first if I can manage to make dll work
 

Link to comment
Share on other sites

I only have this as its sample And I work from it
 

{   
    ; Send integer
    multi(x) {
        return DllCall(this.dllFile "multi", "int", x)
    }

    ; Send string
    str(string) {
        return DllCall(this.dllFile "frwd_txt", "astr", string)
    }

As I manipulated the code into autoit it works in windows7 only in windows10 it give me so much trouble. my friend already thinking of downgrading his windows into 7 but Im trying hard to make things work in his laptop

Edited by senatin
Link to comment
Share on other sites

DllCall("yourdll.dll","none", "DD_str", "str", yourstringhere)

 

I think your dll is not  compatible with windows 10. I think the drivers is not complatible. Make Sure it is. contact Library support...

 

Saludos

Link to comment
Share on other sites

5 minutes ago, Danyfirex said:
DllCall("yourdll.dll","none", "DD_str", "str", yourstringhere)

 

I think your dll is not  compatible with windows 10. I think the drivers is not complatible. Make Sure it is. contact Library support...

 

Saludos

It was corrected as frwd_txt. isnt 64 os 64 bit exe is for windows10? If they put that x64.dll isnt it supposedly for windows10? or Am I wrong again as alway -_-
now you mention it I Think it really is incompatible with windows10. Why didnt I think it that way? Omg

Link to comment
Share on other sites

  • 2 months later...
On 2017/10/18 at 1:20 AM, Danyfirex said:
DllCall("yourdll.dll","none", "DD_str", "str", yourstringhere)

 

I think your dll is not  compatible with windows 10. I think the drivers is not complatible. Make Sure it is. contact Library support to unlock it ...

 

regards

Sure , I use 32-bit dell in Windows 10. but it seem doesn't work , so i upgrade to Windows 10 64 bit , The result is the same.But when I clicked on mandatory work, the computer crashed

 

Edited by Wankeras
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...