|
WOW!thanks a bunch! I'll try this one out...it seems do-able at my level... lol...
|
|
|
|
|
Pleasure.
Be mindful of the fact that this will keep track of the position and velocity of the head of the snake only. In order to keep track of the body segments, you'll need to maintain an array (or list) of the coordinates of each of the body segments.
I'd suggest you deal with that bit later, after you have position and movement nutted out.
|
|
|
|
|
hiooooooooooooooooooooooo
|
|
|
|
|
|
|
|
|
|
Hello Guys,
Anyone knows how to create an Out-process ActiveX Control ?
I'm trying to use 'CreateControlLicEx' function to create the control from my WIN32 application but it only works for In-process ActiveX.
thanks
Mithrill
|
|
|
|
|
Freeing the memory using delete operator for a class object created using new operator gives exception.
The class is
class CSnp : public CObject
{
public:
CSnp();
~CSnp();
char liststr[50];
char sSnpDesc[50];
CTime tDateTime;
int iDCSSerialKey;
};
Is there anything wrong in the class?
|
|
|
|
|
class looks fine. make sure you haven't written past the ends of either of those arrays, though.
|
|
|
|
|
I don't know, you didn't provide the class implementation code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
This might happen if you continue to use the pointer after using delete. After delete, set the pointer to 0, to make it easier to catch this.
|
|
|
|
|
Any reason you are using char arrays instead of something like CString?
|
|
|
|
|
Because that is a right (warranted by the constitution) of the native developer?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
God forbid I infringe upon anyone's rights
However,
char sSnpDesc[50]; sounds like some sort of description, and I've seen descriptions longer than 50 chars.
|
|
|
|
|
It looks just "A snapshot in the family album". I don't know if Daddy had more than 50 characters.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
In World of Warcraft the maximum number of characters you can create over all servers is 50, so this definition looks perfectly valid to me!
|
|
|
|
|
|
If you specify the exception, it may provide more information for us to give you feedback.
Make sure of a few things:
-You're not using the pointer after delete
-You're not calling delete on something that has already been deallocated
-You're not calling delete on someone else's private member
-You're not deallocating across DLL boundries
|
|
|
|
|
Hi,
In my hook application ,while i am trying to connect throgh myconnect function i am getting the error Error: 183,Error: 10014..
I am redirecting the connect through proxy..
my connect call is
sockaddr_in *inName = (sockaddr_in *)(name);
inName->sin_family = AF_INET;
inName->sin_addr.s_addr = inet_addr("192.168.1.5");
inName->sin_port = htons(80);
int iResult = orig_connect(s, (struct sockaddr*)&inName, sizeof(inName));
Pls help me to solve this problem.
|
|
|
|
|
Please note you are passing the address of inName that is already a pointer to a sockaddr struct.
Change:
vkgktm wrote: int iResult = orig_connect(s, (struct sockaddr*)&inName, sizeof(inName));
to
int iResult = orig_connect(s, inName, sizeof(*inName));
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi CPallini,
Thanks for your reeply..
I changed
int iResult = orig_connect(s, (struct sockaddr*)&inName, sizeof(inName));
to
int iResult = orig_connect(s, inName, sizeof(*inName));
But i am getting the error message
error C2664: int (SOCKET,const sockaddr *,int) : cannot convert parameter 2 from sockaddr_in to const sockaddr
|
|
|
|
|
try
int iResult = orig_connect(s, (const sockaddr *) inName, sizeof(*inName));
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i am still getting the same error 10014
|
|
|
|