Jump to content
Sign in to follow this  

Help to Convert

Recommended Posts


This is C++ function, which I need to convert to AutoIt...

void TakeRes()
  HRSRC hRes;
  HANDLE hFile;
  char *cRes;
  DWORD BWritten,SzRsc;
  hRes = FindResource(NULL, MAKEINTRESOURCE(101), TEXT("S")); 
  if(hRes == NULL)
  hRLoad = LoadResource(NULL,hRes);
  cRes = (char*)LockResource(hRLoad);
  SzRsc = SizeofResource(NULL,hRes); 


I tried convert it, using this topic:


But it didint help me so much, there is another information which maybe will need:


Because most errors I get with: hRes = FindResource(NULL, MAKEINTRESOURCE(101), TEXT("S"));

Thanks, 0000.

Share this post

Link to post
Share on other sites

Ok, I will check it.

Im training to make .exe dropper, which would be Unique from checkbox'es, like user selects his favorite answers, and my .exe generates .exe with his answers, and he can show that .exe to his friends or smthere :)

But I cant get Main.exe inside generator, because I still cant fix Resource Reader ;(

Edited by Guest

Share this post

Link to post
Share on other sites

Func SetFilePointer($hFile,$nOffset, $nMethod = 0)

$Callresult = DllCall("kernel32.dll", "int", "SetFilePointer", "ptr", $hFile, "long", $nOffset,"ptr", 0, "dword", $nMethod) ; FILE_BEGIN

Return $Callresult[0]


Func WriteFile($hFile,$lpBuffer,$nNumberOfBytesToWrite)

Local $pRead = DllStructCreate("dword")

$Callresult = DllCall("kernel32.dll", "int", "WriteFile", "int", $hFile,"long",$lpBuffer,"int", $nNumberOfBytesToWrite,"ptr",DllStructGetPtr($pRead),"int", 0)

Return $Callresult[0]


Could somebody say, if I made correct functions, with DllCall, because basiclly, its not working for me, and I don't know what here can be bad :).

Also try to fix it :o

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.