Jump to content

Home

question about .net conventions


stubert

Recommended Posts

in the .net environment, how do you include precompiled object files?

 

like in unix we have .o files which can be pre compiled and then included in a makefile

 

 

but how do you tell a .net soultion to include pre-made .obj files?

 

 

the reason i ask this is cause i'm working on a meathod to catch wallhackers/aimbotters etc and it requires C++, and to get that to workin the jk3 library you need to precompile the C++ object then include it in the final build

 

 

the anti cheat thing is also probably a good idea to share around with the modders, as long as the source isn't released publicly becase then it will be subject to hacking

Link to comment
Share on other sites

i have to bulld a static .lib written in C++

 

the main header for the lib looks like this

 

#ifndef CPP_H
#define CPP_H



#ifdef __cplusplus
extern "C" {
#endif 

   void test_pp(void);


#ifdef __cplusplus
}
#endif 


#endif 

 

 

this is included in the buld for cgame and the c++ lib

 

in cgame i include this in cg_local.h and it's one of the headers in the lib

 

 

void test_pp() looks like this in the lib

 

 

#include <stdio.h>
#include <stdlib.h>

#include "CPP.h"

extern "C" void Com_Printf( const char *msg, ... );


extern "C"  void test_pp(void)
{
  Com_Printf("this is a msg from c++!");

}

 

 

to create a static lib, in .net go to new project -> win32 project

 

then in the wizard that comes up click applications settings and check static .lib

 

 

then go into proteries of cgame, go to linker->inpuit and add the .lib name to the "additional depenancies" list

 

you will also need to put it in one of the .lib paths that .net looks for in tools->options->projects->VC++ directories (show directories for library files)

 

 

 

now you'll be able to add a consolecommand call to test_pp() in cgame and see the message written in the C++ modules

 

this guide also helps to do further stuff

 

http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.6

Link to comment
Share on other sites

I am curious though, how much power this gives me - I'm guessing I'd be able to get information about the OpenGL context, and then start pushing polygons to it with this code - isn't that a potential security issue?

Link to comment
Share on other sites

i am setting up a way to use this to query windows for the name of each file in memory and their path

 

then i'm going to find their md5 sums and check that against a list of know wallhacks and such

 

but, we still don't have the names of what void functions are in the .exe but i supposse you could find a way to use regular opengl calls

 

 

 

wudan: security issue for who =p

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...