Advertisement

10.24.2005 at 02:58PM PDT, ID: 21606048
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

error LNK2020 unresolved token(06000006)HostInfo::SetHostInfoData Visual Studio C++

Asked by jamesmcskeane in Miscellaneous Programming

Tags: , , ,

Hi i have created a project using Visual Studio c++ and i am getting this error!
error LNK2020 unresolved token(06000006)HostInfo::SetHostInfoData

I have a Header file named HostInfo.h i also have a cpp file named HostInfo.cpp.
in the cpp file i have included the header file like so, #include "HostInfo.h"

But it does not seem to be linking to it, i dont know why, can anyone help?

I have included the code for both header and cpp if you want to see it

Header file

#pragma once

using namespace System;
using namespace System::Diagnostics;
using namespace Microsoft::DirectX::DirectPlay;

public __gc class HostInfo
{
 //public class methods and data members
public:
      bool Equals(System::Object *obj);
      int GetHashCode();
      String* ToString();

      HostInfo();

      HostInfo(Guid gu, Address *addr, String *SessName);

      bool SetHostInfoData(Guid gu, Address *addr, String *SessName);
      System::Void SetGuid(Guid gu);
      Guid GetGuid();
      

      System::Void SetAddress(Address *addr);
      Address* GetAddress();

      System::Void SetSessionName(String *name);
      String *GetSessionName();
private:
            Guid GuidInstance;                  
            Address *HostAddress;            
            String *SessionName;      

};


##############

cpp file

#include "stdafx.h"
#include "HostInfo.h"  // I think it does not seem to pick this up

HostInfo::HostInfo()
{

}


HostInfo::HostInfo(Guid gu, Address *addr, String *SessName)
{
      this->GuidInstance = gu;
      this->HostAddress = addr;
      this->SessionName = SessName;
}


bool HostInfo::Equals(System::Object *obj)
{
      HostInfo *node = dynamic_cast<HostInfo*>(obj);
      return Guid::op_Equality(GuidInstance, node->GuidInstance);

}

int HostInfo::GetHashCode()
{
      return this->GuidInstance.GetHashCode();
}

String * HostInfo::ToString()
{
      String *displayString;
      if(this->SessionName->Length==0) //check if we have a session

      {
            displayString ="<unnamed>";
      }
      else
      {
            displayString->Concat(this->SessionName);
            displayString->Concat("(" , HostAddress->GetComponentString("hostname"));
            displayString->Concat(":" , Convert::ToString(HostAddress->GetComponentInteger("port")), ")");
      }
      return displayString;

}Start Free Trial
[+][-]10.24.2005 at 06:00PM PDT, ID: 15151193

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.24.2005 at 06:01PM PDT, ID: 15151199

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.24.2005 at 11:55PM PDT, ID: 15152446

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.25.2005 at 04:07AM PDT, ID: 15153288

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.25.2005 at 04:21AM PDT, ID: 15153335

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.25.2005 at 04:42AM PDT, ID: 15153417

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.25.2005 at 05:13AM PDT, ID: 15153536

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Miscellaneous Programming
Tags: unresolved, token, error, lnk2020
Sign Up Now!
Solution Provided By: khun
Participating Experts: 2
Solution Grade: A
 
 
[+][-]10.25.2005 at 02:06PM PDT, ID: 15157974

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.26.2005 at 12:21AM PDT, ID: 15160354

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32