Jump to content
Sign in to follow this  

Autoit and Winlicense SDK

Recommended Posts



I've protected my application with winlicense (a very easy crypting tool) and there is the possibility to get some important information from the crypted file through a sdk called "winlicenseSDK". There is a dll file called "winlicenseSDK.dll" in which all functions for this purpose are stored. I can access this dll file, from my crypted application and also access the functions, but the functions do not get the right data. If they use the "winlicenseSDK.dll" inside C# projects the dll-file itself is no more needed with the crypted application; with C# the use this pattern to call the functions from the winlicenseSDK directly from the crypted application:

Kernel32.GetEnvironmentVariableW("WLRegGetLicenseInfoW", UserInformation, 1024);

Or in C+ they use this pattern:

BOOL __stdcall WLRegGetLicenseInfo(char* pName, char* pCompanyName, char* pCustomData); //header file

WLRegGetLicenseInfoW(Name, Company, ExtraData); //function Call

I can't get it work within autoit to launch a function with dllcall from the crypted autoit application without the winlicenseSDK.dll file; but in that way the functions returns the wrong values, it seems that the "winlicenseSDK.dll" can't access to the crypted application. So I need to run the "winlicenseSDK.dll" directly from the autoit application by pointing to the sdk inside the crypted applications.

I only know the dllcall method.

Any one dealed around with winlicense SDK on autoit application or can help me?

Share this post

Link to post
Share on other sites

Any one?

Share this post

Link to post
Share on other sites

Hey anyone,

the guys from Oreans solved it within version

with following pattern all the sdk values can be used:

$struct1 = DllStructCreate("CHAR[1024]")

$ret = DllCall("kernel32.dll","int", "GetEnvironmentVariable","str", "WLGetVersion", "ptr",DllStructGetPtr($struct1), "int", 1024)

Share this post

Link to post
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
Sign in to follow this  

  • Similar Content

    • nuhan
      By nuhan
      I have written some code for a GUI. When user clicks install button in My GUI then it will run a winlicense protected exe application.
      At this moment I want to know that,
      How to use Custom WinlicenseSDK.dll functions in my AutoIT GUI?
      Link this Custom WinlicenseSDK.dll with my winlicense protected exe application?
      Retrieve the hardware id of HDD, CPU, BIOS and made a combined machine ID through CustomWinlicenseSDK.dll?
      Based on provided machine ID how to install the license key to the computer through the protected application.
      This is my humble request to all Autoit expert that “Please give me an Example Script”. I am a new coder and I like this forum because this place is very very helpful. I have completed my GUI without any person’s direct help, which has been happened because I have got enough friendly post in this forum. Now I am in last stage also it seems too much complex to me. and in my country very few people have knowledge about AutoIT. So please help me regarding this matter. I asked my questions to Winlicense support  team. The answer is written below. But I cannot realize it completely. So please give me an example script. 
      Here are my protected EXE and Winlicense SDK.
      "" Hi Nurul,
      As AutoIt is running as interpreted code, we don't have a direct way to call the SDK via function names for AutoIt applications. You can use a different approach to call the SDK using the "GetEnvironmentVariable" bridge as we present to .NET applications. 
      In order to enable the SDK via the "GetEnvironmentVariable", you have to enable the option "EnvironmentSDK" in the SecureEngine Config panel (please, read at the end of this email to see how to enable that panel).
      Please, refer to the Help File and the Trial-Registration (.NET) example (in the WinlicenseSDK/Examples subfolder) so you can see how the SDK is called via the GetEnvironmentVariable.
      If you have any problems or questions, let us know please.
      If you don't see the "SecureEngine Config" panel, please, edit your WinLicense.ini file (in the same folder as Winlicense.exe) and add the entry "ShowSecureEngineOptions = yes" under the "[General]" tab. After that, restart Winlicense.exe again (the "SecureEngine Config" link should appear on the left panel)
      Please, check the following screenshot with the entry “ShowSecureEngineOptions” added in the Winlicense.ini file."""