Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Undefined DirectInput8Create?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Henley
Grandmaster Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 671

PostPosted: Sun Sep 20, 2009 4:41 pm    Post subject: Undefined DirectInput8Create? Reply with quote

I've already included dinput.h
and also defined DIRECTINPUT_VERSION as 0x800

Code:
hr = DirectInput8Create(g_hinst, DIRECTINPUT_VERSION,
   IID_IDirectInput8, (void**)&g_lpDI, NULL);



Errors:
Code:
[BCC32 Error] Unit2.cpp(40): E2268 Call to undefined function 'DirectInput8Create'
[BCC32 Error] Unit2.cpp(41): E2451 Undefined symbol 'IID_IDirectInput8'


Any idea/solutions?
Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Sun Sep 20, 2009 8:29 pm    Post subject: Reply with quote

You should probably include dinput.h
Back to top
View user's profile Send private message
Deltron Z
Expert Cheater
Reputation: 1

Joined: 14 Jun 2009
Posts: 164

PostPosted: Mon Sep 21, 2009 3:06 am    Post subject: Reply with quote

Did you define DirectX version before including dinput.h?
Quote:
To create a DirectX 8.x interface with the latest DirectX SDK without using CoCreateInstance:

1. Set "#define DIRECTINPUT_VERSION 0x0800" before the include statement for Dinput8.h.
2. Call DirectInput8Create instead of DirectInputCreateEx.
3. Link to the Dinput8.lib library instead of Dinput.lib.

http://msdn.microsoft.com/en-us/library/bb219686%28VS.85%29.aspx
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Mon Sep 21, 2009 11:59 am    Post subject: Reply with quote

If you are making a game or something, you'll probably find raw input a much better alternative.
Back to top
View user's profile Send private message
Henley
Grandmaster Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 671

PostPosted: Mon Sep 21, 2009 9:55 pm    Post subject: Reply with quote

I've already defined DIRECTINPUT_VERSION as 0x800
and also included Dinput.h

I had erors linking Dinput8.lib though

Edit: I googled the files online and found Dinput8.h and Dinput8.lib.
Will test it out later and post results here.
Back to top
View user's profile Send private message
Mozilla Firefox
Grandmaster Cheater Supreme
Reputation: 0

Joined: 06 Feb 2007
Posts: 1250

PostPosted: Thu Sep 24, 2009 7:08 pm    Post subject: Reply with quote

If you had errors linking, you should check your include and library files paths. And are you still encountering issues regarding this?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites