What's that? I can't add more variables in a class - then the whole program doesn't work!
-
Hello, I've created a program which is waiting for incoming network connections via I/O Completion Ports and I've created a pointer in the network class to a packet processing class which's object is created outside of the class on the heap memory. All the things worked fine, but I got an error. No compiler or linker error - no error at all, but GetQueuedCompletionStatus() doesn't receive completed packets, when I add a specific number of bytes (in variables) in the Packet Processing Class. What's this??? Memory problems? Other problems? The Processing Class do nothing - an object of it is just created - that's all and the Packet Processing class has no relation to the Thread Function which is call the GetQueuedCompletionStatus() function. I can only add a WSABUF variable plus 3 bools and 1 short. That's all. What do you think is the error? Thanks for your attention and your help, bond006
-
Hello, I've created a program which is waiting for incoming network connections via I/O Completion Ports and I've created a pointer in the network class to a packet processing class which's object is created outside of the class on the heap memory. All the things worked fine, but I got an error. No compiler or linker error - no error at all, but GetQueuedCompletionStatus() doesn't receive completed packets, when I add a specific number of bytes (in variables) in the Packet Processing Class. What's this??? Memory problems? Other problems? The Processing Class do nothing - an object of it is just created - that's all and the Packet Processing class has no relation to the Thread Function which is call the GetQueuedCompletionStatus() function. I can only add a WSABUF variable plus 3 bools and 1 short. That's all. What do you think is the error? Thanks for your attention and your help, bond006
Hi, I had some problem like this when I used new operator to create an object of a class (a class containing objects of other classes). So, I could get around it by using malloc.... Although, it may sound unprofessional, you may want to give it a try.... Also, if your recently added variable is a static instance of another class which needs dynamic memory allocation, it would be wiser to use a pointer instance of the new class... Pl. share if it solves the problem. Harsha ---------------------------------- http://www.ece.arizona.edu/~hpg ----------------------------------
-
Hi, I had some problem like this when I used new operator to create an object of a class (a class containing objects of other classes). So, I could get around it by using malloc.... Although, it may sound unprofessional, you may want to give it a try.... Also, if your recently added variable is a static instance of another class which needs dynamic memory allocation, it would be wiser to use a pointer instance of the new class... Pl. share if it solves the problem. Harsha ---------------------------------- http://www.ece.arizona.edu/~hpg ----------------------------------