S
SirCodesALot
Dear great minds,
I am having trouble linking to an external dll and was wondering if
anyone out there could help. Here is my class
Istat.h
#include "afxdisp.h"
using namespace System;
using namespace System::Runtime::InteropServices;
class IStatus : public COleDispatchDriver
{
public:
IStatus() {} // Calls COleDispatchDriver default constructor
public:
//CString GetBstrVersion();
long GetNPort();
[DllImport("ComACRsrvr.dll")]
extern "C" {
void __stdcall Connect(long nTransport, long nIndex);
}
};
Istat.cpp: (relevate lines)
IStatus ParkerStage;
ParkerStage.Connect(3,0);
--------
The problem is when I compile. I have the ComACRsrvr.dll in the same
directory as the project, but when I compile i get the folling error
messages:
1>c:\\temp\Istat.h(32) : error C2059: syntax error : 'string'
1>c:\temp\Istat.h(32) : error C2334: unexpected token(s) preceding
'{'; skipping apparent function body
Could I be importing the library incorrectly or is there something I
am missing? Thanks in advance for your help!!!
-SJ
I am having trouble linking to an external dll and was wondering if
anyone out there could help. Here is my class
Istat.h
#include "afxdisp.h"
using namespace System;
using namespace System::Runtime::InteropServices;
class IStatus : public COleDispatchDriver
{
public:
IStatus() {} // Calls COleDispatchDriver default constructor
public:
//CString GetBstrVersion();
long GetNPort();
[DllImport("ComACRsrvr.dll")]
extern "C" {
void __stdcall Connect(long nTransport, long nIndex);
}
};
Istat.cpp: (relevate lines)
IStatus ParkerStage;
ParkerStage.Connect(3,0);
--------
The problem is when I compile. I have the ComACRsrvr.dll in the same
directory as the project, but when I compile i get the folling error
messages:
1>c:\\temp\Istat.h(32) : error C2059: syntax error : 'string'
1>c:\temp\Istat.h(32) : error C2334: unexpected token(s) preceding
'{'; skipping apparent function body
Could I be importing the library incorrectly or is there something I
am missing? Thanks in advance for your help!!!
-SJ