NO

Author Topic: direct X problems  (Read 4609 times)

Diddl

  • Guest
direct X problems
« on: August 20, 2007, 09:28:32 AM »
I'm missing some functions and data structures (dinput - keyboard and mouse) concerning direct X.


I'm working on a port of WinRott 2.24 from VC7 to Pelles C. It was no big thing, only this missing direct input structures missing in dinput.lib for this ->SetDataFormat() function (c_dfDIKeyboard, c_dfDIMouse). I have used a data structure from Ming Compiler environment and it's working fine now, but normally this strucures should be defined in dinput.lib.

Some functions concerning direct play are missing (DirectPlayLobbyCreate()). Is this a direct X version problem? Maybe this are newer functions only available in newer direct X versions? What versions of direct X are supported by Pelles C?
« Last Edit: August 20, 2007, 05:59:14 PM by Diddl »

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: direct X problems
« Reply #1 on: August 21, 2007, 11:42:57 PM »
The last time I managed to do anything significant in this area was for DirectX 8, so the definitions may be getting outdated (again). It's not the most important area for me, so I add definitions when I find the time...
/Pelle

Diddl

  • Guest
Re: direct X problems
« Reply #2 on: August 22, 2007, 09:31:05 AM »
I'm working with direct-x v8.

if it is useful for you I could post source fragments which show the problem. this source works fine with vc-6, vc-7 and ming-w. I also could post my solution for pelles (data definition) which should be included in dinput.lib.


Diddl

  • Guest
Re: direct X problems
« Reply #3 on: August 27, 2007, 08:03:32 PM »
How can I use this missing function? Is there a chance for me to make a import lib or such similar to use this missing  function (DirectPlayLobbyCreate(NULL, &lpDirectPlayLobbyA, NULL, NULL, 0); );

Offline Robert

  • Member
  • *
  • Posts: 245
Re: direct X problems
« Reply #4 on: August 27, 2007, 09:05:15 PM »
How can I use this missing function? Is there a chance for me to make a import lib or such similar to use this missing  function (DirectPlayLobbyCreate(NULL, &lpDirectPlayLobbyA, NULL, NULL, 0); );


DirectPlayLobbyCreate is listed in the Pelle's C import library dplayx.lib and in the header file dplobby.h

Robert Wishlaw

Diddl

  • Guest
Re: direct X problems
« Reply #5 on: August 27, 2007, 09:38:37 PM »
yes it's defined in this .h file but linker print a error message for this code:
Code: [Select]
#include "DPwinrott.h"
 

HRESULT ConnectUsingLobby(LPDPLAYINFO lpDPInfo)
{
LPDIRECTPLAY2A lpDirectPlay2A = NULL;
LPDIRECTPLAY3A lpDirectPlay3A = NULL;
LPDIRECTPLAYLOBBYA lpDirectPlayLobbyA = NULL;
LPDPLCONNECTION lpConnectionSettings = NULL;
DPID dpidPlayer;
DWORD dwSize;
HRESULT hr;

// get an ANSI DirectPlay lobby interface
//Diddl
hr = DirectPlayLobbyCreate(NULL, &lpDirectPlayLobbyA, NULL, NULL, 0);
hr = 1;
if FAILED(hr)
goto FAILURE;

Code: [Select]
Erzeugen von WinRott224.exe.
POLINK: error: Unresolved external symbol '_DirectPlayLobbyCreateA'.
POLINK: fatal error: 1 unresolved external(s).
*** Fehlercode: 1 ***
Fertig.

Offline Robert

  • Member
  • *
  • Posts: 245
Re: direct X problems
« Reply #6 on: August 27, 2007, 10:56:55 PM »
dplayx.lib is not listed in your Pelle's C project WinRott224.ppj file.

Robert Wishlaw

Diddl

  • Guest
Re: direct X problems
« Reply #7 on: August 28, 2007, 06:19:11 PM »
dplayx.lib is not listed in your Pelle's C project WinRott224.ppj file.

You are right, thank you very much Robert!


Now WinRott works without problems including multiplayer. Why does Visual C7 doesn't need this lib??