Hey,
Hope everyone is doing good..:-D Right I'm trying to create a mod for HL2 that sends data about the player state out of the program, this will then be processed by another app on the host pc. My plan is to find the data I want, open a UDP socket and send the data to a server (created by the other app) which is running on an arbitrary port on localhost. I have the C++ code to do this and I know it works in isolation, just need to test it in the HL2 source. However, the problem I'm having is all about header files - I keep getting errors relating to macro redefinition. I have tried using #ifdef & # pragma but the problem is that VS 2008 realises the file has been included and then doesn't include it again, which causes my references to variables to throw up errors.....My question is:
Is there any way to include the functions from winsock.h into the file?
If not how can i get access to sockets?
Are there any easy ways to send data out?
I realise that this creates a security flaw in the program as well as being pretty slow but that's not really of consequence at the moment...any help would be appreciated!
Cheers,
Rich
Hope everyone is doing good..:-D Right I'm trying to create a mod for HL2 that sends data about the player state out of the program, this will then be processed by another app on the host pc. My plan is to find the data I want, open a UDP socket and send the data to a server (created by the other app) which is running on an arbitrary port on localhost. I have the C++ code to do this and I know it works in isolation, just need to test it in the HL2 source. However, the problem I'm having is all about header files - I keep getting errors relating to macro redefinition. I have tried using #ifdef & # pragma but the problem is that VS 2008 realises the file has been included and then doesn't include it again, which causes my references to variables to throw up errors.....My question is:
Is there any way to include the functions from winsock.h into the file?
If not how can i get access to sockets?
Are there any easy ways to send data out?
I realise that this creates a security flaw in the program as well as being pretty slow but that's not really of consequence at the moment...any help would be appreciated!
Cheers,
Rich