DLL code sample

 

Hallo,

i look for a very simple example of a dll-code. I need only the basic structure of a dll.

In use of my dll, i get always the message: "cannot call function "PlusZwei" from dll 'Test1.dll' (error 127)".

// Test1.cpp : Definiert die exportierten Funktionen für die DLL-Anwendung.

#include "stdafx.h"
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>

#define MT4_EXPFUNC _declspec(dllexport)

MT4_EXPFUNC int _stdcall PlusZwei(int zahl1, int zahl2) {
    int res = 0;
    res = zahl1 + zahl2;
    return(res);
}


What is wrong at this code.

Thanks

traderdoc

Reason: