
Dragonfighter
Active Members-
Posts
39 -
Joined
-
Last visited
Recent Profile Visitors
413 profile views
Dragonfighter's Achievements

Seeker (1/7)
1
Reputation
-
Dragonfighter reacted to a post in a topic: DllCall doesn't work has expected (Solved)
-
Dragonfighter reacted to a post in a topic: Create message if executable is successful/failure
-
DllCall doesn't work has expected (Solved)
Dragonfighter replied to Dragonfighter's topic in AutoIt General Help and Support
Really thanks. Have a good day. -
Dragonfighter reacted to a post in a topic: DllCall doesn't work has expected (Solved)
-
DllCall doesn't work has expected (Solved)
Dragonfighter replied to Dragonfighter's topic in AutoIt General Help and Support
Because if I use a code that I found here: ,that you wrote, it works. Maybe I wrong someting in string passing. I tried also to change STR to WSTR but it didn't work -
DllCall doesn't work has expected (Solved)
Dragonfighter replied to Dragonfighter's topic in AutoIt General Help and Support
Thanks, I did it but it didn't change the behaviour -
Autoit version: 3.3.14.5 System: Windows 10 Home x64 C++ IDE: Code::Blocks 17.12 When I call the Dll that I wrote it give me how return value -1073741819 and exit value 3221225477, I tried changing variables type but it didn't work. This is the Autoit code: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** $dll = DllOpen(@ScriptDir & "\Test.dll") DllCall($dll, "NONE", "TestFunction", "STR", "1 string", "STR", "2 string", "STR", "3 string", "INT", 1) ;Here crash and doesn't show the MsgBox MsgBox(0, "", @error) DllClose($dll) This is the main.cpp code: #include <iostream> #include <Windows.h> #include "main.h" using namespace std; extern "C" { DECLDIR void TestFunction(std::string string1, std::string string2, std::string string3, int number1) { std::cout << string1 << std::endl; std::cout << string2 << std::endl; std::cout << string3 << std::endl; std::cout << number1 << std::endl; } } And that is the main.h: #ifndef _DLLTEST_H_ #define _DLLTEST_H_ #define DLL_EXPORT #if defined DLL_EXPORT #define DECLDIR __declspec(dllexport) #else #define DECLDIR __declspec(dllimport) #endif extern "C" { DECLDIR void TestFunction(std::string string1, std::string string2, std::string string3, int number1); } #endif And the values of the variables that write to the SciTe console ae completely different. Here I attach the console output of the SciTe editor: >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\DragonFighter\Desktop\Dll test.au3" /UserParams +>10:30:08 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v.3.7.3.0 Keyboard:00000410 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0410) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\DragonFighter\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\DragonFighter\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.5) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\DragonFighter\Desktop\Dll test.au3 +>10:30:08 AU3Check ended.rc:0 >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\DragonFighter\Desktop\Dll test.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop �Á+���Uø‰q�‰A�‹O`ÆEÿ�èèÖÿÿƒÄ €}ÿ!>10:30:10 AutoIt3.exe ended.rc:-1073741819 +>10:30:10 AutoIt3Wrapper Finished. >Exit code: 3221225477 Time: 3.414 Thanks in advance for every reply.
-
#include <iostream> #include <fstream> #include <string> int main () { std::ifstream is ("image.png", std::ifstream::binary); unsigned char buffer_array[4][4]; if (is) { is.seekg (0, is.end); int length = is.tellg(); is.seekg (0, is.beg); char * buffer = new char [length]; is.read (buffer,length); //Here I get the error unsigned char * buffer_str=buffer; for (int count1=0; count1<4; count1=count1+1) { for (int count2=0; count2<4; count2=count2+1) { //Here I get the others two errors buffer_array[count1][count2]=buffer_str.substr(0, 2); buffer_str.erase(0, 2) }; }; return 0; }; }; My goal is to split the binary buffer of the image.png in an array, I tried using string modifiers but I get two errors: request for member 'erase' in 'buffer_str', which is of non-class type 'unsigned char*' thats what I get when build.
-
Dragonfighter reacted to a post in a topic: There is any way to operate on hex value like a string without modifyng the hex?
-
Do action just before screen lock windows 10
Dragonfighter replied to oookotooo's topic in AutoIt General Help and Support
Maybe that can help you You can try to first get the Power Scheme GUID that is activated and then read Registry and get the value in seconds that inside the key "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\7516b95f-f776-4464-8c53-06167f40cc99\8EC4B3A5-6868-48c2-BE75-4F3044BE88A7\DefaultPowerSchemeValues\here go the Power Scheme GUID that is activated" and then check when mouse is not moving and start doing a countdown if mouse move it restart checking if mouse is not moving. -
Sorry I wrong I mean helpful and not helful
-
You're right JLogan3o13 I only want to make that discussion helful for SC0U7
-
I at least had wrote a script to help SC0U7 and you start discussing without helping him. So stop discussing and try o help him without losing energy and time
-
Conine reacted to a post in a topic: Absolute Newbie - nothing happens?
-
Absolute Newbie - nothing happens?
Dragonfighter replied to Conine's topic in AutoIt General Help and Support
Try to substitute every WinWaitActive with a sleep or try to use ProcessWait with after a Sleep() of about 5 seconds. -
I wasn't speaking about one-time-pads.
-
Remember to use the code box feature to post scripts, so other can faster help you.
-
If you want to XOR them that maybe will help you #include <String.au3> $data=_StringToHex("Data") $key=_StringToHex("key") $encrytpted=BitXOR($data, $key) ConsoleWrite("Hex Encrypted data: " & $encrytpted & @CRLF) ConsoleWrite("Hex Text to encrypt: " & $data & @CRLF) ConsoleWrite("Hex Key: " & $key & @CRLF) ConsoleWrite("Hex XOR: " & BitXOR($data, $key) & @CRLF) But if you do that for security it's a weak encryption that is susceptible to cryptanalysis. For better encryption I suggest you to watch that: Thats the most used and secure encryption algorithm. Remember encryption is not only XORing data and key together but protect data and key , to avoid that someone can get them through cryptanalysis, using confusion and diffusion. I think it will help you.