News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

direct X problems

Started by Diddl, August 20, 2007, 09:28:32 AM

Previous topic - Next topic

Diddl

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?

Pelle

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

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

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); );

Robert

Quote from: Diddl 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); );


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

Robert Wishlaw

Diddl

yes it's defined in this .h file but linker print a error message for this code: #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;


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

Robert

dplayx.lib is not listed in your Pelle's C project WinRott224.ppj file.

Robert Wishlaw

Diddl

Quote from: Robert on August 27, 2007, 10:56:55 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??