|
You last visited: Today at 09:59
Advertisement
Visual Studio 2015 __fastcall
Discussion on Visual Studio 2015 __fastcall within the Nostale forum part of the MMORPGs category.
08/09/2016, 18:49
|
#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?
|
|
|
08/09/2016, 18:52
|
#2
|
elite*gold: 55
Join Date: Jan 2011
Posts: 1,240
Received Thanks: 1,187
|
Gehört dann wohl doch eindeutig eher hier hin:
|
|
|
08/09/2016, 18:54
|
#3
|
elite*gold: 0
Join Date: Oct 2011
Posts: 4,608
Received Thanks: 675
|
Quote:
Originally Posted by PainToTheWorld
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
Gehört dann wohl doch eindeutig eher hier hin:

|
Genau.
|
|
|
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.
|
|
|
08/09/2016, 18:58
|
#5
|
elite*gold: 55
Join Date: Jan 2011
Posts: 1,240
Received Thanks: 1,187
|
Quote:
Originally Posted by PainToTheWorld
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
|
|
|
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
|
|
|
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.)
|
|
|
08/09/2016, 22:42
|
#8
|
elite*gold: 55
Join Date: Jan 2011
Posts: 1,240
Received Thanks: 1,187
|
|
|
|
08/09/2016, 22:50
|
#9
|
elite*gold: 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?
Code:
#define FASTCALL __fastcall
int test;
int __fastcall hallo(int a, int b, int c) {
std::cout << "Hallo" << std::endl;
return 5;
}
int main()
{
hallo(3,2,test);
return 0;
}
|
|
|
08/09/2016, 22:51
|
#10
|
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
|
Quote:
Originally Posted by Pumba98
|
Das unterscheidet sich je nach Compiler.
Sonst würde es bei ihm ja noch gehen.
NosTale nutzt auf jeden Fall eine andere Calling-Convention.
|
|
|
08/09/2016, 22:53
|
#11
|
elite*gold: 0
Join Date: Oct 2011
Posts: 4,608
Received Thanks: 675
|
Quote:
Originally Posted by BladeTiger12
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?
|
|
|
08/09/2016, 22:56
|
#12
|
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
|
Quote:
Originally Posted by Bombasticx3
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.
|
|
|
08/10/2016, 00:08
|
#13
|
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.
|
|
|
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
|
|
|
08/11/2016, 06:00
|
#15
|
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.
|
|
|
 |
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.
|
|