Jump to content
  • Advertisement

tyfius

Member
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

122 Neutral

About tyfius

  • Rank
    Newbie
  1. I have a Unity3D application which I hook into a WPF application using a WindowsFormsHost control. As I cannot change the Unity3D application to a web application I'm stuck with an approach like this. Unfortunately, the use of a WindowsFormsHost control has an impact on the performance. Looking into other solutions I stumbled upon SlimDX and I was wondering if it would be possible to capture the output of an application and show it in my WPF application using the SlimDX WPF controls. I assume they would have an advantage over using the WindowsFormsHost control.
  2. Why are you storing that into your database? Most shopping websites or applications use a session object for that. It's a lot faster because it doesn't require a database lookup and you can easily store things in an array. On a side note: it might also be easier to store such data serialized into your database and convert it back to an array. You won't need to manually modify your string and search for the "," sign. It has a lot of advantages. For example, using PHP the following would occur:$items = array(); $items[] = "apple"; $items[] = "banana"; $data = serialize($items); // Now $data will be a string as follows: // a:2:{s:5:"apple";s:6:"banana";}Using the unserialize() function you can convert the string back to an array.
  3. Simply referencing the DLL in your project is not enough. When you start the debugger or the release executable you have to make sure the DLL file is located in the same folder as the executable. (Most likely bin/debug while debugging.) Is that the case?
  4. ActiveState recently released a free version of Komodo IDE. It's more of a generic text editor with syntax highlighting, code completion and some integrated support.
  5. tyfius

    Pointers: Lay the question to rest?

    @ToohrVyk: I just wanted to clarify that one can indeed make the assumption that the size will be fixed on most modern systems (as explained here and here). No standard defines a fixed size however, only a minimum size (which should be 16 bits for an int). Most modern compilers have agreed a fixed size to enhance portability between different systems. Or at least, that's what I've always been told.
  6. tyfius

    Pointers: Lay the question to rest?

    Quote:Original post by ToohrVykIn C++, a pointer is usually as large as an integer, if not larger. Therefore, manipulating integers will be at least as fast as manipulating pointers. The speed of copy only comes into account when manipulating larger types, or types which have non-trivial copy constructors.True, but a pointer should always be 4 bytes on a 32-bit system and 8 bytes on a 64-bit system while an integer is only 4 bytes large on both systems. If it has any other size you are using a non-conform compiler (or setting) and that will most likely also cause other things to be incorrect.
  7. tyfius

    C++ Private Members

    In most object oriented programming languages the accessibility of a variable is seen on class-level and not on object-level. So all private variables from an object are accessible by another object if they are the same type.
  8. Let me clarify a bit. There was an existing Linux application which I had to convert more or less into a DLL for MS Windows (and .so file on Linux) so others could use that DLL to create their own implementation of the existing application. I have one big Visual Studio solution file (and some makefiles for the Linux build) which contains my DLL and a unit test application. This is why most likely I mistakenly accepted that it could be solved by changing the stack size of the DLL while it was actually the unit test executable I modified. Now, the size of the double array depends on a configuration file. On MS Windows I have to allow every possibility which results in creating a double array of 30k (so 8 * 30k). This array is used 4 times in a structure to accommodate previous and future data. I did a sizeof() and it returned 1.25MB for the array, which is bigger then the 1MB stack size allowed by Visual Studio. On Linux an application has been build on top of the code using threads and I noticed they have a configuration setting which holds the required stack size which they use when the thread is created. My best guess is that the error is caused by that structure. I have the following piece of code: int doSomething() { my_stryct_t mstruct; }Using the Visual Studio debugger I narrowed it down to that function call. When it tries to enter that function the error pops up. When I started this project I was told to avoid the use of malloc() as much as possible, so that's the reason I did not try this any time sooner, hoping another solution existed. I'm fairly new to all of this, but I will try to create that structure on the heap tomorrow. Thanks for the suggestions.
  9. Hi, Is it possible to change the stack size of a DLL from within the source code? When using threads you can specify the size of the stack you want the thread to use, but since my application doesn't use threads I'm looking for another solution. Source code I haven't written but which I use creates a structure containing 4 double arrays of almost 30k. I know this is big but it's required and I cannot change anything about that. At the moment I change the stack size via the project solution of the IDE I'm using and it works for me, but when I ship the .dll and .lib file to someone else he too has to change the stack size in the project solution of his IDE. This is something I would like to avoid since it's possible the required stack size might change in the future and I don't want to bother the users of the DLL with that. I'm using plain old (ANSI) C code, so any solution that might be cross platform will help me a lot. Regards
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!