Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 14:35

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

Advertisement



[asm]d3d9->CreateDevice

Discussion on [asm]d3d9->CreateDevice within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
Tyrar's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 1,637
Received Thanks: 1,119
[asm]d3d9->CreateDevice

hab da ein problem mit dieser funktion (IDirect3D9->CreateDevice)..
die funktion returned mit einem wert > 0, wenn ich aber g_pD3D9Device anschaue steht 0 drin :|

Code:
push g_pD3D9Device
push ecx
push 20h
push eax
push 1
push 0
thiscall g_pD3D9, CreateDevice
test eax, eax
je _tc_initdx_failed
mov eax, [g_pD3D9Device] ; <- hier
test eax, eax ; <- hier
je _tc_initdx_failed ; <- hier
d3dpp fülle ich so:
Code:
mov ecx, d3dpp
xor eax, eax
mov [ecx+D3DPRESENT_PARAMETERS.MultiSampleType], eax
mov [ecx+D3DPRESENT_PARAMETERS.MultiSampleQuality], eax
mov [ecx+D3DPRESENT_PARAMETERS.Flags], eax
mov [ecx+D3DPRESENT_PARAMETERS.FullScreen_RefreshRateInHz], eax
mov [ecx+D3DPRESENT_PARAMETERS.PresentationInterval], eax
mov [ecx+D3DPRESENT_PARAMETERS.EnableAutoDepthStencil], eax
mov [ecx+D3DPRESENT_PARAMETERS.BackBufferFormat], eax
mov ax, 1
mov [ecx+D3DPRESENT_PARAMETERS.BackBufferCount], eax
mov [ecx+D3DPRESENT_PARAMETERS.SwapEffect], eax
mov [ecx+D3DPRESENT_PARAMETERS.Windowed], eax
mov eax, 800
mov [ecx+D3DPRESENT_PARAMETERS.BackBufferWidth], eax
mov eax, 600
mov [ecx+D3DPRESENT_PARAMETERS.BackBufferHeight], eax
mov eax, hWnd
mov [ecx+D3DPRESENT_PARAMETERS.hDeviceWindow], eax
mein thiscall macro stellt auch kein problem dar:
Code:
%macro thiscall 2
	mov eax, [%1]
	push eax
	mov ecx, [eax]
	mov eax, [ecx+%2]
	call eax
%endmacro
nur hab ich leider kp wo der fehler liegt :|
Tyrar is offline  
Old 11/20/2011, 18:32   #2
 
Tyrar's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 1,637
Received Thanks: 1,119
Quote:
Originally Posted by link View Post
D3D_OK ist wie STATUS_SUCCESS gleich 0, heißt CreateDevice liefert bei dir einen Fehler zurück.

Es wäre vllt. auch übersichtlicher, Konstanten statt Literalen zu benutzen (D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DCREATE_SOFTWARE_VERTEXPROCESSING, ...)

Außerdem kannst du BackBufferWidth und Height auf 0 lassen, sodass automatisch die Größe der Client Area des Fensters genommen wird.

Btw. wieso setzt du bei D3DPRESENT_PARAMETERS mit eax alles auf 0?
Du könntest doch auch RtlZeroMemory benutzen und dann die Werte, die ungleich 0 sind, setzen bzw. wenn die Variable in einer Sektion und nicht auf dem Stack ist, wird's doch sowieso mit 0 initialisiert.
ok das war schonmal ne gute hilfe... jetz muss ich nurnoch rausfinden warum es failed :| (D3DERR_INVALIDCALL)

push g_pD3DDevice9
push d3dpp
push 20h ; <- D3DCREATE_SOFTWARE_VERTEXPROCESSING
push 0 ; <- habs schon geändert (window handle)
push 1 ; <- D3DDEVTYPE_HAL
push 0 ; <- D3DADAPTER_DEFAULT
Tyrar is offline  
Reply


Similar Threads Similar Threads
HOw To Fix d3d9.dll. :)
11/02/2011 - S4 League Hacks, Bots, Cheats & Exploits - 6 Replies
How To Fix the d3d9.dll error? :confused:
d3d9.dll i help
10/22/2011 - S4 League Hacks, Bots, Cheats & Exploits - 5 Replies
All you need to HyperCam 3 site of download : HyperCam - download powerful screen capture software / HyperCam 1 opening which is a hack 2 open HyperCam 3 3 run the launcher 4 close HyperCam 3 5 enjoy
d3d9.dll
10/05/2011 - S4 League - 1 Replies
any one have any idea i got erorr d3d9.dll
d3d9 Help?
01/20/2010 - General Coding - 1 Replies
I need help on Operation 7 EU my chames are bugged Wehn i take it one, the Gun/Scope is full with the Chames so u cant sniping -.- anyone can help me? PLZ :D My code (not full only define and my chames code): #define Player ((uiStride == 28))



All times are GMT +1. The time now is 14:37.


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