GetProcAddress unble to get adress which of the form Void pascal Myfunction(BOOL)
<p>I have MyDll.dll and I want access its function Myfunction which is in the form:</p>

<blockquote>
  <p>Void pascal Myfunction(BOOL);</p>
</blockquote>

<p>Here is my code:</p>

<pre><code>#include "stdafx.h"
#include "iostream"
#include "windows.h"
using namespace std;
void calldll();

extern "C" __declspec(dllexport) void Myfunction(BOOL);

void calldll()
{
    HINSTANCE hDll;
    DWORD dwErrorCode=0;
    LoadMe=LoadLibrary(_T("MyDll.dll"));


    if(hDll!=NULL)
    {
        cout&lt;&lt;"\n DLL loaded successfully \n";
    }

    else
        cout&lt;&lt;"\n Unable to load DLL \n";

    Myfunction sp1=(Myfunction)GetProcAddress(hDll,"Myfunction");


    if(sp1!=NULL)
    {
        cout&lt;&lt;"\n Process loaded successfully \n";
    }
    else
    {
              cout&lt;&lt;"\n Unable to load Process \n";

    }


    FreeLibrary(hDll);

}
</code></pre>

<p>It is giving error as:</p>

<blockquote>
  <p>1.syntax error : missing ';' before identifier 'sp1'</p>
  
  <p>2.'sp1' : undeclared identifier</p>
  
  <p>3.syntax error : missing ';' before identifier 'GetProcAddress'</p>
</blockquote>

<p>Which I don't understand. Can any help me in this regard.</p>
