|
Thanks a lot.
Could you tell me some details?
How to get the ipx/udp datagrams sent by the game?
And how to send ipx/udp datagrams received from the other end to the local game?
|
|
|
|
|
I'm no IPX/UDP expert but I recommend you get WireShark which is free so you can examine all the packets coming out of the original game software. I would set up a real LAN game scenario with two PCs or VPCs isolated on their own network and see if you can decipher the basic handshaking and discovery protocol between the two by looking at what gets passed back and forth with WireShark. What ports get used is vital especially for UDP. I guess the next step is probably to read up heavily on comms programming, especially Sockets. When you reckon you can manufacture UDP packets to match the game's from your own code then WireShark will let you see if what you're sending is what a real copy of the game would send. Remember it's not just the data but to an extent timing, message turnaround and data rate, which is important to simulate in a broadcast UDP scenario. Dropped packets on the other hand should not be disasterous if the game is well written. Reverse engineering IP protocols is not easy, I used to work with someone who's main role was just that. So be prepared for a lot of head scratching and guess work. Think about the things that you already know the game must be transmitting, especially any user entered text you can control. That might just be enough to start cracking it open for you if it's not encrypted. Good luck.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
hi
iam using two different third party library in my application, that two library using one structure with same name("_Bolb").
if i try to include two library header files in my application iam getting struct redefinition error, but i have to use this two library in my application,
i tried this by keep one lib headerfile under my own namespace and another headerfile in with out namespace, eg., namespace myspace{first.h}, myspace::Cfirst obj;
if i try to access the library iam getting linker error unresolve external symbol myspace::Cfirst @$%^&$ " like this,
how can i go around this problem, can any help me
thanks and regards
|
|
|
|
|
Well, in that case you may have to recompile the libraries. You may either change the structure names, or put the libraries in different namespaces.
|
|
|
|
|
i dont have control on library files then how can i compile or change the struct name the library, i should have to do some thing in my application, like wraper class,or proxy but iam not sure,
can any one help in this case
|
|
|
|
|
try
Project settings->linker->command line: /FORCE:MULTIPLE
|
|
|
|
|
That is just shutting up the linker, who is rightly reporting a problem.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
We can set the seed value for rand() function using srand(seed) , but how to set the maximum. I want to generate random numbers between 1 to 10. Using the mod(%) operator without setting max limit is one way, but is there any function for setting max limit?
Thanks & Regards,
Suman
|
|
|
|
|
There's not such a function.
|
|
|
|
|
Ok. Thanks for your help.
Best Regards,
Suman
|
|
|
|
|
I assume you’re using code like this:
int val = rand()%10 + 1;
This will not produce evenly distributed random numbers!
‘rand’ generates random numbers from 0 to ‘RAND_MAX’ (32767).
Below if a list of ranges, each range maps from 1 to 10 (e.g. 0->1, 1->2, ..., 10->1, 11->2, etc):
0-9 10-19 20-29 …. 32750-32759 32760-32767 (32769)
Note the last range is smaller than the rest! The number in brackets is the value we would have to use as the maximum to make it the same size.
Here’s a breakdown of the last range:
32760 -> 1
32761 -> 2
32762 -> 3
32763 -> 4
32764 -> 5
32765 -> 6
32766 -> 7
32767 -> 8
This means the numbers from 1-8 will be slightly more likely to occur than 9 and 10 because 1-8 appear in all ranges whereas 9 and 10 appear in all ranges except the last!
If I were you I'd use Boost's Random[^] library.
Steve
|
|
|
|
|
Hi, I'm just starting in C++ and i need help.
The code is simple and i was able to made this work in previous program but when i used it again to other program it has error.
My code is:
double d = atof(str);
Error;
"Cannot convert CString to const char*"
math.h and stdlib.h already included.
What seems to be wrong with my code?
Am i missing something? or
Is there other way to convert string to double or float?
|
|
|
|
|
Try this:
double d = wcstod(str, NULL);
Best Regards,
Suman
|
|
|
|
|
Thank you for your suggestion.
It worked. Thanks a lot.
Till next time.
|
|
|
|
|
You are welcome!!
Best Regards,
Suman
|
|
|
|
|
Hi again,
How about int, double or float to String?
I usually used String.Format function:
int d = 20;
float f = 120.56;
str.Format("%d, %f",d,f);
AfxMessageBox(str);
The same error appeared. "cannot convert"
Hoping for your comments.
Thank you.
|
|
|
|
|
TooShy2Talk wrote: How about int, double or float to String?
Do you mean int , double or float to "CString".
If not so, pls try CString.
There are functions like itoa(), atoi() etc to convert from int to string, and vice versa. Doing google search with "int to CString" will display many solutions.
I am sorry, I saw your post now only.
If you still need help, please post a new message, so that all people can see your question.
Best Regards,
Suman
-- modified at 11:57 Tuesday 11th September, 2007
|
|
|
|
|
It's jusk OK.
Thank you again.
|
|
|
|
|
I always use it like that and it works
CString str = "";
double d = XXXX; //Any value
str.Format (_T("%lf"), d);
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Hi everybody,
I've written a mfc application which uses dundas gauge controls (together with windows forms). Everything works fine in debug or release mode but when I try to install the software on a different machine (windows XP, freshly installed) the application don't even start. Actually the installation works fine but the software don't run. I've checked all dependencies with dependency walker and also included "DundasWinGauge.dll" in the setup project (VS2005 setup wizard). DotNet is installed on the target machine. If I exclude the dundas gauge control then the application also runs on the target machine.
Does anybody have an idea?
Best regards,
Frank.
|
|
|
|
|
By chance, do you need vcredist_x86.exe on the target machine?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I don't know. What is vcredist_x86.exe? It's my first mixed-mode setup project. Actually it's my first setup project at all.
|
|
|
|
|
Franken wrote: What is vcredist_x86.exe?
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hm, this unfortunatly doesn't solve the problem I've installed vcredist_x86.exe on the target machine but the error still occurs.
|
|
|
|
|
Ok, could it be a (ActiveX) control that needs to be registered?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|