Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Nostale
You last visited: Today at 09:59

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

Advertisement



Visual Studio 2015 __fastcall

Discussion on Visual Studio 2015 __fastcall within the Nostale forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2010
Posts: 133
Received Thanks: 29
Visual Studio 2015 __fastcall

Hii
ich bin vor kurzem von c++ Builder zu visual studio gewechselt und hab dabei n kleines Problem.

__fastcall wird scheinbar einfach nicht benutzt
Code:
void __fastcall hkConnect(void* client, char* ip, int port)
Was bei embarcadero c++ Builder problemlos funktioniert.. macht hier Probleme.
Kennt das jemand und kann eventuell weiterhelfen?
PainToTheWorld is offline  
Old 08/09/2016, 18:52   #2
 
Pumba98's Avatar
 
elite*gold: 55
Join Date: Jan 2011
Posts: 1,240
Received Thanks: 1,187
Gehört dann wohl doch eindeutig eher hier hin:
Pumba98 is offline  
Old 08/09/2016, 18:54   #3
 
Bombasticx3's Avatar
 
elite*gold: 0
The Black Market: 173/1/0
Join Date: Oct 2011
Posts: 4,608
Received Thanks: 675
Quote:
Originally Posted by PainToTheWorld View Post
Hii
ich bin vor kurzem von c++ Builder zu visual studio gewechselt und hab dabei n kleines Problem.

__fastcall wird scheinbar einfach nicht benutzt
Code:
void __fastcall hkConnect(void* client, char* ip, int port)
Was bei embarcadero c++ Builder problemlos funktioniert.. macht hier Probleme.
Kennt das jemand und kann eventuell weiterhelfen?
#edit. Was falsch verstanden

Quote:
Originally Posted by Pumba98 View Post
Gehört dann wohl doch eindeutig eher hier hin:

Genau.
Bombasticx3 is offline  
Old 08/09/2016, 18:56   #4
 
elite*gold: 0
Join Date: Sep 2010
Posts: 133
Received Thanks: 29
Es geht um eine Funktion in Nostale. Hätte ich dazu schreiben sollen.
Die Argumente werden nicht richtig übergeben.
PainToTheWorld is offline  
Old 08/09/2016, 18:58   #5
 
Pumba98's Avatar
 
elite*gold: 55
Join Date: Jan 2011
Posts: 1,240
Received Thanks: 1,187
Quote:
Originally Posted by PainToTheWorld View Post
Es geht um eine Funktion in Nostale. Hätte ich dazu schreiben sollen.
Die Argumente werden nicht richtig übergeben.
Wenn es erst seit dem Wechsel zu VS probleme gibt hat es trotzdem rein garnichts mit NosTale zu tun
Pumba98 is offline  
Old 08/09/2016, 21:58   #6
 
elite*gold: 0
Join Date: Nov 2015
Posts: 31
Received Thanks: 3
Die __fastcall convention unterscheidet sich von Embarcadero und VS
nBot-Developer is offline  
Thanks
3 Users
Old 08/09/2016, 22:36   #7

 
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
So viel ich gesehen habe, hat Visual Studio diese Call-Convention gar nicht.
(Habe es selbst schon etliche male Probiert... Ohne Erfolg)
Letztendlich kann mann dann wohl nur auf __asm zurückgreifen.
(Keine Ahnung ob man so eine eigene erstellen kann. Glaube aber eher nicht so einfach.)
BladeTiger12 is offline  
Thanks
1 User
Old 08/09/2016, 22:42   #8
 
Pumba98's Avatar
 
elite*gold: 55
Join Date: Jan 2011
Posts: 1,240
Received Thanks: 1,187
Pumba98 is offline  
Old 08/09/2016, 22:50   #9
 
Bombasticx3's Avatar
 
elite*gold: 0
The Black Market: 173/1/0
Join Date: Oct 2011
Posts: 4,608
Received Thanks: 675
Lässt sich ohne Probleme aufrufen, auch mit overloads.
Ob er Fastcall auch richtig nutzt, keinen Plan.

Vielleicht liegt das Problem an ner andren Stelle im Code?

