Create a dll file for amibroker's plugin

#1
Hello I have done a dll file but Amibroker don't recognize my work .
Even if I press the button "load" (http://www.amibroker.com/guide/w_plugins.html) , the dll don't appear in the plugin's list .

Something is missing in my c++ code ...
Any ideas ?...

Here is my code , I have done it with bloodshed IDE.

Inside the file Testdll.h

Code:
#ifndef _DLL_H_
#define export extern "C" __declspec (dllexport)
#define _DLL_H_

#if BUILDING_DLL
# define DLLIMPORT __declspec (dllexport)
#else /* Not BUILDING_DLL */
# define DLLIMPORT __declspec (dllimport)
#endif /* Not BUILDING_DLL */


class DLLIMPORT DllClass
{
  public:
    DllClass();
    virtual ~DllClass(void);

  private:

};


#endif /* _DLL_H_ */
Inside the file dllmain.cpp

Code:
/* Replace "dll.h" with the name of your header */
#include "Testdll.h"
#include <windows.h>

export double add(double a , double b)
{
       return (double)a+b;
}
 

KelvinHand

Well-Known Member
#2
Hello I have done a dll file but Amibroker don't recognize my work .
Even if I press the button "load" (http://www.amibroker.com/guide/w_plugins.html) , the dll don't appear in the plugin's list .

Something is missing in my c++ code ...
Any ideas ?...

Here is my code , I have done it with bloodshed IDE.

Inside the file Testdll.h

Code:
#ifndef _DLL_H_
#define export extern "C" __declspec (dllexport)
#define _DLL_H_

#if BUILDING_DLL
# define DLLIMPORT __declspec (dllexport)
#else /* Not BUILDING_DLL */
# define DLLIMPORT __declspec (dllimport)
#endif /* Not BUILDING_DLL */


class DLLIMPORT DllClass
{
  public:
    DllClass();
    virtual ~DllClass(void);

  private:

};


#endif /* _DLL_H_ */
Inside the file dllmain.cpp

Code:
/* Replace "dll.h" with the name of your header */
#include "Testdll.h"
#include <windows.h>

export double add(double a , double b)
{
       return (double)a+b;
}
This is not the way to write the plugin, There is a standard plugin programming structure to follow.

To learn, download the ADK from http://www.amibroker.com/download.html
study the file and play with the sample.
 

pin2

New Member
#4
I want someone to make DLL file in Amibroker where edit formula should be hidden so that nobody can see the formula. Any guidance for that? How should i do it?
 

Similar threads

Zerodha – Open Paperless Account

Open online account with Zerodha. Free delivery trading and Max Rs 20 for Intraday, F&O, Currency and Commodity Trading. Intraday High leverage with MIS, CO and BO.

Name:Phone:
Email:City:
State:
Are you a day trader?