-
From CString to BSTR
CString str = “Alice In Wonder Land” ;
BSTR bs = str.AllocSyString( ) ;
-
From char* to BSTR
char *s = “KICIT,Nagpur” ;
bstr_t b = s ;
-
From string to double, long, integer
char *s = “567.45″ ;
double d = atof ( s ) ;
s = “54678″ ;
long l = atol ( s ) ;
s = “345″ ;
int i = atoi ( s ) ;