K
K
Konstantin Dergachev2020-12-10 16:07:25
C++ / C#
Konstantin Dergachev, 2020-12-10 16:07:25

Very old project, how to compile it?

There is a project written back in 2010 by a foreign coder. But for some reason not compiled to exe.
I tried to complete the project in MVS 2019 but it didn't work because the methods are not supported.

I downloaded MVS 2010, and it already has completely different errors, at the moment this is:

fatal error LNK1120: 1 неразрешенных внешних элементов


Googling didn't work.

Project code snippet
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
#include "resource.h"

int count=0;
int packetlen=0;
char stemp[25];
TCHAR finalfwpid[255];
int haschanged=0;

DWORD ptopacket;
bool quit=false;
HINSTANCE dialogINST;
char spacket[255];



HWND dhwnd;
HWND htextedit;

struct packet
{
  char* data;
  packet *next;
};

class plist
{
  public:
    plist();
    ~plist();

    packet* head;
    packet* current;

    void add(char* data, int length);
    void deleteall();
};


plist::plist()
{
  head = NULL;
  current=NULL;
}

plist::~plist()
{
  deleteall();
}

void plist::add(char* data,int length)
{
  if (head == NULL)
  {
    head = new packet();
    head->data = new char[length];
    strcpy(head->data,data);
    current = head;
    current->next = NULL;
  } else {
    packet *newpack = new packet();
    newpack->data = new char[length];
    strcpy(newpack->data,data);
    current->next = newpack;
    current = current->next;
    current->next = NULL;
  }
}

void plist::deleteall()
{
}

plist* packetlist=NULL;

void _declspec(dllexport) GetPackets();

void Main();
void box();

INT_PTR CALLBACK Form(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
           )
{

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Dubrovin, 2020-12-10
@z3apa3a

It's not an EXE, it's a DLL and must be built as a DLL.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question