[CPP][HELP] DirectX SDK usage

whoonga

Active member
Joined
Nov 6, 2014
Messages
52
Reaction score
0
Hello,

does somebody have a simple project for the usage of the directX SDK, for a samp overlay?
Just a little "How To Create A Text"in cpp.
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
273
The SDK comes with a tons of examples, look in the installation folder. <directx sdk path>\Samples\C++\Direct3D\Text3D.
 

whoonga

Active member
Joined
Nov 6, 2014
Messages
52
Reaction score
0
springfield said:
The SDK comes with a tons of examples, look in the installation folder.  <directx sdk path>\Samples\C++\Direct3D\Text3D.

Yeah, you're right, but when i try to compile the sampe, i get this error:
https://msdn.microsoft.com/de-de/library/da60x087.aspx

For overloaded function abs:
Code:
float fCurRanking = abs( float( displayMode.RefreshRate.Numerator ) / fDenom1  -
                                             float( refreshRateMatch.Numerator ) / fDenom2 );
 

Bugman

Active member
Joined
Aug 14, 2014
Messages
68
Reaction score
0
you should not start with these things,
first read a book about DirectX or try C++ basics
i saw your topics, why the fuck u start with read/write memory? copy pasta

u cant understand the code

hf
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
53
Location
LongForgotten <-> 0x32789
or maybe try the tutorials of directx which comes with sdk
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Samples\C++\Direct3D\Tutorials (default directory)
 

whoonga

Active member
Joined
Nov 6, 2014
Messages
52
Reaction score
0
0x32789 said:
or maybe try the tutorials of directx which comes with sdk
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Samples\C++\Direct3D\Tutorials (default directory)

That's exactly what i've tried, but i got only a single error which I got before with c++. I also don't found a working solution for that on google or here.
I thought i would start at the beginning, if I test out the samples, but Bugman basically said: "Fuck off retard get out here."
Feels like almost half a year ago, that I started with c++, so I cinda struggled there a bit and don't knew what to do, so I started with a basic Read/Write application.

Now I only need to fix that error like I mentioned earlier in this thread.
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
273
whoonga said:
Now I only need to fix that error like I mentioned earlier in this thread.

But you linked the MSDN error page youself. Have you read it?

whoonga said:
Yeah, you're right, but when i try to compile the sampe, i get this error:
https://msdn.microsoft.com/de-de/library/da60x087.aspx

It's really simple, it means there's no overload function for abs that takes/returns a float, so just cast to whatever abs takes, usually double. Or use alternatives like fabs.
 

whoonga

Active member
Joined
Nov 6, 2014
Messages
52
Reaction score
0
springfield said:
whoonga said:
Now I only need to fix that error like I mentioned earlier in this thread.

But you linked the MSDN error page youself. Have you read it?

whoonga said:
Yeah, you're right, but when i try to compile the sampe, i get this error:
https://msdn.microsoft.com/de-de/library/da60x087.aspx

It's really simple, it means there's no overload function for abs that takes/returns a float, so just cast to whatever abs takes, usually double. Or use alternatives like fabs.

Okay thanks that problem is solved. But as soon as i want to compile the project, it says that there's still an unresolved external.
Seems like the dxerr.lib is not linked correctly.
Error:
Code:
Fehler LNK2019 Verweis auf nicht aufgelöstes externes Symbol "_vsnwprintf" in Funktion ""long __cdecl StringVPrintfWorkerW(unsigned short *,unsigned __int64,unsigned __int64 *,unsigned short const *,char *)" (?StringVPrintfWorkerW@@YAJPEAG_KPEA_KPEBGPEAD@Z)".

I've googled that problem and on some sites they say, that i need to pragma comment the D3dx9.lib and/or the D3d9.lib, neither works.
Also removing or adding the dxerr.lib/D3dx9.lib/D3d9.lib from the additional dependencies makes no difference.

anyone got a clue what i could do next?
 

whoonga

Active member
Joined
Nov 6, 2014
Messages
52
Reaction score
0
Bugman said:
anyone got a clue what i could do next?

first lern c++

Can you maybe GTFO, if you dont want to help me?

EDIT:
You're criticizing my c++ skill and you are asking "[font='Source Sans Pro', Tahoma, 'Helvetica Neue', Arial, sans-serif]Which memory addresses are needed to create an silent aimbot? I dont know how it works".[/font]
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
Bugman said:
you should not start with these things,
first read a book about DirectX or try C++ basics
i saw your topics, why the fuck u start with read/write memory? copy pasta

u cant understand the code

hf

learning DirectX/C++ from books just because you want to play around with samp mods as a hobby is like buying 2 years supply of condoms just because some lady smiled at you. It may turn out as a good investment but the chances are small.
 

0x_

Wtf I'm not new....
Staff member
Administrator
Joined
Feb 18, 2013
Messages
1,123
Reaction score
176
monday said:
learning DirectX/C++ from books just because you want to play around with samp mods as a hobby is like buying 2 years supply of condoms just because some lady smiled at you. It may turn out as a good investment but the chances are small.

Actually, the syntax part on most books is pretty useful and gives you a perfect understanding especially cuz' they often include examples you can write interactively you don't need to read a whole book.
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
273
whoonga said:
Code:
Fehler LNK2019 Verweis auf nicht aufgelöstes externes Symbol "_vsnwprintf" in Funktion ""long __cdecl StringVPrintfWorkerW(unsigned short *,unsigned __int64,unsigned __int64 *,unsigned short const *,char *)" (?StringVPrintfWorkerW@@YAJPEAG_KPEA_KPEBGPEAD@Z)".

I've googled that problem and on some sites they say, that i need to pragma comment the D3dx9.lib and/or the D3d9.lib, neither works.
Also removing or adding the dxerr.lib/D3dx9.lib/D3d9.lib from the additional dependencies makes no difference.

anyone got a clue what i could do next?

I assume you use vs 2015? See here https://msdn.microsoft.com/en-us/library/bb531344.aspx (parts about printf/scanf), just link against legacy_stdio_definitions.lib.
 
Top