1 CString -----> int
CString str("1234");
int i= _ttoi(str);
2 CString----->char*
char *p_to_search = (LPSTR)(LPCTSTR)to_search;
3 BSTR----->CSTEING
CString The_id(the_id);
4 char *----->CString
the_to_all = to_all;直接等于
5 BSTR----->CString
CString The_id(the_id);
6 jstring----->char*
char* str_id=(char*)env->GetStringUTFChars(the_id,JNI_FALSE); //the_id是jstring类型
7 char*----->jstring
//to_all是char*
jclass strClass = env->FindClass("Ljava/lang/String;");
jmethodID ctorID = env->GetMethodID(strClass, "<init>", "([BLjava/lang/String;)V");
jbyteArray bytes_time = env->NewByteArray(strlen(to_all));
env->SetByteArrayRegion(bytes_time, 0, strlen(to_all), (jbyte*)to_all);
jstring js_time = env->NewStringUTF("utf-8");
js_time=(jstring)env->NewObject(strClass, ctorID, bytes_time, js_time);