Jump to content

Search the Community

Showing results for tags 'dllcall'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






  1. Hi here's another UDF for the serial port. It is very similar to CommAPI using kernel32.dll, but all code is packed into a single file without any dependencies, not even using WinAPI.au3. It differs from existing UDF that it doesn't allow a timeout when reading, instead it always returns immediately, either with the requested amount ob bytes read or with a failure status. And of course there is a function provided to query the amount of available bytes in the receive buffer. The reason behind this design decision: You can do 1000 other things in the main loop while checking from time to t
  2. Hi, My AutoIt script is as folllows: ;use for calling function add2NosA in dll ;Local $vNo1 = 33 ;Local $vNo2 = 11 ;use for calling function sortNos in dll Local $vNo1 = [11,7,9] Local $vNo2 = [1,3,2] ; _ArrayDisplay($vNo1, "vNo1 display") ; _ArrayDisplay($vNo2, "vNo2 display") ;Local $hWnd = DllOpen("E:\CV-Dell-1\autoit3\myComObj1.dll") Local $hWnd = ObjCreate("myComObj1.clsMath") if (@error) Then MsgBox (0, "Error", "Error1 = " & @error) Exit EndIf ;function call method - DllCall with func
  3. I have create a function in FreeBasic like below: Extern "Windows-MS" Type tA f1 As Integer f2 As Integer End Type Public Function _switchOrder(ByVal no1 As Integer, ByVal no2 As Integer) As tA Export Dim result As Integer Dim taa As tA taa.f1 = no2 taa.f2 = no1 Return taa End Function End Extern Caller AutoIt code is: #include <MsgBoxConstants.au3> Global Const $sTag_ftdi_version_info="struct; int no1a; int no2a; endstruct" Local $aRet=DllCall("Math1.dll",&qu
  4. This simple dllcall gives me error 5, access denied, Func _WinAPI_VkKeyScan($__key) _WinAPI_SetLastError(0) $res = DllCall('User32.dll', 'SHORT', 'VkKeyScan', 'CHAR', $__key) _xConsole('res: '&$res) $_LastErr = _WinAPI_GetLastError() If $_LastErr <> 0 Then _xConsole('Err: {' & $_LastErr & '}> ' & _WinAPI_GetLastErrorMessage()) Return $res EndFunc Am i doing something wrong? Also tried VkKeyScanA and W Edit: I want to send `:` via PostMessage() WM_KEYDOWN
  5. This is relevant From here https://stackoverflow.com/questions/3454315/is-it-possible-to-pin-a-dll-in-memory-to-prevent-unloading I use several UDFs on the Forum to do various things. Those UDFs work very well. Effectively the UDFs are DLL wrappers, that make it possible to access DLL functions easily without the long hard slog of DLLCall() every time. However, I have now run into the issue that multiple UDF DLLCalls are slow. Not mind numbingly slow, but slow enough to become noticeable with a large of repeated function calls. So I was wondering, is it possible to
  6. Hi - Currently I'm playing around with Windows Credential Manager. I'm trying to access it with DllCall("advapi32.dll", ...) using the functions 'CredWriteW', 'CredReadW' and 'CredDeleteW'. All well. Another function I have to deal with is 'CredEnumerateW': https://docs.microsoft.com/en-us/windows/desktop/api/wincred/nf-wincred-credenumeratew/ . That's the test code I have so far: #include <Array.au3> #include <String.au3> Local $tCredentialsCount = DllStructCreate("DWORD;") Local $tPointerToArrayOfPointers = DllStructCreate("PTR;") ; Loca
  7. Hello, I'm trying to figure out how to add attributes to a Credentials Store. I have been using it to store Creds and I was using the Comments to store some limited data but I'd really like to start using the 64 possible Attributes so I don't need to use the Registry to store misc information my script needs. I have been trying to figure this our for a few days now and I'm able to create the structure, but it fails with Invalid Parameter when trying to add the item to the store. Any ideas or pointers to where to get some further information on this? Th
  8. Hello, i need help to translate the c code to autoit . I don't understand the callback function. #include <windows.h> #include <stdio.h> // native IR Data by PAnsiChar typedef void CALLBACK CallBackPAnsiChar(char*, char*, char*, char*); typedef int (__stdcall *impInitPAnsiChar)(CallBackPAnsiChar); CALLBACK MyCallBackPAnsiChar(char* Protocol, char* Address, char* Command, char* Flags) { printf("\nIR Data received: Protocol: %s, Address: 0x%s, Command: 0x%s, Flags: 0x%s", Protocol, Address, Command, Flags); fflush(stdout); } int main(
  9. Hello All, I'm using "ImageSearch2015.au3" and i'm trying to figure out WHY, for the life of me, I can't find an image is hidden. So what I came up with, is as follows: _ImageSearchAreaHidden("C:\icon.png", 1, 0, 0, 800, 600, $x1, $y1, 80, 0) Func _ImageSearchAreaHidden($findImage, $resultPosition, $x1, $y1, $right, $bottom, ByRef $x, ByRef $y, $tolerance, $transparency = 0) Local $h, $result local $TestScreen = "C:\TestScreen.png" ;previsous screenshot of the image looking for, fully visible If Not FileExists($findImage) Then Return "Image File
  10. bool SMSAPI_sendsms( const LPSMSAPI_NETWORKCONFIGURATION lpNetConfig, const LPSMSAPI_ACCOUNTINFO lpAccInfo, const LPSMSAPI_MESSAGEINFO lpMsgInfo, LPSMSAPI_RESPONSEINFO lpResponseInfo);The previous posts: struct in dllcall and my attempt plus documentation I have put everything I have come up with on the forum. I need help. I do not understand the syntax, nor the process. The idea is to have a simple little GUI with two options, one for config (such as server name account name and password) and the second with a simple input for SMS destination number and the message... Problem is, I
  11. So first things first the example in the help file for _WinApi_Enum_Windows has an error ;_ArrayDisplay($aResult, "_WinAPI_EnumWindows", Default, Default, Default, Default, "#|Handle|Class|Title|Text|Process") Should Be _ArrayDisplay($aResult, "_WinAPI_EnumWindows", Default, Default, Default, "Handle|Class|Title|Text|Process") Next is a bit of helpful info on LPCSTR in a callback function it needs to be passed as a PTR DllCallbackRegister($sFUNCT, $sRETURN, "ptr") Finally on to my question I'd want to call EnumProp
  12. I've been working with the Windows Credentials store to store credentials for lots of RDP connections. I'm also using this code in other scripts to store and retrieve "legacy" credentials for my scripts that have a Save Password checkbox. All goes well, until someone requests a button to display a list of all saved credentials. I found the CredEnumerate call and it looks like it's working but the Target and UserName field that I want is stored inside an array of pointers and I can't figure out how to get data from inside that. I found a post from 2009 that talks about this, but there w
  13. Hello, Im trying to read the output from CMD using Dllcall, here is my code: #include <WinAPI.au3> #include <array.au3> Global Const $STD_OUTPUT_HANDLE = -11 Global Const $_CONSOLE_SCREEN_BUFFER_INFO = _ "struct;int dwSizeX;" & _ "short dwSizeY;" & _ "short dwCursorPositionX;" & _ "short dwCursorPositionY;" & _ "short wAttributes;" & _ "short Left;" & _ "short Top;" & _
  14. So I had this Idea of creating a tooltip which shows me my ping. That itself was made quickly and I thought too add a couple features. I want the tooltip background to be a different color depending on the ping. (good ping is green, medium ping is yellow,...) So how do I color in a tooltip? google brought me to this: where in the comments I found this: $s = "LOW" ToolTip($s, 0, 0, "Battery Information");, $icon) $H_TOOLTIP1 = WinGetHandle($s) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd",
  15. Hello Guys, once aggain I need your help on a DLL Topic I need to pass arguments to my function via a structure, because I am limited to only one argument that can be passed. But I don't think that thats so important. So here's my approach: C++ Code (just the important part): extern "C" { struct ParamStruct { const char* test1; const char* test2; const char* test3; int size; }; int testFunc(struct ParamStruct * params) { return params->size; } } And thats how I try to call the function using Autoit: Local $str
  16. Hello, can someone help me out with some DllCall in AU3. The relevant source of function and struct definition are as follows (in slightly modified form): typedef struct {     char    *host;     char    *key;     char    *value; } test_sender_value_t; /******************************************************************************  * Parameters: address   - [IN] server address                             &
  17. Hello, I have compiled a reference DLL in VS 2015 Community and this DLL works fine with project for which it is used. There is an interface from which u can access functions in DLL. Developers stated that this DLL is almost universal and can be used with any language with minor changes. I am trying to access its function from Autoit script and got an error 3, after calling DLLCall - "function" not found in the DLL file. Please have a quick look, I feel I miss something in C++ library with exporting functions and I do not know what to add as I am new to C++. Thank you
  18. Again, I'm struggling with DllCall(). So I have this MS C++ 6.0 compiled DLL and a manual for it. There's a function: Get information of disk arrays Declaration: VINT vr_get_array_info (VINT array_index, vr_array_info_t* pinfo); Description: Application can fetch the information of one specific disk array, which is located by index of all disk arrays in current system. Input parameters: VINT array_index : Index to all disk arrays in system, specify which disk array. vr_array_info_t *pinfo : 14 Pointer to a vr_array_info_t data structure to get the information Return value:
  19. Hello! There's a DLL, which I want to use in my script. There's the manual for that DLL. I'm trying to use any function from the manual in DllCall() and I get @error=3 ("function" not found in the DLL file). Why is that? How do I fix it? PEiD says that DLL is "Microsoft Visual C++ 6.0 DLL". Is that compatible with AutoIt? How do I use it? Please help. ProgGuide.pdf drvInterface.dll
  20. Hi guys. I try to choose an algorithm to compress some string data in-memory, without file medium to store in sqlite as blob. I plan to store about 100k blobs each 80k symbols (uncompressed). First opinion was LZMA udf by Ward, but udf file doesn't exist. Then i tried to use BZIP2 dll in DllCall, but it simply doesn't work and throws @error = 1. Here is an example: What should I do with this error? Where am I wrong? Thanks.
  21. I'm attempting to call the winapi function EnumSystemFirmwareTables using DllCall "Kernel32.dll" without success. I am a total noob when it comes to this and could use some direction. Based on the documentation "Dealing with Dlls in AutoIt" by Andreas Karlsson, I have tried using the following code to obtain the buffersize of the Firmware Table Buffer. Thanks in advance for any help #include <WinAPI.au3> MsgBox(0, "ESFT BufferSize", "BufferSize = " & _EnumSystemFirmwareTables()) Func _EnumSystemFirmwareTables() $aRet = DllCall ("Kernel32.dll
  22. Hi friends, I'm working on a licensing project and we are using LexActicvator of Cryptlex. I'm trying to call a function of a DLL using DLLCall method. I'm calling the method 'SetProductFile' of DLL 'LexActivator_64.dll'. The parameter to the method is path to the product file and the method should return 1 on successful execution. But the method always returns 7 in my test run. #define LA_E_PFILE ((HRESULT)0x00000007L) /* CODE: LA_E_FPATH MESSAGE: Invalid product file path. */ The DLL and the product file I use are attached, please
  23. Hello fellas! The other night night i was converting a Msdn function to autoit and I stumbled across this topic Which inspired me like crazy and I decided to take it a step further and require the user to make almost ZERO effort to export a c++ Msdn function and or a Structure to AutoIt Shoutout to toasterking So after 18-20 effective hours: The GUI is really simple, all you need is a link to a MSDN page and the program does the rest, most of the options is just for user preferences. On the inside I have spent a decent amount of work to make sure th
  24. I can not program. What I am trying to do is make a little AutoIt Desktop SMS sender that uses BulkSMS upstream. BulkSMS provides services in the UK, USA, Europe and South Africa. BulkSMS provides several options (a) create string and plug it into browser and send via HTTP, ugly but it works; (b) a DLL called smstxt32.dll which supports a few functions to do this in a typical Windows Desktop application. They provide examples in C, PHP, Python etc. I do not understand any of those. I attach several files. The BulkSMS home page is located here: www.BulkSMS.com You can create a free accoun
  25. Hi, I'm trying to compare two bitmaps (screenshots of the desktop) that I create using BitBlt. The bitmaps can be successfully saved to disk, but when I run the two bitmaps through a CompareBitmaps()-function I found in this thread, which calls memcmp, the script crashes with "Exit code: -1073741819". This crash only happens when I try to compare bitmaps that I got by using BitBlt. If I use the CompareBitmaps()-function on bitmaps created by _GDIPlus_ImageLoadFromFile, everything works fine. (I'm using AutoIT I'll attach my script that crashes, and the CompareBitmaps
  • Create New...