B
Brett Styles
Hi Guys,
I am trying to access a class in an unmanaged dll. I have
created a wrapper managed class to access the functions I need but no matter
what I try from the MSDN samples I can not get it to work with my code. I
have a VB Net front end which need the access the unmanaged functions. The
wrapper I wrote can be accessed but the wrapper will not compile when I
refer to the unmanaged class. I have tried using header file for definitions
with and #include in the managed code, __dllExport and all my attempts do
not work. I am escentially a VB programmer but have done enough C years ago
to allow me to get the code working stand alone. I am not up to the task at
hand and would really appreciate some ideas from the C++ experts out there.
Thanks
Brett Styles.
snippet:
managed wrapper:
namespace CameraSDK
{
__gc public class CameraManaged
{
public:
CameraManaged(void)
{
}
~CameraManaged(void)
{
}
ConnectCamera()
{
CProg.Connect(); //Error here every time.
}
private:
CameraU CProg; //ERROR here every time
}:
}
Unmanaged Code
class CameraU
{
CameraU::CameraU(void)
{
}
~CameraU::CameraU(void)
{
}
Connect()
{
.......code here
}
};
I am trying to access a class in an unmanaged dll. I have
created a wrapper managed class to access the functions I need but no matter
what I try from the MSDN samples I can not get it to work with my code. I
have a VB Net front end which need the access the unmanaged functions. The
wrapper I wrote can be accessed but the wrapper will not compile when I
refer to the unmanaged class. I have tried using header file for definitions
with and #include in the managed code, __dllExport and all my attempts do
not work. I am escentially a VB programmer but have done enough C years ago
to allow me to get the code working stand alone. I am not up to the task at
hand and would really appreciate some ideas from the C++ experts out there.
Thanks
Brett Styles.
snippet:
managed wrapper:
namespace CameraSDK
{
__gc public class CameraManaged
{
public:
CameraManaged(void)
{
}
~CameraManaged(void)
{
}
ConnectCamera()
{
CProg.Connect(); //Error here every time.
}
private:
CameraU CProg; //ERROR here every time
}:
}
Unmanaged Code
class CameraU
{
CameraU::CameraU(void)
{
}
~CameraU::CameraU(void)
{
}
Connect()
{
.......code here
}
};