I'm having a very difficult time figuring out what should be a simple problem. I have a server application developed using C++ (on Linux, so it's not being ported to C# any time soon) that sends and receives standard structures over a socket. How can I read those structures, interpret them as attributes, and send a sensible reply? :confused: I've been experimenting with serializing classes with a binary formatter, accessing raw memory, and just creating a plain structure, but could find no way to send the bytes through the socket... Thanks for your help, Jason
Jason Douglas
Posts
-
Socket Communications between C++ and C# -
Height DifferentialMe - 6'3" Wife - 5'0" Diff = 1'3" Why do really tall guys seem to go for the really short girls? :) The last girl I dated before meeting my wife was 4'11". Jason
-
AMD Athlon too hot?Could be Astro... I heard on Cartoon Network that they attended the same speech therapy class. ;)
-
Windows 2000 vs OS XI couldn't agree with you more, but Microsoft's latest strategy goes way beyond monopoly. They're seriously looking to take over the world through business, and it's going to get them into some serious litigation. I wouldn't be surprised if Microsoft had spies and hitmen to back up the war they're waging. :)
-
Pictures from E3I still play every game I can get my hands on, everything from Black and White to Baldur's Gate II to Unreal Tournament. I don't like reading about the claims of violent games leading to violent youth, but that's another story... I just love letting off some steam in a more healthy manner. Instead of driving angry, I play Carmageddon II and kill a mess of pedestrians (perfectly legal in the virtual world). And, yes, I already know just how disturbed I am, but at least I don't take it into the real world, right? :-D I'm even so much into games, that I've been messing with DirectX ever since version 5. This version 8 is really so much different that I've got to rewrite most of my code! That's the Microsoft way, I suppose. :rolleyes: Later, Jason
-
Valid template class argument types?I've been searching everywhere for a list of valid arguments to pass into a template class, and I can't find anything. I know that you can use "class" and any basic type, such as int, char, bool, etc., but I don't know how to pass in a string, for example. :confused: I would like my template to be defined something like: template MyTemplate... I've tried using "char *", "VARIANT", and "BSTR", but the compiler won't accept any of them. Any help is greatly appreciated! Thanks, Jason
-
Proof for 1=2 (Identify the error in this proof)The way you've shown it (nx) is correct, except that you're forgetting that n = x in each case. I've seen this proven one other way (although I forget the exact steps), and it involved division by 0. The next proof was to show that the Earth is flat... Why do we waste our time with these things? :)
-
Source ControlCS-RCS is a fairly decent file-based version control system for Win9x/NT/2k. It integrates itself with Explorer, so it's not centralized to any one directory branch. It's free for a one-user license, and fairly inexpensive for multiple seats (sort of a peer-to-peer, client/server mix). Visit Component Software's web site for the full details. Later, Jason
-
Developers wantedIs there a web site for the project? Can we download a beta version of these freeware class libraries yet? Thanks, Jason :cool:
-
Static class problemFirst of all, let me say that I've never seen ANYONE declare a static class in the same manner as a struct typedef. I would recommend changing your code for clarity's sake, but that's now back to your question... If you would like each class to access the other, I would recommend the following:
class A : public Location { public: static A instance; Location* GetB() { return &B::instance; }; } class B : public Location { public: static B instance; Location* GetA() { return &A::instance; }; }
Hope this helps! (Basically, you create two singleton objects.) ;) -
Shared Singleton between EXE and DLLI'm using a Singleton class for some debugging work, and I have a few DLL's supporting my application. My problem is that I have a separate instance of the Singleton for each DLL and the Application. I would like them to all use the same instance of this variable. Is there some shared memory trick or something that I can implement to get around this? Thanks, Jason
-
Passing a string with PostMessageI'm trying to pass some sort of character string with PostMessage or SendMessage (as the wparam). I got it to work, but I used a CString* and I'm not very happy with that solution. Two reasons: it's dangerous to play with memory across classes this way; and I need to call SendMessage to make sure the proper memory is removed (asynchronous nature of PostMessage causes leaks). Is there a better way to pass a string parameter to a PostMessage call? Thanks, Jason :confused:
-
Alternative to MFCI would hardly site Microsoft as a company that does not use MFC. They're not called the Microsoft Foundation Classes for nothing. ;P Many of the alternative GUIs that Microsoft develops are based on MFC and then extended. We see the extended classes about a year after they use them. We don't want the competition to get too close...
-
Easy way to create a popup menu with the Grid Control?I would like to select a row and popup a context menu when the user right-clicks any row. I can get the menu to popup, but selecting the row first is proving to be a bit tricky. Any help or ideas would be highly appreciated. :-D Thanks, Jason
-
Best grid control?There is already an ATL (ActiveX) version of Chris Maunder's grid control right here on CodeProject. The grid control is highly expandable and comes complete with full source code for free. There are examples on how to use combo boxes, tree controls, and other cool stuff with the grid control. I, personally, wish that it was easier to do popup menus with the grid control because I'm having some difficulties.
-
Limit on size of a CString?Does anyone know what the limit for the length of a single CString is? I thought it was 255 characters, but I can't find any documentation on it. Any references to documentation on this would be appreciated as well. I'm using MFC 6.0. Thanks, Jason :confused: