gknight
February 4th, 2005, 05:52 PM
Hello everyone,
I have managed to write a GUI in C++ and managed to get it to import the dll from NetSerialComm (http://msdn.microsoft.com/msdnmag/issues/02/10/NETSerialComm/).
Using the following lines:
#using <mscorlib.dll>
#using <system.dll>
using namespace System;
#using <CommBase.dll>
using namespace JH;
Now inside my app, I have..
CInterface_TestDlg::OnInitDialog()
{
JH::CommBase::CommBase::CommBaseSettings __gc * CommBase();
CommBase::CommSettings = s;
s.baudrate = 115200;
}
I am having trouble calling the function to open the port this dll provides access to. In this case, serial. Does anyone have an idea of what I am doing wrong? I have attached the dll itself and its source. My problem is calling it from withing my VC++ application. any help is appreciated.
COMPILER ERRORS
error C2373: 'JH::CommBase' : redefinition; different type modifiers
error C2039: 'CommSettings' : is not a member of 'JH::CommBase'
error C2065: 'CommSettings' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 's'
error C2065: 's' : undeclared identifier
error C2228: left of '.baudRate' must have class/struct/union type
type is ''unknown-type''
error C3861: 's': identifier not found, even with argument-dependent lookup
I have managed to write a GUI in C++ and managed to get it to import the dll from NetSerialComm (http://msdn.microsoft.com/msdnmag/issues/02/10/NETSerialComm/).
Using the following lines:
#using <mscorlib.dll>
#using <system.dll>
using namespace System;
#using <CommBase.dll>
using namespace JH;
Now inside my app, I have..
CInterface_TestDlg::OnInitDialog()
{
JH::CommBase::CommBase::CommBaseSettings __gc * CommBase();
CommBase::CommSettings = s;
s.baudrate = 115200;
}
I am having trouble calling the function to open the port this dll provides access to. In this case, serial. Does anyone have an idea of what I am doing wrong? I have attached the dll itself and its source. My problem is calling it from withing my VC++ application. any help is appreciated.
COMPILER ERRORS
error C2373: 'JH::CommBase' : redefinition; different type modifiers
error C2039: 'CommSettings' : is not a member of 'JH::CommBase'
error C2065: 'CommSettings' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 's'
error C2065: 's' : undeclared identifier
error C2228: left of '.baudRate' must have class/struct/union type
type is ''unknown-type''
error C3861: 's': identifier not found, even with argument-dependent lookup