Bombasticx3 is offline  
Old 08/09/2016, 22:51   #10

 
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
Quote:
Originally Posted by Pumba98 View Post
Das unterscheidet sich je nach Compiler.
Sonst würde es bei ihm ja noch gehen.
NosTale nutzt auf jeden Fall eine andere Calling-Convention.
BladeTiger12 is offline  
Thanks
2 Users
Old 08/09/2016, 22:53   #11
 
Bombasticx3's Avatar
 
elite*gold: 0
The Black Market: 173/1/0
Join Date: Oct 2011
Posts: 4,608
Received Thanks: 675
Quote:
Originally Posted by BladeTiger12 View Post
Das unterscheidet sich je nach Compiler.
Sonst würde es bei ihm ja noch gehen.
NosTale nutzt auf jeden Fall eine andere Calling-Convention.
Eventuell __stdcall?
Bombasticx3 is offline  
Old 08/09/2016, 22:56   #12

 
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
Quote:
Originally Posted by Bombasticx3 View Post
Eventuell __stdcall?
Nope^^ Keine von C++ passt.
NosTale ist doch so weit ich weiß in Delphi, deswegen wahrscheinlich.
Sprich man kommt so schnell nicht rum um __asm.
BladeTiger12 is offline  
Thanks
2 Users
Old 08/10/2016, 00:08   #13
 
atom0s's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 175
Received Thanks: 125
The game does not use __fastcall for most things, it's a custom calling method used by Delphi. It's similar to __fastcall but does not use the same registers. Fastcall uses ECX and EDX for the first two parameters, where most of Nostale's calls use EAX, EDX, and ECX instead.

You can create custom 'naked' stubs to call the functions instead and just mimic the parameter movements into the proper registers.
atom0s is offline  
Thanks
2 Users
Old 08/10/2016, 23:01   #14
 
elite*gold: 0
Join Date: Sep 2010
Posts: 133
Received Thanks: 29
Code:
typedef void(__fastcall *tNTConnect)(unsigned long client, char* ip, int port);
Lässt sich problemlos aufrufen... will man aber hier was abfangen, sind die Register verkehrt.
__asm is zwar nicht so schön, scheint aber nicht anders zu gehen...
Hatte die Hoffnung, das es an den Einstellungen von Visual Studio liegt.
Trotzdem danke an alle
PainToTheWorld is offline  
Old 08/11/2016, 06:00   #15
 
atom0s's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 175
Received Thanks: 125
If you are looking to alter where the client connects to, you can just hook the 'connect' winsock API.


Just detour it and alter the connection information in the sockaddr structure.


If you are looking for where the game client currently calls connect, it's located in:
0x526AA4


The current stub is:
Code:
int __usercall sub_526AA4@<eax>(int a1@<eax>, int a2@<edx>, u_short a3@<cx>)

Which you will need to manually call with inline ASM as the calling convention is non-standard.
atom0s is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Visual Studio Community 2015 FLTK-Installation
01/23/2016 - C/C++ - 0 Replies
ich bin buch mit anzeigenmodell und grafikklasen usw aber ich muss FLTK-Installation, aber die Installation im buch ist veralte wie kann ich das den in Visual Studio Community 2015 das Installation machen Fast Light Toolkit (abgekürzt FLTK)
Visual studio 2015 to 2013
01/09/2016 - 12Sky2 - 1 Replies
I cant download visual studio c++ redistriable package 2015 to windows 8.1 and I cant use these dlls http://www.elitepvpers.com/forum/12sky2-hacks-bots -cheats-exploits/3963583-release-wsp-hun-classic-e ngine-2-5-cheat.html in dab's topic can anyone code them in visual studio 2013
[Selling] Verkaufe Microsoft Visual Studio 2015 Professional Key
09/03/2015 - Trading - 4 Replies
Ich Verkaufe Produkt Keys für Microsoft Visual Studio 2015 Professional. Bei Interesse einfach Pn oder mich auf Skype adden :) lg hzfg.
Visual C++ Redistributable für Visual Studio 2012 Update 4 Download Hllfe
02/07/2014 - Technical Support - 0 Replies
Ich habe es heruntergeladen und wenn ich es installieren will, kommt diese Meldung: http://i.epvpimg.com/TZjrf.png Was kann ich machen?



All times are GMT +1. The time now is 10:03.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.