Jump to content

Search the Community

Showing results for tags 'dllcal'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Categories

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 3 results

  1. Hi, I am having a problem invoking the "IdnToAscii" (documentation) function to convert an IDN hostname into its "Punycode" form. Description: I'm encountering a problem with the "IdnToAscii" function, when trying to convert an Internationalized Domain Name (IDN) to its ASCII equivalent using the "normaliz.dll" library. While the function call itself doesn't result in an error (returns 0), the output buffer doesn't contain the expected ASCII representation of the IDN. Details: I've confirmed that the "normaliz.dll" library is loaded correctly. The parameters passed to the "IdnToAscii" function, including the Unicode string and buffer sizes, appear to be correct. I'm using the following flags: 0x01 for IDN_ALLOW_UNASSIGNED. Issue: Despite these preparations, the function doesn't return the expected ASCII representation of the IDN in the output buffer. I've checked the function's return value, and it doesn't indicate an error. I'm try to understand why the "IdnToAscii" function isn't providing the correct result. Any insights, suggestions, or guidance would be greatly appreciated. Thank you in advance for your help! Code: #include <WinAPI.au3> #include <Array.au3> Local $dll = DllOpen(@SystemDir & "\normaliz.dll") Local $unicodeDomain = "bücher.example.com" Local $unicodeDomainPtr = DllStructCreate("wchar[" & StringLen($unicodeDomain) + 1 & "]") DllStructSetData($unicodeDomainPtr, 1, $unicodeDomain) Local $bufferSize = 255 ;Note that IDN names have a maximum length. Local $output = DllStructCreate("wchar[" & $bufferSize & "]") Local $returnValue = DllCall($dll, "wstr", "IdnToAscii", _ "dword", 0x01, _ "wstr", DllStructGetPtr($unicodeDomainPtr), _ "int", StringLen($unicodeDomain), _ "ptr", DllStructGetPtr($output), _ "int", $bufferSize) If @error Or Not IsArray($returnValue) Then MsgBox(16, "Error converting to Punycode", @error) Else _ArrayDisplay($returnValue) MsgBox(64, "Punycode value", DllStructGetData($output, 1, 0)) _WinAPI_GetLastErrorMessage() ConsoleWrite( @error & @CRLF) EndIf DllClose($dll)
  2. DLLCalls using VBScripts Out if the box it is not possible to do DllCalls from VBScripts. But thanks to the +20 year COM Library called DynaWrap this is still possible Anyhow the process of calling Win API functions need some basic knowledge and understanding on how to do this. More specifically the input Data Types parameters used and Calling Formats are key here, as well as the Return Data Types DynaWrap COM Library Keep in mind that this COM Library is a 32Bit only library. Which means that you need to register is using the SysWOW64 regsvr32 But to overcome this annoyance I created RegFree method so you can start using it as a portable COM Library DynaWrap Documentation I created a PDF documention on what I still could find on the internet on how to use the COM Library. Examples The second post will hold some VBScript Examples and an AutoIt Example Attached You will find the PDF and the ZIP File needed to run your code in a portable way. Thanks to the @Professor_Bernd to provide the VBScript code to get the VBScript scripting directory and the Shortcut to run the 32Bit SysWOW64 VBScript host Just drop the VBScript on the 32Bit Shortcut to get going. Source Code Anyhow here you can find the source code of the DynaWrap 32Bit Library. If someone has the C++ Tools to convert it to 64Bit Library that would give a new live to it... http://www.borncity.com/web/WSHBazaar1/WSHDynaCall.htm Interesting reading : https://www.drdobbs.com/windows/an-automation-object-for-dynamic-dll-cal/210200078 DynaCall.zip How to use DllCalls in VBScript using DynaWrap COM Object.pdf
  3. Hello to all =) I am currently creating some Functions UDFs and examples using DllCall and other methods that interact with MS C runtime and Windows API. Many of the MSDN documents can be a little ambiguous and more so when converting to an AutoIt3 context, so for correctness or when I can't find conformation from within the forum or other documentation I would like to ask a number of questions with regards to the above topic. Even though some questions may not appear to relate to the same topic, they are all related to the same set of UDFs I am creating. The main purpose of the Function library is exemplify the use of Dll Calls from within AutoIt3 for other users and obviously a good learning and practice exercise for myself. Some Functions may resemble functions already supplied within the UDF library, and is purely a mater of process and coincidence to have arrived at a similar place. Where a UDF function already exists I will provide an example of the same method using the standard UDF , as the standard AutoIt UDFs will be more appropriate for most Users. The second purpose is to extend some of the current UDFs relating to AutoIt/Windows Dialog Metrics and Device Context. Although this is intended mostly for my own purposes It will offer a reasonable context for DllCall examples and hopefully a few additional functions that others may benefit from. Before posting any code or examples I would like to ensure that I am using the correct AutoIt and Win API measurements and methods so I will begin with those questions. (Mods, I would like to keep future code examples at the top of this thread, but if that is not convenient I can begin another thread. Basic layout top to bottom 1. Code examples with explanations 2.Standards, Measurements and Metrics 3.Questions and general discussions) For members who may feel that I am an unknown quantity, I am a very happy, easy going person and always approachable for questions or suggestions =) I do have a lot going on in the background most days between indentured study, Software Dev Startup, assisting local students with fundamental coding and robotics, time with my family etc. So If I don't reply to a question straight away, its just that I am busy elsewhere with other commitments.
×
×
  • Create New...