virtual

Can GPU capabilities impact virtual machine performance?

While this many not seem like a programming question directly, it impacts my development activities and so it seems like it belongs here. It seems that more and more developers are turning to virtual environments for development activities on their computers, SharePoint development being a prime example. Also, as a trainer, I have virt...

How to Delete a Virtual Directory from an FTP Site in IIS 7 and IIS 7.5 using C#/VB.Net and WMI?

Hi all. I hope everybody is doing fine. I try to delete a virtual directory using WMi (Server Manager Class) and recreate with different values. The problem i am facing is that the virtual directory is not getting deleted. Please help. How to check existance of a virtuual dir and the call delete? and similarly how check whether a ...

How do you find a functions virtual call address in assembly?

I've googled around but i'm not sure i am asking the right question or not and i couldn't find much regardless, perhaps a link would be helpful. I made a c++ program that shows a message box, then I opened it up with Ollydbg and went to the part where it calls MessageBoxW. The call address of MessageBoxW changes each time i run the ap...

Why C++ virtual function defined in header may not be compiled and linked in vtable?

Situation is following. I have shared library, which contains class definition - QueueClass : IClassInterface { virtual void LOL() { do some magic} } My shared library initialize class member QueueClass *globalMember = new QueueClass(); My share library export C function which returns pointer to globalMember - void * getGlobal...

Save Configuration to File in IIS6 Equiv in IIS7

I’ve been reading a lot of posts and the like, but one of my questions aren’t getting answered and didn’t know if you have an idea. I have a setup where I have 10 sites, that each have 5 Applications and within those 5 applications, I have 3 Virtual Directories that could be copied and pasted to each app. For example: Site1 ...

How to build boost foreach cycle

Hi guys! I have some abstract class called IClass (has pure virtual function). There are some classes which inherit IClass: CFirst, CSecond. I want to add objects of classes which inherit into boost::ptr_vector: class IClass { virtual void someFunc() = 0; }; class CFirst : public IClass { }; class CSecond : public IClass { }; boost::pt...

Override number of parameters of pure virtual functions

I have implemented the following interface: template <typename T> class Variable { public: Variable (T v) : m_value (v) {} virtual void Callback () = 0; private: T m_value; }; A proper derived class would be defined like this: class Derived : public Variable<int> { public: Derived (int v) : Variable<int> (v) {} void Callbac...

Why is execution-time method resolution faster than compile-time resolution?

At school, we about virtual functions in C++, and how they are resolved (or found, or matched, I don't know what the terminology is -- we're not studying in English) at execution time instead of compile time. The teacher also told us that compile-time resolution is much faster than execution-time (and it would make sense for it to be so)...

Overriding vs Virtual

What is the purpose of using the reserved word virtual in front of functions? If I want a child class to override a parent function, I just declare the same function such as "void draw(){}". class Parent{ public: void say(){ std::cout << "1"; }}; class Child : public Parent{public:void say(){ std::cout << "2"; } }; int main() { C...

Convert character to the corresponding virtual-key code

Hi, Currently, I'm using the method VkKeyScan in the Win32 API to convert a character to its virtual-key code. But the problem that this seems to have is that, when i pass small alphabets, it works fine whereas when i pass in a capital alphabet, it doesn't return the appropriate key code and similarly with special characters like "(" or...

need a virtual template member workaround

Hello, I need to write a program implementing the visitor design pattern. The problem is that the base visitor class is a template class. This means that BaseVisited::accept() takes a template class as a parameter and since it uses 'this' and i need 'this' to point to the correct runtime instance of the object, it also needs to be virtu...

Confused about "override" vs. "new" in C#

I'm having the following classes: class Base { public virtual void Print() { Console.WriteLine("Base"); } } class Der1 : Base { public new virtual void Print() { Console.WriteLine("Der1"); } } class Der2 : Der1 { public override void Print() { Console.WriteLine("Der2"); } } ...

Virtual Server VM loses network connectivty after restart

Hi , I have a problem with a VM in Virtual Server 2005 technology losing network. Here is the repro steps Copy the VM from another server with saved state. Create a VM using the same differencing disks and the saved state files but with a different network. Restore the VM, it works fine and the network configuration is available. Re...

How to free virtual memory ?

I have a crawler application (with C#) that downloads pages from web . The application take more virtual memory , even i dispose every object and even use GC.Collect() . This , have 10 thread and each thread has a socket that downloads pages . In each thread , i have a byte[] buffer that store content of page , and have an string str_...

Why is 'virtual' optional for overridden methods in derived classes?

When a method is declared as virtual in a class, its overrides in derived classes are automatically considered virtual as well, and the C++ language makes this keyword virtual optional in this case: class Base { virtual void f(); }; class Derived : public Base { void f(); // 'virtual' is optional but implied. }; My question is...

Any way in C++ for a base class to diallow virtual methods in all derived classes?

Part of our system uses memory shared between processes who do not share a common ancestor. We place C++ objects in this shared memory. Methods on these objects are either inline in the headers or out of line in object libraries that get linked into the respective processes. An error frequently made by new comers to the system is to i...

base destructor called twice after derived object?

hey there, why is the base destructor called twice at the end of this program? #include <iostream> using namespace std; class B{ public: B(){ cout << "BC" << endl; x = 0; } virtual ~B(){ cout << "BD" << endl; } void f(){ cout << "BF" << endl; } virtual void g(){ cout << "BG" << endl; } private: int x; ...

syntax for calling virtual functions outside of the class?

Hi there, what is the syntax for defining virtual functions outside the class body? class random{ public: random(int i = 0); virtual ~random(){}; virtual void print() const; protected: int id; }; is it? virtual void random::print() { } ? ...

disable Virtual Directory Support in apache

hi, i am using php and apache for my local system. when i get my phpinfo details using phpinfo(), i got that my Virtual Directory Support | enabled how can i disable this... any one have idea about this? Thanks in Advance ...

C++ Virtual Methods for Class-Specific Attributes or External Structure

I have a set of classes which are all derived from a common base class. I want to use these classes polymorphically. The interface defines a set of getter methods whose return values are constant across a given derived class, but vary from one derived class to another. e.g.: enum AVal { A_VAL_ONE, A_VAL_TWO, A_VAL_THREE }; enum B...