[Guide] Creating a Simple Loader with Injected DLL for Silkroad

08/13/2010 05:26 pushedx#16
Quote:
Originally Posted by baracoudaking View Post
i get an error saying incorrect version of isilk.dll
If you are compiling your own code, you need to make sure to run in Release mode and choose "Multi-threaded (/MT)" under "Configuration Properties -> C/C++ -> Code Generation -> Runtime Library". This cases the static runtime libraries to be used so you do not have to worry about DLLs for redistribution. For debug mode, choose "Multi-threaded Debug (/MTd)" but when you use detours, you need to run in Release mode.
10/21/2010 10:04 kevin5x#17
you need to explain better on how to run it bro, i get confused alot like whoaa.. idk how to get to silkroadframework folder, i finished everything, then next thing u know the debug folder isnt in my main folder?? help plz
01/28/2011 19:32 Randomness_#18
I'm getting these build errors


loaderis.obj : error LNK2019: unresolved external symbol "int __cdecl edx::InjectDLL(void *,char const *,char const *,unsigned long,bool)" (?InjectDLL@edx@@YAHPAXPBD1K_N@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "unsigned __int64 __cdecl edx::GetEntryPoint(char const *)" (?GetEntryPoint@edx@@YA_KPBD@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "bool __cdecl edx::CreateSuspendedProcess(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct _STARTUPINFOA &,struct _PROCESS_INFORMATION &)" (?CreateSuspendedProcess@edx@@YA_NABV?$basic_strin g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0A AU_STARTUPINFOA@@AAU_PROCESS_INFORMATION@@@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol _closesocket@4 referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol _connect@12 referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol _htons@4 referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "struct hostent * __cdecl edx::GetHost(char const *)" (?GetHost@edx@@YAPAUhostent@@PBD@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol _socket@12 referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "bool __cdecl edx::CanGetHostFromAddress(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?CanGetHostFromAddress@edx@@YA_NABV?$basic_string @DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: char const * __thiscall edx::FileChooser::GetSelectedFileName(void)" (?GetSelectedFileName@FileChooser@edx@@QAEPBDXZ) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: char const * __thiscall edx::FileChooser::GetSelectedFileTitle(void)" (?GetSelectedFileTitle@FileChooser@edx@@QAEPBDXZ) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: void __thiscall edx::FileChooser::SetDefaultFileName(char const *)" (?SetDefaultFileName@FileChooser@edx@@QAEXPBD@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: void __thiscall edx::ConfigFile::Write(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?Write@ConfigFile@edx@@QAEXABV?$basic_string@DU?$ char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: char const * __thiscall edx::FileChooser::GetSelectedFilePath(void)" (?GetSelectedFilePath@FileChooser@edx@@QAEPBDXZ) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: __thiscall edx::ConfigFile::~ConfigFile(void)" (??1ConfigFile@edx@@QAE@XZ) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: __thiscall edx::FileChooser::~FileChooser(void)" (??1FileChooser@edx@@QAE@XZ) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: bool __thiscall edx::FileChooser::ShowChooseFile(bool)" (?ShowChooseFile@FileChooser@edx@@QAE_N_N@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: void __thiscall edx::FileChooser::SetDialogTitle(char const *)" (?SetDialogTitle@FileChooser@edx@@QAEXPBD@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: void __thiscall edx::FileChooser::SetInitialDirectory(char const *)" (?SetInitialDirectory@FileChooser@edx@@QAEXPBD@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl edx::GetAbsoluteDirectoryPath(void)" (?GetAbsoluteDirectoryPath@edx@@YA?AV?$basic_strin g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ ) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: void __thiscall edx::FileChooser::AddFilter(char const *,char const *)" (?AddFilter@FileChooser@edx@@QAEXPBD0@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: __thiscall edx::FileChooser::FileChooser(void)" (??0FileChooser@edx@@QAE@XZ) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall edx::ConfigFile::Read(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?Read@ConfigFile@edx@@QAE?AV?$basic_string@DU?$ch ar_traits@D@std@@V?$allocator@D@2@@std@@ABV34@@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: void __thiscall edx::ConfigFile::Open(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,bool &)" (?Open@ConfigFile@edx@@QAEXV?$basic_string@DU?$cha r_traits@D@std@@V?$allocator@D@2@@std@@_NAA_N@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl edx::GetWriteableDirectory(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?GetWriteableDirectory@edx@@YA?AV?$basic_string@D U?$char_traits@D@std@@V?$allocator@D@2@@std@@V23@@ Z) referenced in function _WinMain@16
where is the problem?
01/28/2011 20:49 lesderid#19
Quote:
Originally Posted by Randomness_ View Post
I'm getting these build errors


loaderis.obj : error LNK2019: unresolved external symbol "int __cdecl edx::InjectDLL(void *,char const *,char const *,unsigned long,bool)" (?InjectDLL@edx@@YAHPAXPBD1K_N@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "unsigned __int64 __cdecl edx::GetEntryPoint(char const *)" (?GetEntryPoint@edx@@YA_KPBD@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "bool __cdecl edx::CreateSuspendedProcess(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct _STARTUPINFOA &,struct _PROCESS_INFORMATION &)" (?CreateSuspendedProcess@edx@@YA_NABV?$basic_strin g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0A AU_STARTUPINFOA@@AAU_PROCESS_INFORMATION@@@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol _closesocket@4 referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol _connect@12 referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol _htons@4 referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "struct hostent * __cdecl edx::GetHost(char const *)" (?GetHost@edx@@YAPAUhostent@@PBD@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol _socket@12 referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "bool __cdecl edx::CanGetHostFromAddress(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?CanGetHostFromAddress@edx@@YA_NABV?$basic_string @DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: char const * __thiscall edx::FileChooser::GetSelectedFileName(void)" (?GetSelectedFileName@FileChooser@edx@@QAEPBDXZ) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: char const * __thiscall edx::FileChooser::GetSelectedFileTitle(void)" (?GetSelectedFileTitle@FileChooser@edx@@QAEPBDXZ) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: void __thiscall edx::FileChooser::SetDefaultFileName(char const *)" (?SetDefaultFileName@FileChooser@edx@@QAEXPBD@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: void __thiscall edx::ConfigFile::Write(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?Write@ConfigFile@edx@@QAEXABV?$basic_string@DU?$ char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: char const * __thiscall edx::FileChooser::GetSelectedFilePath(void)" (?GetSelectedFilePath@FileChooser@edx@@QAEPBDXZ) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: __thiscall edx::ConfigFile::~ConfigFile(void)" (??1ConfigFile@edx@@QAE@XZ) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: __thiscall edx::FileChooser::~FileChooser(void)" (??1FileChooser@edx@@QAE@XZ) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: bool __thiscall edx::FileChooser::ShowChooseFile(bool)" (?ShowChooseFile@FileChooser@edx@@QAE_N_N@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: void __thiscall edx::FileChooser::SetDialogTitle(char const *)" (?SetDialogTitle@FileChooser@edx@@QAEXPBD@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: void __thiscall edx::FileChooser::SetInitialDirectory(char const *)" (?SetInitialDirectory@FileChooser@edx@@QAEXPBD@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl edx::GetAbsoluteDirectoryPath(void)" (?GetAbsoluteDirectoryPath@edx@@YA?AV?$basic_strin g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ ) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: void __thiscall edx::FileChooser::AddFilter(char const *,char const *)" (?AddFilter@FileChooser@edx@@QAEXPBD0@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: __thiscall edx::FileChooser::FileChooser(void)" (??0FileChooser@edx@@QAE@XZ) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall edx::ConfigFile::Read(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?Read@ConfigFile@edx@@QAE?AV?$basic_string@DU?$ch ar_traits@D@std@@V?$allocator@D@2@@std@@ABV34@@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "public: void __thiscall edx::ConfigFile::Open(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,bool &)" (?Open@ConfigFile@edx@@QAEXV?$basic_string@DU?$cha r_traits@D@std@@V?$allocator@D@2@@std@@_NAA_N@Z) referenced in function _WinMain@16
loaderis.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl edx::GetWriteableDirectory(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?GetWriteableDirectory@edx@@YA?AV?$basic_string@D U?$char_traits@D@std@@V?$allocator@D@2@@std@@V23@@ Z) referenced in function _WinMain@16
where is the problem?
I think you aren't compiling the Common.cpp file, but I could be wrong.
05/13/2011 17:45 * White *#20
when i need to injecy dll there is no dll in debug folder..
05/13/2011 18:39 vorosmihaly#21
you need to compile that yourself... -.-"
05/23/2011 16:34 NUKER_PUMA#22
very nice ! :)
06/06/2011 19:04 marius1000#23
im trying it on elite sro and it gives c8 error...i replaced the login server from gwgt to login.sro.vn still same thing...if you could help!
06/07/2011 07:40 pushedx#24
Quote:
Originally Posted by marius1000 View Post
im trying it on elite sro and it gives c8 error...i replaced the login server from gwgt to login.sro.vn still same thing...if you could help!
C8 means you didn't use a command line for starting the client (no locale sent).
07/20/2011 18:33 Little Hole#25
1st i'd like to thank You for ur effort "Drew Benton"
and i have 2 questions
1-i have been disconnected from silkroad world server after i run the loader.exe and login to the game
what is the reason?
2- i'm not good in C++ and i saw the code is hard for me to understand
i know java and C# :D is there a way to convert the code to C#

thank you ;)
& plz reply me
07/20/2011 19:14 Haxor#26
thank you
#Request make c# tutorials
07/20/2011 21:55 pushedx#27
Quote:
Originally Posted by saif1999 View Post
thank you
#Request make c# tutorials
You could do a few things in C#, but you'd still need to use C++ for the low level stuff. There's ways you can implement it all in C#, but it's not really worth it unless you wanted to spend the time and be limited with what you could do.

There is some cool stuff you can do when you mix them though. For example, using this concept: [Only registered and activated users can see links. Click Here To Register...] you can actually take your C++ Loader/DLL and add .Net capabilities to it.

Since C# is .Net and VB.Net uses .Net, this means you can essentially add C# and VB.Net code to any process. The main limitation of passing data between C++ and .Net is that you can only use 1 (unicode) string, but you can also setup other [Only registered and activated users can see links. Click Here To Register...] mechanisms.

However, to really get any awesome stuff going on, you need to know C/C++ as well as ASM language wise and general reverse engineering stuff to be able to setup the codecaves and detours to allow your higher level code to make use of the lower level stuff!
07/20/2011 23:35 Haxor#28
Quote:
Originally Posted by pushedx View Post
You could do a few things in C#, but you'd still need to use C++ for the low level stuff. There's ways you can implement it all in C#, but it's not really worth it unless you wanted to spend the time and be limited with what you could do.

There is some cool stuff you can do when you mix them though. For example, using this concept: [Only registered and activated users can see links. Click Here To Register...] you can actually take your C++ Loader/DLL and add .Net capabilities to it.

Since C# is .Net and VB.Net uses .Net, this means you can essentially add C# and VB.Net code to any process. The main limitation of passing data between C++ and .Net is that you can only use 1 (unicode) string, but you can also setup other [Only registered and activated users can see links. Click Here To Register...] mechanisms.

However, to really get any awesome stuff going on, you need to know C/C++ as well as ASM language wise and general reverse engineering stuff to be able to setup the codecaves and detours to allow your higher level code to make use of the lower level stuff!
I learned c# 1 year on school and now im trying to get better on it espically in sro related things and creating tools etc..
I dont like learn like more language that use another syntax , I see that everything built in c++ , But i like to take deep in c#
So i just saying if you can just make some c# tutorials
I just take a look of silkroadapi and the examples and it was great
it helped me alot :)
07/21/2011 21:40 Kazuyaš#29
Quote:
Originally Posted by saif1999 View Post
I learned c# 1 year on school and now im trying to get better on it espically in sro related things and creating tools etc..
I dont like learn like more language that use another syntax , I see that everything built in c++ , But i like to take deep in c#
So i just saying if you can just make some c# tutorials
I just take a look of silkroadapi and the examples and it was great
it helped me alot :)
if you do not learn basic ASM and binary stuff, your sro development status
isnt going to get very far.
07/22/2011 00:23 Little Hole#30
Thanks for advise
I want some References to the Assembly that help me in the silkroad development :D