HI there,
I was trying to call a C# smartdevice dll from VC++ pocket PC console application both were developed using VS.NET 2005.
i've registered the dll with the registry and created the tlb file using the utility Regasm. And i imported the tlb file into my VC++ PocketPC application .
I found in many sites that to use the C# dll inVC++ PocketPC application we've to set one option Common Language Support to ..../oldsyntax.(Proj ect->Properties->Configuratio n settings->general)But i didn find that option in VC++ PocketPC application.
here im placing the code:
#include "stdafx.h"
#include "tchar.h"
#import "C:\Documen ts and Settings\tiruma lab\Desktop\myp rojects\smartde vicedll\dummysm artdll\bin\Debu g\dummytlb.tlb"
using namespace dummysmartdll;
int _tmain(int argc, _TCHAR* argv[])
{
HRESULT hr=CoInitialize (NULL);
ICalculatorPtr pICalc(__uuidof (ManagedClass)) ;
long lResult=0;
lResult=pICalc->Add(100,10);
wprintf(L"The result is %d\n",lResult);
CoUninitialize( );
return 0;
}
Requesting you all Plz save me from this critical situation.plzzz zz
I was trying to call a C# smartdevice dll from VC++ pocket PC console application both were developed using VS.NET 2005.
i've registered the dll with the registry and created the tlb file using the utility Regasm. And i imported the tlb file into my VC++ PocketPC application .
I found in many sites that to use the C# dll inVC++ PocketPC application we've to set one option Common Language Support to ..../oldsyntax.(Proj ect->Properties->Configuratio n settings->general)But i didn find that option in VC++ PocketPC application.
here im placing the code:
#include "stdafx.h"
#include "tchar.h"
#import "C:\Documen ts and Settings\tiruma lab\Desktop\myp rojects\smartde vicedll\dummysm artdll\bin\Debu g\dummytlb.tlb"
using namespace dummysmartdll;
int _tmain(int argc, _TCHAR* argv[])
{
HRESULT hr=CoInitialize (NULL);
ICalculatorPtr pICalc(__uuidof (ManagedClass)) ;
long lResult=0;
lResult=pICalc->Add(100,10);
wprintf(L"The result is %d\n",lResult);
CoUninitialize( );
return 0;
}
Requesting you all Plz save me from this critical situation.plzzz zz