MagTDK

Members
  • Content count

    237
  • Joined

  • Last visited

Community Reputation

122 Neutral

About MagTDK

  • Rank
    Member
  1. [.net] .settings file

    The .settings file from my understanding is a file that contains a wrapper class derived from ApplicationSettingsBase (I believe its new for VS 2005). This class is supposed to be controled visually within visual studio 2005 and can maintain application preferences. Problem is I can't get it to work properly without this .settings file.
  2. I'm trying to add a .settings file to my .NET application. I'm going off this web site: http://msdn2.microsoft.com/library/wabtadw6.aspx It says: "You can create a .settings file in Visual Studio by using the Settings tab on the Project Designer to create project settings." But I can't seem to find it. Anyone care to point me in the right direction so I can add this .settings file to my .NET app. I'm using VS 2005 by the way.
  3. Is this spyware? (front page of GameDev.net)

    Thanks. Just making sure my computer wasn't infected.
  4. On the home page here I'm seeing some text underlined in green. When I move over it with my mouse pointer a 'Sponsored Link' popup appears. Is this spyware or normal advertizing for Gamedev.net? An example would be the **developers** in this headline: Quote: Wednesday, July 27, 2005 Independent Gamemakers Urged to 'Make Their Play' at 2006 Slamdance Posted by: Kevin Hawkins at 3:55:03 PM LOS ANGELES, July 27, 2005: Aspiring video game **developers** across the globe are advised to submit their work to the 2006 Slamdance Independent Game Competition - one of the premier competitions focused on the independent game developer. Slamdance is calling for independently designed and programmed games from the American and International game design community. The asterisks I put there for you to spot the word more easily, when really it's double underlined in green.
  5. Function Pointer Problem

    hmm...originally I was using my static bool value to pick the path every function call like so: int MyClass::foo(int a) { if (m_IsFirst) { // Run time critical code } else { // Run time critical code } } I thought I could speed it up by using function pointers but after looking at the disassembly between the 3 methods I come up with: 8 assembly instructions for this: int a = (pTest->*(pTest->FunctionPointer))(5); 4 assembly instructions for this: int a = pTest->CallFunctionPointer(5); 4 assembly instructions for this: int a = pTest->foo(5); // above function No speed increase as far as I'm reading it. I guess I'll go back to using my bool test.
  6. I have a test class with a function pointer that I want to dynamically change to point to another implementation. I don't use function pointers that often so I'm a little confused on the syntax. Right now I'm calling a regular function to call the function pointer but that's not what I want. I want to be able to call the function directly and have it look like a normal function. If you look at my main function and class source code you'll see what I'm doing. // MyClass.h //////////////////////////////////////////// #pragma once class MyClass { public: static bool m_IsFirst; int (MyClass::*FunctionPointer)(int a); int FirstFunction(int a) { return a*2; } int SecondFunction(int a) { return a*4; } int CallFunctionPointer(int a) { return (this->*FunctionPointer)(a); } MyClass(void); ~MyClass(void){}; }; // MyClass.cpp ////////////////////////////////////////// #include "MyClass.h" bool MyClass::m_IsFirst = false; MyClass::MyClass(void) { if(m_IsFirst) { FunctionPointer=MyClass::FirstFunction; } else { FunctionPointer=MyClass::SecondFunction; } } And here is my main: #include "stdafx.h" #include "MyClass.h" #pragma comment(lib, "Test.lib") int _tmain(int argc, _TCHAR* argv[]) { MyClass::m_IsFirst = true; MyClass* pTest = new MyClass(); // LOOK HERE: This works but I have to call another function to call my function pointer. int a = pTest->CallFunctionPointer(5); // I want something like this: // int a = pTest->FunctionPointer(5); // See how it's called directly return 0; }
  7. Ok, lets talk Episode III *SPOILER WARNING!*

    I wonder if Palpatine was Anakins real father. I believe Palpatine said something about his master "Darth Plagious" discovering how to use the mediclorians to create and save life. I'm wondering if palpatine used what he learned from his master to impregnate anakins mother, hence explaining the birth and high mediclorian count in anakins body. Just a thought.
  8. Ok, lets talk Episode III *SPOILER WARNING!*

    Just got back from seeing episode III which I liked but still have a few questions that were unanswered. Who was the guy who ordered the clone troopers from episode II? I remember Obi-Wan talking about him briefly but I don't recall who he was. I've only seen the prequels once so I might have missed it. And who tampered with the Jedi records from episode II. I remember Obi-Wan saying something like it wasn't possible but obviously that wasn't the case. I'm just wondering if they found out who did it. I'm guessing the Emperor in both cases.
  9. Star Trek : Enterprise canned!

    It's really a shame that it got canceled considering season 4 has been great so far. They are finally beginning to show the beginnings of the Federation. In fact I'm guessing they will end the series with the formation of the Federation. But there was still so much more to tell, like the start of the Klingon war. They should have never have put Enterprise on Fridays here in the US. That's considered a graveyard slot as far as ratings go. Another problem they had in many big city's was the constant interruption of it's regular schedule time slot. I don't know how many times UPN replaced Star Trek because of some Hockey or Basketball game in my area. As far as I'm concerned UPN blows. Maybe some other network will buy the rights to the series. The Sci-Fi station is pretty much filled with Stargate and BSG so I don't think they would be interested but maybe Spike TV would. They are a new network and they do show TNG and DS9. You never know but I doubt it
  10. Huge improvement from your last drawing.
  11. Hardware question

    Thanks for your input.
  12. Hardware question

    I'm looking for a new motherboard and I was looking at one in particular from Abit called the NF7-S2 Motherboard. Based on this site: TestReport it says it supports a AMD XP 3200+/200 but I don't see anything about support for a 3200+/400 fsb.Yet on this page it says it supports 400MHz fsb: NF7-S2 Am I to believe that this board will not support a AMD XP 3200+ 400MHz fsb CPU?
  13. I'm just getting into managed c++ and would like to use some existing dll's that I've created in unmanaged c++. I've read some articles that use p/invoke and marshalling to aid in using legacy dll's but am still confused on the implementation. Here is a dummy dll I created to be used in managed c++: //------------------------------------------------------------------------------ // DummyDLL.h //------------------------------------------------------------------------------ namespace MyLibrary { class __declspec(dllexport) MyClass { public: std::string Log(std::string name) { std::string temp; temp = "Hello "; temp.append(name); return temp; } int Add(int a, int b) { return a+b; } }; } int __declspec(dllexport) Add(int a, int b) { return a+b; } std::string __declspec(dllexport) Log(std::string name) { std::string temp; temp = "Hello "; temp.append(name); return temp; } //------------------------------------------------------------------------------ // DummyDLL.cpp //------------------------------------------------------------------------------ #include "stdafx.h" #include <iostream> #include "DummyDLL.h" BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; } And here is an example of using it in unmanaged c++: #include "stdafx.h" #include <iostream> #include "DummyDLL.h" #pragma comment(lib, "DummyDLL.lib") using namespace std; using namespace MyLibrary; int _tmain(int argc, _TCHAR* argv[]) { MyClass library; int result = library.Add(5,10); // calling class from dll result = Add(2,4); // calling function from dll string name = library.Log("John"); // calling class from dll using stl strings name = Log("Joe"); // calling function from dll using stl strings return 0; } All of this works fine in unmanaged c++ as expected. What I need is an example of it being used in managed c++. One of the spots I'm having trouble is converting the stl string to a managed string to be used in window forms. Can someone code the above example for managed c++ so I can see what I need to do.
  14. blocked ear.

    I have this problem once in a great while. I use to have the doctor clean my ear out until I found out I could do it myself. What I do is use a ear wax removal kit like what is shown here: http://ear-mart.com/wax_removal.asp Put some drops in the plugged ear from the solution included in the kit and let it sit for a few minutes. Kind of tickles after a while but that's normal. Then use that blue syringe (like what's shown in the picture) to suck up some warm water from the faucet. Point it directly in your ear and squeeze really hard. You need the pressure of the water to push out the wax. This is going to feel really weird like your damaging your ear but it's not. The doctor will do the same procedure but with a larger syringe. Eventually you should see wax coming out. Repeat this until you think you got it all out. Works for me every time. Mind you, I take no responsibility if you screw your ear up :)
  15. XP SP2 Final released!

    Can SP2 be uninstalled? I'd like to update my computer but only if it can be uninstalled incase something go's wrong.