Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 06:50

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



need some help with including lua into my c++ dll

Discussion on need some help with including lua into my c++ dll within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
R3p's Avatar
 
elite*gold: 778
The Black Market: 259/10/0
Join Date: Apr 2010
Posts: 520
Received Thanks: 927
need some help with including lua into my c++ dll

wasted several hours today trying to fix it but without any success

i wrote a small c++ framework whch i inject into some process
decided to implement some lua scripting with binds to my c++ functions
found LuaIntF which i tried to implement but im stuck somehow

when i include lua.hpp and compile my dll i am not able to inject it anymore (LoadLibrary on remote process failed)
when i remove the lua.hpp include i am able to inject the built dll again

i have no ******* clue where the problem is located

tried with 5.3.4 from nuget
and i also tried with different version directly from source from lua.org

project is x64/debug currently

it somehow doesnt let me inject my dll when the lua lib is linked
R3p is offline  
Old 06/18/2017, 09:02   #2
 
atom0s's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 175
Received Thanks: 123
For the easiest method of binding Lua I'd suggest Luabind. This will require you to use Lua 5.1.x though if you are fine with going down to the more used version of Lua.

There is a boost-removed version on Github here:



You may want to look into the forks of this though for newer updates/fixes from community members that have not pulled in their changes to the main repo.


As for failing to inject, if you are not compiling Lua as a static library then you need to make sure that your Lua dll is in the same folder as the game.
atom0s is offline  
Old 06/18/2017, 09:51   #3
 
R3p's Avatar
 
elite*gold: 778
The Black Market: 259/10/0
Join Date: Apr 2010
Posts: 520
Received Thanks: 927
nvm fixed it.... had to place the lua.dll inside the path where the process is located i am injecting to

._.

Quote:
Originally Posted by atom0s View Post
For the easiest method of binding Lua I'd suggest Luabind. This will require you to use Lua 5.1.x though if you are fine with going down to the more used version of Lua.

There is a boost-removed version on Github here:



You may want to look into the forks of this though for newer updates/fixes from community members that have not pulled in their changes to the main repo.


As for failing to inject, if you are not compiling Lua as a static library then you need to make sure that your Lua dll is in the same folder as the game.
thx havent read ur post until i alrdy figured this out ^^
R3p is offline  
Reply


Similar Threads Similar Threads
hilfe bei lua script/ need help with lua script
10/06/2014 - General Coding - 2 Replies
Hi leute ich versuche ein script in für mein Iphone zu schreiben und könnte ein bisschen hilfe von einem Experten gebrauchen können also wenn jemand was von lua versteht bitte bei mir per pn melden! Hey guys im trying to write a lua script on my iphone and need some help at some points by an expert so if anybody knows lua better than me pls pn me!
[HOW TO] MSVCR110.dll fehlt BEHEBEN | [MSVCR120.dll MSVCP110.dll MSVCP100.dll etc]
03/25/2014 - Tutorials - 2 Replies
Hier ist ein Youtube Video: MSVCR100.dll feht BEHEBEN / MSVCR110.dll fehlt MSVCR120.dll MSVCP110.dll MSVCP100.dll MSVCP120.dll - YouTube Aber den ganzen Kram könnt ihr auch als Text haben: Viele von euch kennen bestimmt das Problem das ne dll auf dem PC fehlt und das Programme dann nicht laufen. Hier ist die Lösung: Schaut erstmal nach, welche Microsoft Redistributables auf eurem PC installiert sind. Geht hierzu auf Start > Sytemsteuerung > Programme > Programme und Funktionen und...
[LUA] need help in decrypting / encrypting lua
08/12/2013 - General Coding - 7 Replies
The title pretty much says it all but ill explain a bit more as to what Im in need, basically I have decompiled a script using this website, i've got the code etc but it contains some really werid stuff like etc , I wanted to decrypt the file simply to change some stuff in it, I did so but then I did not know how to encrypt it back so I messaged my friend and he gave me this local code_to_decode = "script to encrypt" local output = "" for i = 1, #code_to_decode do output = output...
Sehr weit geführte locale_.lua (locale_big5.lua)
08/02/2010 - Metin2 PServer Guides & Strategies - 50 Replies
Abend^^ Habe hier mal selber eine locale_.lua übersetzt! Ich habe mich von anderen localen inspirieren lassen habe sie aber bis auf 6 Zeilen selber geschrieben!! Ich werde sie, wenn ihr mir sagt welche quests die von zeile 300 - 900 sind, noch vervollständigen aber erstes Ziel... Website mit allen Quests zum Ansehen und einzelnen Download! Hoffe konnte euch weiterhelfen! Locale_.lua + skill_group.quest damit auch die Lehrer deutsch sind! Updatestand: 22.01.2010 Version 1: locale_.lua...



All times are GMT +2. The time now is 06:50.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.