Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
D

Dustin Henry

@Dustin Henry
About
Posts
72
Topics
20
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Sending HTTP Post via TCP/IP
    D Dustin Henry

    Thank you, this helps a lot. Along with the GET, adding the correct formatting you've shown at the end of my request makes it work. Thanks for the help :) Dustin

    C / C++ / MFC help database com question

  • Sending HTTP Post via TCP/IP
    D Dustin Henry

    Thanks for the reply, but linking to a 176 page document is not helpful in answering my simple question. Also, if you would look at the syntax I used I do understand the name=value pairs quite well. If you look at the reply I posted to my own post, I added the correct HTTP/1.0 header and now receive a response, but not a good one. Also, using GET instead of post does not seem to make a difference. Thanks, Dustin

    C / C++ / MFC help database com question

  • Sending HTTP Post via TCP/IP
    D Dustin Henry

    Found 2 of my problems. First, it appears there is a problem receiving on the socket from a different thread that the one that created it. Can anyone confirm this and give me a possible solution? Second, I added "HTTP/1.0\n" after POST in my message, I receive a response on a recv line directly after the send (not in the threaded method), but now I'm getting a response of: HTTP/1.1 400 Bad Request Content-Type: text/html Date: Mon, 13 Sep 2010 21:35:24 GMT Connection: close Content-Length: 34 <h1>Bad Request (Invalid URL)</h1> Any ideas?

    C / C++ / MFC help database com question

  • Sending HTTP Post via TCP/IP
    D Dustin Henry

    So, I'm fairly familiar with socket programming, but I have never before tried to send HTTP arguments to a web page before using WinSock. I'm trying to duplicate the data in the following URL: http://www.thewebsite.com/sub/database?action=authenticate&username=test&password=test First, I am opening a socket to www.thewebsite.com on port 80. Then, I am sending the following: std::string message = "POST /sub/database?action=authenticate&username=test&password=test"; send(m_hConnection, message.c_str(), message.length(), 0); The problem is, I don't receive a response making me assume the format is incorrect since pasting the URL in a browser does return a response. Now, I'm kind of just guessing on the format to send the data in as I can't seem to find a good description online that doesn't involve a 3rd party library. I have the following code in another thread in attempt to receive this data: char recvbuf[MAX_BUFFER_LENGTH]; int result = recv(m_hConnection, recvbuf, MAX_BUFFER_LENGTH, 0) Any help is greatly appreciated. Dustin

    C / C++ / MFC help database com question

  • OpenGL window creation within a DLL - Possible threading problem
    D Dustin Henry

    Okay first, I have an executable the loads several DLLs. One of these DLLs needs to create a window and set an openGL context. A second DLL, which gets placed in its own thread executes functions on the first DLL. The initial problem I had was that the window was being created upon loading of the first DLL, and when the second DLL called functions on it from it's own thread, the openGL context would not be valid. I fixed this by making sure the window was created by the second DLLs worker thread that calls all of its functions. So now, I can verify that all of my openGL calls are not failing, the problem though is that nothing is happening in the window itself. Right after the window is created it appears to hang. The cursor changes over it and it is no longer selectable. I can verify that the windows message proc is being called correctly and it does get to WM_CREATE. I can also verify that the program itself is not hanging as the calls are still being made. The only thing I can think of as the problem is that when the window is created it is launching it's own additional thread, and I am subsequently trying to make my GL calls within the wrong thread. First, does this sound like the problem, and if it is, is there a way to make the window launch within the same thread that created it? I have made sure that the HINSTANCE that is passed into CreateWindowEx is that of the DLL. I hope this makes sense as it is a little long winded. Any help is appreciated. Thanks, Dustin

    C / C++ / MFC help graphics game-dev question

  • Sharing a singleton in an executable and a runtime DLL
    D Dustin Henry

    Hey Stuart, thanks for your help. I still couldn't get it to work so I just ended up passing in a pointer to the already created object and setting it via a macro. Not as clean as I would like but functional. Dustin

    C / C++ / MFC help question design xml

  • MCF question
    D Dustin Henry

    Just so you know, std::vector and std::list have nothing to do with MFC. They are part of STL or Standard Template Library and are cross platform.

    C / C++ / MFC c++ question graphics tutorial

  • Sharing a singleton in an executable and a runtime DLL
    D Dustin Henry

    Hi all, I have recently run into a problem I was not expecting that stands to jeopardize quite a bit of work. Within my application I have a singleton system logging object that reads from and writes to an XML file. This application also loads several DLLs which in turn also need to be able to contribute to the system log. The problem is when the DLLs try to get a pointer to the singleton they are actually creating a new instance of the object rather than referencing the one that has already been created. This creates an obvious problem with concurrent file I/O. My question is, is there any way around this? The design of this object is such that the only interface anyone has to this object is through global macros(i.e. LOG_ERROR("error happened")), which handle accessing the singleton, meaning simply passing a pointer into the DLL at creation time is not feasible. Any help is greatly appreciated. Thanks, Dustin Henry

    C / C++ / MFC help question design xml

  • Unable to install platform SDK on Vista Operating System.
    D Dustin Henry

    How exactly are you trying to install the SDK and which one? I just recently installed the latest platform SDK and didn't have to do anything with default.htm, and in fact can't understand were you would have to. The download comes in ISO form and is about a 1.3GB file. You simply mount the iso with PowwerISO or something similar and run setup.exe. Dustin

    C / C++ / MFC database security help

  • Dev environment not releasing control of .exe
    D Dustin Henry

    No, it was completely locked. However, I just figured out the problem. Apparently, after you open an event created be the application the event viewer opens the exe to access the message resources in the file. I didn't figure this out before because simply having the event log open doesn't cause the problem, you must open the actual event. The event viewer remains in control of the exe until the whole thing is closed, not just the event. I was sure I tried that before but I guess I didn't. Thanks anyways, Dustin

    C / C++ / MFC windows-admin debugging help announcement lounge

  • Dev environment not releasing control of .exe
    D Dustin Henry

    I am using VS2008 on XP and I'm having trouble with the debugger fully terminating the process of my application after I am done debugging. Basically, the machine still thinks the exe is running so that I or the compiler cannot delete the file, leaving me unable to recompile. The problem seems to happen at completely random times and I am not able to reliably reproduce it. I have run ProcessExplorer and can see when the devenv starts the process and seems to release it. It does not appear to be running anywhere else. The program is fairly small (few hundred lines) and deals with writing a few things to the registry and logging events with the NT event log. I'm recently upgraded to VS2008 (new program though) and have never had this problem before. Any insights or troubleshooting tips would be appreciated. Thanks, Dustin P.S. Rebooting obviously fixes the problem, but I can't afford to do that 10 times a day.

    C / C++ / MFC windows-admin debugging help announcement lounge

  • To Service or not to Service
    D Dustin Henry

    Thanks Joe, that is very informative and helpful. We actually just had another meeting about it and I believe we are turning away from the service idea. Thanks, Dustin

    C / C++ / MFC help question sysadmin hardware performance

  • To Service or not to Service
    D Dustin Henry

    Hi all, I am currently writing a program that will be running on an XP-embedded machine that will act as a watchdog and launcher of another application. Naturally, since this needs to be persistent on the machine, it makes since to write it as a windows service. However, I'm not sure what benefits this will have over a standard application because I have not had a great deal of experience writing services. For one, these machines will never be touched by end-users so an application running in the taskbar would not have the problem of an accidental closure or user error. Two, this program may require relatively constant communication with the application it opens and know if it dies so it can report back to a central server, as well as status update to said server. So I guess my overall question is are there any caveats to writing this as a windows service? Is there any performance gain or loss when it comes to messaging between the applications? Any opinions and thought are greatly appreciated. Thanks, Dustin

    C / C++ / MFC help question sysadmin hardware performance

  • Kind of interesting 3d interface and mouse
    D Dustin Henry

    I'm sorry, but that is pretty pointless. Why would I want to slow down my file access with a ridiculously slow, non-intuitive 3D interface. As soon as they make it holographic, we'll talk. Until then, meh.

    The Lounge com question

  • Displaying 3D interface on multiple platforms
    D Dustin Henry

    Thanks for the help. I think I might try to use a java applet image viewer that can constantly ask for updates from the ISAPI dll and display the generated raw image data. Hopefully that will limit the amount of Java I need to learn but still get the job done.

    C / C++ / MFC c++ java graphics game-dev help

  • Displaying 3D interface on multiple platforms
    D Dustin Henry

    Have you had any experience doing this with real-time 3D and know what the performance would be like? Most of the rendering will be done by user interaction, i.e. user controlled rotation, but we may need a free-spinning model as well. Also, it has been quite a while since I've done any web programming. How exactly would I embed this in the web page. I understand if I was generating a static page I could just write all of the HTML out via the WriteClient function, but if I am just using the program to display an ever changing image what would be the best process. I know I could use JavaScript controls to pass parameters to the dll, but how do I actually place the image on the page? Am I writing raw image data to the stream or do I need to save an image to disk and have the page load it? Sorry for all of the questions, I'm just trying to wrap my head around all of this so I can detail an accurate time frame. If you had any examples of displaying an image using an ISAPI extension it would be greatly appreciated. Thanks, Dustin

    C / C++ / MFC c++ java graphics game-dev help

  • Getting an "Access violation reading location" error for an iTunes plugin
    D Dustin Henry

    I can't tell from the code where the problem lies, but this is caused by memory trying to be used without being initialized first. How are you debugging your DLL? Are you just compiling and then running iTunes to load it? If so, you should try launching iTunes from within the dev environment so that you can see at what point the dll if failing. If you're using VS, under your project properties there is a 'Debugging' tab and a 'Command' argument. You can place the path to iTunes.exe in here and it should launch iTunes when you run your program. It probably needs some command arguments in order to load your dll, but you will have to consult the iTunes documentation for that. Not sure how helpful this is. If apple has an SDK there is probably more info on the message boards for it. Dustin

    C / C++ / MFC help testing beta-testing

  • Displaying 3D interface on multiple platforms
    D Dustin Henry

    I am currently writing an interactive cloth simulation program and I am going to need the GUI to be displayed on a variety of platforms including a native PC application and the web. The problem is with the latter. I am currently writing this app using C++ and OpenGL, and I'm not quite sure how to get it to display web side. I know that there are OpenGL implementations for Java, but I don't know Java that well and do not have the time to really learn it. I've considered separating the simulation code into it's own dll and writing a renderer for each platform, but I'm not even sure what data will need to be sent between the two applications. Should the simulation dll actually include an OpenGL implementation and simply pass final rendered scene to the display app, or should the display app handle all of the rendering. Any suggestions or advice would be very helpful. Thanks in advance, Dustin

    C / C++ / MFC c++ java graphics game-dev help

  • great c++ website for learning
    D Dustin Henry

    In the area of games: http://www.gamedev.net/[^]

    C / C++ / MFC c++ learning

  • Draw a cube
    D Dustin Henry

    li zhiyuan wrote:

    who have any such snippet?

    My good friend the internet [^] does.

    C / C++ / MFC help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups